Atom: Quitting and re-opening Atom does not save the same tabs I had open

Created on 14 Dec 2015  Â·  91Comments  Â·  Source: atom/atom

Whenever I quit Atom and re-open it, the same 3 tabs from something I was working on 6 months ago always open and _not_ the thing I was just working on.

I have uninstalled and installed the save-session package multiple times, no luck.

This is version 1.3.1.

I'm guessing some file somewhere has these 3 files of mine saved and this file just never gets updated?

bug needs-reproduction

Most helpful comment

Unbelievable. Finally got it working.

Problem: On a mac, if you close using the red X button in the window, the Atom will still be running. So (now obviously) this is the state it saves, an empty atom.

So, you have to close it using Cmd + Q. Then it will restore correctly the next time.

PS: There should be an option in the settings to close the app completely with the X button.

All 91 comments

Atom automatically stores your "project" based on the list of project roots that were open when you closed it. So if you open Atom from the command line by executing atom ~/Source/foo, do some stuff and then close it and then later open Atom from the command line by executing atom ~/Source/bar, it will open a clean environment (assuming you've never opened bar before). It will keep the serialized state for each of these projects separately.

Additionally, if you want to just open the last project you had open ... you can just click the Atom icon or start Atom from the command line with the command atom by itself.

I don't know what the save-session package is supposed to do, I've never used it.

Hey @snario, try deleting the ~/.atom/storage folder as that contains the previous states of the editor (eg what tabs were open). In addition, you shouldn't need to have save-session installed anymore - in fact, all the functionality that was included in save-session is now in Atom 1.4.0-beta0.

EDIT: @lee-dohm you're too quick for me :laughing:

Hehe ... I was actually going to add that information too, so I'm glad you replied @50Wliu :laughing:

You would think so @50Wliu but the project description says:

Project Status: Undeprecated

Since not all of Save Session's functionality has been added into Atom's core, Save Session is now undeprecated and has been modified to work with Atom 0.193.0. All that Save Session does now is manage unsaved files.

(source: https://github.com/mpeterson2/save-session)

Regardless, after rm -rf ~/.atom/storage my Atom now opens empty every time. Is this a permissions issue?

chmod -R a+rwx ~/.atom/storage does not fix it.

EDIT: Sorry, @lee-dohm I didn't see your response, it must be that I am just not opening Atom the right way.

EDIT 2: Nope. Still an issue. I tried:

  1. atom ., Atom opens
  2. I opened 5 or 6 files
  3. Quit atom
  4. atom ., Atom opens, no tabs are open

Sorry @snario, I should have clarified. _Most_ of its functionality is in 1.3.0 - the only thing that wasn't was the auto-saving of untitled buffers, which was added in 1.4.0-beta0. It also doesn't seem to work with Atom 1.2 and above.

@alexchandel's repro steps:

  1. Open Atom 1.3.2 on OS X 10.11.1.
  2. Add a project folder, leave some tabs open, and close Atom.
  3. Repeat Step 2 multiple times for extra fail
  4. Reopen Atom by double-clicking a file associated with it, outside any project. Atom completely forgets what was last open, and launches with A window open to double-clicked file's folder, with single tab for the double-clicked file.

After Step 4, depending on the circumstances, Atom may recover A open project (for example by atom project/folder. However, double-clicking a file within that folder, or manually reopening a file, usually results in the open tabs being lost, and multiple open windows are always lost.

rm -rf ~/.atom/compile-cache seems to fix

@alexchandel can you try @snario's fix and see if that works? Thanks!

Thanks @snario -- This works in Windows as well. Deleting ~/.atom/compile-cache and ~/.atom/storage fixed this for me.

@50Wliu Doesn't work. It occasionally works if a single project window was open, although Atom (as usual) forgets whether the sidebar was open, and what my regex settings in Find/Replace were.

However, it always fails when multiple windows/projects were open.

Edit: in fact, it often recovers an _old_ set of open tabs for the one project it remembers (i.e. not the same tabs that were just open, but some tabs from months ago). And if multiple projects were open, I've even seen it merge some of the tabs from each into the one project it restores.

@alexchandel Ok, then can you try removing ~/.atom/storage instead?

I was running into this as well, and running rm -rf ~/.atom/compile-cache fixed it for me immediately.

Edit: Running on OSX, Atom 1.4.0

@lee-dohm, the first time I opened Atom was from the command line, opening a particular file. I was unfortunate enough to lock such Atom instance in my Ubuntu appbar, and, because of that, there is no such app named as Atom in my OS, but only Procfile - /home/paulo/Work/cuscuz/server. Such value is returned even when I search for Atom in my dashboard (the equivalent of CMD + Spacebar in OSX).

I have unlocked it from my appbar, removed ~/.atom/compile-cache and ~/.atom/storage. Nothing seems to work. If I only type atom from the command line I will get my last project reopened. But the name of the app remains Procfile - /home.... And, if I lock it again, it will be locked at Procfile - /home... and I will get the old session from the first time.

I will include some pictures.
appbar
dashboard

@phcoliveira That might be Unity remembering the wrong command to open Atom (it's happened to me quite a few times for Chrome). Try deleting the Atom shortcut in ~/.local/share/applications and trying again.

Thanks, @50Wliu, I got Atom remebering the last Session. It is also working properly when attached from the app sidebar.

The search from the dashboard, however, is still show the path for the first file I opened, although it now opens the last session instead of the first file ever.

I have the same issue. Old tabs from previous sessions keep being restored (always the same old session). I tried the following steps:

  • I deleted ~/.atom/storage and ~/.atom/compile-cache.
  • I started Atom, which naturally had nothing open anymore.
  • I opened two projects and some files in them (two separate windows).
  • I used the proper way to quit the application.
  • I reopened Atom.
  • Both windows restore properly and open the correct project. Tabs, however, are still not restored.
  • I checked out ~/.atom/storage and no files are ever created, except the application.json file. In the old folder there were tons of hashed files containing the state for each project, such as editor-0aef58dacd4dec211d4b197b44bbff7c9109bd65.

This seems to suddenly have broke in a recent update, I think it happened when I updated to 1.4.0 as it worked fine before.

EDIT: I've found the problem. One of my installed packages was generating an error or exception on quit (a breakpoint triggers if the developer tools are open). Disabling the package creates the files again and fixes everything.

Yeah my solution of deleting the folders only works temporarily -- the state
just corrupts again and I have to delete again.

@50Wliu Neither rm -rf ~/.atom/compile-cache nor rm -rf ~/.atom/storage nor both work. The same reproduction steps apply:

  1. Open two windows (each with its own disjoint project folder) in Atom 1.5.3 on OS X.11.3.
  2. Quit Atom
  3. Double-click a file associated with Atom outside any project (i.e. don't launch Atom from its .app)
  4. Atom starts with a single window opened to the double-clicked file, and both previous windows are permanently forgotten.

In fact, even when I close Atom with two windows open, then relaunch by clicking its Dock icon, both windows are restored, but the position of the first is forgotten and they're both drawn precisely on top of each other.

In fact, even more hilariously, when I close Atom with two windows open, and then reopen it by double-clicking a file associated with Atom that was both already open and inside a _subfolder_ of that window, not only does Atom fail to reopen the previous windows, or realize that file was open in one, but it treats this subfolder like a new project and opens a new window to it.

The fact that there's no Project menu in the menubar, or even a list of known projects, is dumbfounding.

I'm having the same problem with 1.5.3 on win10x64

I have the same issue on windows x64 1.5.3 version.

Cleared the .atom\storage folder.
Opened a file, did some changes.
Quit from Atom.
Checked storage folder,
application.json and
editor-3c89347edfa1d4216b84cabbd54ff12fd1ecd753 created. This has the modification stored.
Reopened Atom, the edited file opened in a tab, but the original content was displayed instead of the changed content.

delete %HOMEPATH%.atom\compile-cache works for me, Win7 and Atom1.5.4

@nonkr deleting %HOMEPATH%.atom\compile-cache does not work for me with multiple project windows open on Win7 and Atom 1.5.4, when reopened by double-clicking a file outside any project.

Unbelievable. Finally got it working.

Problem: On a mac, if you close using the red X button in the window, the Atom will still be running. So (now obviously) this is the state it saves, an empty atom.

So, you have to close it using Cmd + Q. Then it will restore correctly the next time.

PS: There should be an option in the settings to close the app completely with the X button.

@brunolemos: Clicking on X should be equal to Cmd+Q. If it isn't, it's a bug.

@Zireael07 Clicking on the red button in standard OS X applications closes the window but does not exit the application. So no, that behavior specifically isn't a bug.

@brunolemos No. I am well aware of the difference between Cmd+Q and Cmd+Shift+W, and I was indeed quitting Atom. If your windows still restore when you quit it, then you're not replicating the issue correctly.

@Zireael07 Hell no. Document-based Mac applications do not quit on closing the last window. They remain running with an active icon in the Dock. Don't change this.

I am having a similar issue using atom 1.6.2 on OS X, but I think it is slightly different than what is described above. Can someone tell me if this is normal and if so what is the rationale behind this functionality

  1. Open atom; it shows a single untitled doucment
  2. Edit the untitled document

3a. When I close the document (i.e. cmd + w), atom asks me if I want to save changes.
3b. If instead of closing the document I quit atom, (i.e., cmd + q), atom quits without asking me if I want to save changes, and on re-open the document is lost.

I guess I am wondering why atom doesn't ask me to save changes to the untitled document upon quit. Is it just me or is that weird?

Thanks!

@peterhalpin exactly same thing happens for me when I quit atom by pressing the red X button or cmd+q. It doesn't ask whether I want to save the changes neither restores them when relaunching Atom.
I'm using Atom 1.7.0 on OS X.

Same issue here. No prompt to save any untitled documents when quitting with Cmd+Q _or_ using the Red X button.

In addition to this, files, tabs (and most importantly, contents) aren't restored when I open Atom again, as Sublime Text 2 does, for example.

I'm on Mac OS X Yosemite, using a clean installation of Atom 1.7.2.

@peterhalpin No, that is expected behavior. If you leave documents open when Atom exits, it serializes the state, even unsaved changes. No need to ask to save. If you close a document, Atom needs you to make a choice ... save the changes to the document or throw them away.

If you are having problems restoring the state of a project (defined in my post above), that is what is being tracked here. Please ensure that you are opening the exact same project as when you closed Atom.

I can still experience this issues with Atom 1.7.3 on Ubuntu 16.04 :-(
Turns out it's a setting.

Atom -> Preferences -> Settings.
Uncheck the "Open Empty Editor On Start".

All credits go this post.

I have the same problem on the Mac (OS X 10.11.4, atom 1.7.4):

Steps:

  • start atom
  • file -> add project folder
  • open one or more files into tabs
  • quit atom
  • start atom

Result:

  • same project folder still open, but no files open in tabs

Tried & doesn't fix it:

  • rm -rf ~/.atom/storage
  • rm -rf ~/.atom/compile-cache
  • checking or unchecking "open empty editor on start"

Alternate steps/result:

  • instead of quit/restart, if I do: view -> developer -> reload window
  • then result: same project folder NOT still open, and no files open in tabs

same problem here on mac OS X 10.11.5
I have tried removing
rm -rf ~/.atom/storage
rm -rf ~/.atom/compile-cache
and checking or unchecking "open empty editor on start"
nothing works so far. How can i get atom to remember my last project?

Mentioning in case the symlink is an important reproduction step - I've seen this on Mac OS X 10.11.5, with a symlinked project folder. When I removed the symlink and moved the source folder to where the symlink was, it worked (my open tabs started getting remembered again). I can't be sure this step alone fixed it as I had tried (without success) a mix of the above suggestions.

@eliotsykes that indeed fixed part of the problem for me, Instead of opening my project folder with a symlink, I used the full path , and now when I exit atom with cmd+Q the project restores succesfully. however, if I just close atom clicking the red close button then It restores empty, so it seems like there are two separate problems, one with symlinks and one with atom saving a blank project on mac

I had the same issue and this fixed it:
1) Remove all projects from left panel
2) Close all tabs
3) Close Atom
4) Re-open Atom

Use full path instead of symlink helped to remember last project

I'm on Win 8.1 and using Atom 1.5.4.
I have similar problem. When I
1) use right click on file X-> open with Atom,
2) close Atom
3) open Atom using shortcut
Atom will open file X.

When I "open file" from the menu, after 1), and do 2) & 3) atom will only open file X.

It seems that Atom save 2 kinds of file(s) in .atom/storage:

  • application.json
  • editor-some characters

application.json is updated/created only in 3 cases:

  • when there is no application.json in that folder
  • when you right click on file & open with Atom only if Atom is not running
  • when you save file

Atom will create (or edit) editor-chars when you:

  • save file
  • quit Atom

When using shortcut, it seems that Atom only care about application.json, and it will open file that is written in that file.
From what I read in storage's files, Atom save sessions (open tabs, text in each tab etc) to editor-chars files but it doesn't use them.
Is there a option to turn it on, because I think it worked not long time ago.

@nedzadarek You're running an extremely old version of Atom – please update to the latest version (1.8.0) and then follow the Reporting Bugs section of the Contributing guide to see if you can reproduce this in safe mode.

@mnquintana I'm currently running version 1.8 on Windows 7, and Atom does not save my currently open files. If I:

  1. Open Atom
  2. Open a couple files
  3. Close Atom via 'X' or right-click close on application bar
  4. Re-open Atom

My project folders are visible and saved, but previously open files were not

My 2 cents: need to enable "Back Up Before Saving" (backUpBeforeSaving).
This works for a while and then stops and shows the same opened tabs on every app restart - regardless if I adding new or removing old tabs.
Version 1.8.0 on Ubuntu 16.04.

@mnquintana I updated into 1.8 and Atom keeps my opened tabs. Thank you.

I am running 1.8 on Windows 7 and was still seeing this problem until I went to this page: Atom Debugging found the following command to Clear the Window State:
C:\ atom --clear-window-state

It's only been a day, but I have opened and closed it multiple times and so far this has been working.

Can confirm this happens in OSX 10.11.6 when clicking the red close button as opposed to right clicking the dock icon and clicking 'Quit'. This continues to be frustrating for people who are coming from Sublime Text 3 (which gets this 100% right, unless you've specifically asked me if I want to save something, it damn well better be there when I reopen the app...). At the very least there should be the option to open the last workspaces/projects/tabs/unsaved files you were working on from a list of recent sessions. I assumed 'Reopen last item' might do this but it appears to do nothing at all in a new session.

I think this is possibly two separate issues though, because a lot of Windows users are commenting here and Windows does not have the same concept of keeping an app open when closing the last window.

I'm running latest Atom 1.10.0

The Bug is still there (Atom 1.10.2, OS X 10.10.5). I can also confirm, the bug happens once you use the red close Button in OS X, from that point on it's impossible for atom to save any states / sessions correctly. I did the following thing to fix it (Terminal Solution):

  1. Quit Atom entirely if it's still opened by force quiting it if necessary or with killall Atom
  2. Then remove all the session related storage files, etc.:
    rm -Rf ~/.atom/storage ~/.atom/compile-cache && mkdir ~/.atom/storage

When does this Bug get fixed? Nearly a year passed and the bug hasn't been preferentially addressed.

[EDIT:] Okey, removing the storage and compile-cache didn't work entirely, i still have to save a file, from that point on the session / state of this file gets saved and will be reopened on the next relaunch of Atom, otherwise nothing will be opened :( (I mean, even Projects do not get opened, entirely nothing if inside a project a file hasn't been saved at least once).

After experimenting a bit more with it I have found a conclusion, Atom seems not to be able to save any states / sessions after quiting the application with the red close button (OS X). The only way to save a state / session from that point on is to simply save a file (it doesn't matter which project), then the session gets saved and everything will be reopened correctly (projects, tabs, etc.), otherwise not. That's a very weird behavior and makes it hard to work with Atom.

Can this have the needs-reproduction label removed? Seems to be a consensus that this frustrating issue can be triggered consistently by closing Atom with the red close button in OSX.

I just bought MacBook and upgraded to OS Sierra. It's completely new installation of the system. I downloaded Atom from the web page. It's the latest version 1.10.2 I did all the mentioned above potential fixes, but it hasn't fixed it. It's super frustrating. It always opens without project tab and with untitled file. I switched from Linux where everything was working just fine.

I haven't tried removing Atom as it would be just too much, I'd rather change the editor at this point if there is no easy fix for it.

What the past few comments have been describing are by design. Atom purposely does not save state when it is closed via the red close button to maintain consistent with other applications. If you want the state to be saved, exit using the Quit menu instead.

/cc @maxbrunsfeld

What a bizarre statement.

screen shot 2016-10-04 at 16 24 20
screen shot 2016-10-04 at 16 23 43
screen shot 2016-10-04 at 16 23 24
screen shot 2016-10-04 at 16 22 50
screen shot 2016-10-04 at 16 31 19
screen shot 2016-10-04 at 16 32 30

Also applications like Ulysses autosave so there's no need for a save dialog.

Atom now has the same unsaved file behaviour as Sublime if you quit from the menu which is good, but I (and I'm sure many others) almost exclusively quit applications using the red close button.

For me it doesn't really matter if I quit with red button or using command + Q, the session is not saved. And than I'm getting this:

screen shot 2016-10-04 at 16 56 58

It's a totally fresh installation of version 1.10.2 on newly bought MacBook with OS Sierra v 10.12

Hmm, 1.10.2 on Sierra works if I use Cmd+Q or the Atom menu or right clicking the Atom icon in the dock. It's just the red button. It makes no sense.

It's just the red button. It makes no sense.

@mjmasn That's the expected behavior for Mac apps. Same as Sublime.

@maxbrunsfeld I've just explained it's not the same behaviour as Sublime. See screenshots above, Sublime asks if you want to save your unsaved files. Atom just exits, deleting anything you forgot to save. I can't see how this isn't a bug!

Oh, I see. This is specifically for untitled buffers in windows with no project folder. I agree; that is a bug. This issue is being tracked here: https://github.com/atom/atom/issues/10474. Please subscribe there for updates.

@maxbrunsfeld makes sense, that is part of the issue, although it also applies to modified files that were opened from a project folder. Not sure if that's a separate issue entirely or related to #10474?

If there's a project folder, there's no need to prompt because the untitled files are automatically persisted, right?

No because using the red button closes the project window, when you re-open Atom from spotlight / the dock it's just a blank window. If you add the same project folder again the changes are gone.

I recently discovered that you can actually recover the changes later if you open Atom from the terminal with atom . inside the relevant folder. I tend to open Atom with the Cmd+Space Atom Enter sequence or just clicking the dock icon though.

Sublime avoids this situation from being possible by asking if you want to save the changes when clicking the red close button.

Maybe I need to just suck it up and only open Atom from the terminal?

@mjmasn the project state not getting restored when opening a project folder from an empty Atom window has an open issue here https://github.com/atom/atom/issues/11293 which sounds like what you are describing.

My problem was related with "state-store doesn't work because IndexedDB can't open a connection".

I open Atom sometimes as root and some Atom files were stored with root user. I fixed it searching for "IndexedDB" folder & changing the owner of the files. In Ubuntu 16.04 the folder is located at ~/.config/Atom/IndexedDB

Same issue here since few weeks. After removal unneeded tabs and restarting Atom closed cards are still visible.

Two machines, one with Ubuntu 16.04 (problem occurs), one with ArchLinux (no problem there). Atom in newest version (1.11.2).

Since I don't see tab information in ~/.atom/storage/application.json I've start looking in other places. I resolve problem by removing ~/.config/Atom entirely, but I believe that removing one of the subfolders with cache/data would be sufficient.

I'm not sure about nature of the issue, probably after installing Atom I've run in for the first time via console, maybe I've even use sudo for some reason. I've didn't check privileges in ~/.config/Atom before removing it.

@50Wliu
files, tabs (and most importantly, contents) aren't restored when I open Atom again, as Sublime Text 3 does

I'm on Mac OS X Sierra, using Atom 1.12.5;

I'm freaking out , who can help?

@Quilljou don't exit Atom using the red button in OSX. Alternatively say you had ~/some-folder open in Atom, then pressed the red button, open the terminal and run cd ~/some-folder && atom . (nb: atom ~/some-folder doesn't work) and this should restore the previous state (including unsaved files and changes).

Unfortunately this doesn't work if you've added multiple project folders, in that case you'd just see the unsaved files and changes for the first project folder that was opened. Not sure if there's a workaround for that but cd ~/another-folder && atom . doesn't work if you opened some-folder and another-folder in the same workspace.

@mjmasn thx, can't beieve it.In Linux it works fine, I bought a mac for a better working experience. But it let me down.

Unfortunately this doesn't work if you've added multiple project folders, in that case you'd just see the unsaved files and changes for the first project folder that was opened. Not sure if there's a workaround for that

You can reopen a previously-opened multi-folder project using the File | Reopen Project menu.

@maxbrunsfeld I'm running 1.12.6 on OSX macOS and I don't see that menu item :(

screen shot 2016-11-29 at 08 51 07

Ah yeah, sorry. That feature is coming in Atom 1.13.

If anyone experiences this problem on Windows, try quitting not by pressing the cross, but by opening task manager and ending all "atom" processes. This happened to me because Atom wasn't quitting properly.

I've just lost hours of work because my Mac restarted and Atom didn't save anything...

I can't find any logs here to send.

Honest question, why didn't you save your work?
Richard Pablo notifications@github.com schrieb am Sa. 17. Dez. 2016 um
19:40:

I've just lost hours of work because my Mac restarted and Atom didn't save
anything...

I can't find any logs here to send.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/atom/atom/issues/10044#issuecomment-267779246, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AXPuuBtvL1TmkzEv5nb-KgV40EbuVWPyks5rJCyEgaJpZM4G0eoZ
.

@sn0wyfall because the bloody Mac restarted for an update and TBH I didn't bother to save anything, was used to Sublime which keeps every tab saved no matter what.

The Mac should have notified you before it restarted. If you want to turn
off automatic apps updates you can at Preferences > App Store >
Automatically check for updates. And also you really should save your work
at least once every half an hour so nothing like his happens (preferably
more often). You should make this a habit.
Richard Pablo notifications@github.com schrieb am Sa. 17. Dez. 2016 um
20:52:

@sn0wyfall https://github.com/sn0wyfall because the bloody Mac
restarted for an update and TBH I didn't bother to save anything, was used
to Sublime which keeps every tab saved no matter what.

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/atom/atom/issues/10044#issuecomment-267783165, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AXPuuG2PUWilrymPQbci91Q9qPq1z4wtks5rJD17gaJpZM4G0eoZ
.

Wow, had been really liking Atom, but now have just an hour of work believing it to have a buffer save feature or at least ask before quitting.

I was just about to take what I had worked on and put it into a doc and was trying to copy and paste everything. I admit it was a bit of my fault since I hit command-Q instead of command-A for selecting everything. That said, what program does not give a chance to save or ask if you are sure you want to quit if it is not going to save buffers?!

Deleting the ~/.atom/storage folder worked for me.
Thanks!

I've been running into this issue a bunch. It's incredibly frustrating. Only con to the entire IDE. Just had this issue while preforming a restart after package updates. In the past few weeks it was behaving fine but now I'll have to re open all projects. Running on mac 10.11.6

@ben-pelletier In Atom v1.13 there is a new "File > Reopen Project" menu that will allow you to reopen projects more easily.

Summarizing solutions found so far in this loooooong discussion:

  1. rm -rf ~/.atom/storage
  2. rm -rf ~/.atom/compile-cache
  3. Atom -> Preferences -> Settings -> Uncheck "Open Empty Editor On Start"
  4. rm -rf ~/.config/Atom/IndexedDB/*

For me, nothing worked (by itself) until I applied the last one.

Steps 1, 2 and 4 are covered by the standard debugging steps in the Debugging guide in the Atom Flight Manual. Unchecking "Open Empty Editor on Start" doesn't do what most people think it does, so I would be very surprised to hear that it fixes anything.

For me, Atom always spawned the settings tab even though I had closed it, opened new empty tabs and closed Atom.

@Nandan108's rm -rf ~/.config/Atom/IndexedDB/* seems to have done the trick.

Even deleting the whole ~/.atom dir is 100% useless, tried it 2x (1x stable, 1x beta).
At my sierra cmd+q provides the "typical-ide"-behavior. Using the red x isn't the best idea, if I want be productive.
why not to use JetBrains good old sledgehammer phpStorm?! :)

Following link helped me to auto-save untitled tabs.
https://discuss.atom.io/t/how-to-restore-your-previously-opened-tabs-even-non-saved-files/25035

As it mentioned on the Save Session (Atom Package) web page the pkg has been deprecated.
And the functionality has been merged to Atom core.

The catch is Atom's 'project' concept. you have to add project folder to use the Save Session functionality. (also can open project using cmd like ~/.atom desired/dir)
see this link for more info.

fix for macOS: https://youtu.be/3cpOFEpnYP8 - hackish solution, but works great.

atom 1.15
re-opening editor does not save the open tabs and project folder

rm -rf ~/.config/Atom/IndexedDB/

fix this bug

I ran into a similar issue. After running a dev build of Atom, I couldn't do any work in one of my projects. Dev Tools showed a promise rejection with the message "The workspace can only contain one instance of item [object Object]".

I tried removing things, and I was able to get back to work after rm -rf ~/Library/Application\ Support/Atom/IndexedDB. Posting the comment here because this is where I found the solution. Any chance that --safe could blow up the IndexedDB databases? I think the AtomEnvironments db was the source of my troubles, but wiping everything seems pretty safe.

Any chance that --safe could blow up the IndexedDB databases?

No. The point of --safe is to help determine if a problem is due to a community package or Atom itself. Making Safe Mode change state would then make it impossible in some cases for Safe Mode to do its intended job.

If you want to clear Atom's saved state, then use --clear-window-state as documented in the Atom Flight Manual.

Since a couple of weeks my Atom (1.18.0 now, but problem started in 1.17.2) will always start with the Settings openend, at Packages. I had this one tab open once and it seems to have gotten stuck there.

I tried:

rm -rf ~/.atom/storage
rm -rf ~/.atom/compile-cache
Atom -> Preferences -> Settings -> Uncheck "Open Empty Editor On Start"

Did not work.

I would like to try:

rm -rf ~/.config/Atom/IndexedDB/*

However, I'm on Windows (10 x64) and I was unable to find the equivalent file or folder. (find -type f -iwholename "*atom*indexeddb") My Windows experience is not nearly enough to figure that out. Can anyone tell me which file or folder I should delete to get the same effect?

In case it is of any help:

It also makes no difference whether I start Atom by double clicking atom.exe from C:\Users\me\AppData\Local\atom, C:\Users\me\AppData\Local\atom\app-1.17.2 or C:\Users\me\AppData\Local\atom\app-1.18.0.

I tried starting Atom using the atom.cmd from C:\Users\me\AppData\Local\atom\app-1.18.0\resources\cli and I noticed that app-1.18.0\resources\app\apm\bin\node.exe is started with C:\Users\me\AppData\Local\atom\app-1.18.0\resources\cli\atom.js (and with the Settings open at Packages instead of my previously open tabs). I'm not entirely sure if this is what always happens when I start atom.exe from one of the folders above or from the start menu.

@wbkoetsier As I stated in my last message: If you want to clear Atom's saved state, then use --clear-window-state as documented in the Atom Flight Manual.

I can confirm that calling atom with --clear-window-state did the trick for me. I'll keep an eye on it, see if and when this problem occurs again.

@lee-dohm thanks for the reply. I didn't realise that this is basically the same as removing 'indexedDB'.

I am sure lots of these comments have solved this issue, but I did a search and couldn't find the steps I took...
I have the package "restore-windows" installed...
then by deleting the file in .atom/restore-windows/mayBeRestored my problem was solved!

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PanderMusubi picture PanderMusubi  Â·  119Comments

AustP picture AustP  Â·  135Comments

thedaniel picture thedaniel  Â·  132Comments

JamesTheAwesomeDude picture JamesTheAwesomeDude  Â·  103Comments

jlord picture jlord  Â·  121Comments