You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Quitting and re-opening Atom does not save the same tabs I had open #10044
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.
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.
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.
Add a project folder, leave some tabs open, and close Atom.
Repeat Step 2 multiple times for extra fail
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.
Reacted by Daniil Kirichenko, smellflower, Adam Hanna and Andre F de Miranda
@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.
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.
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?! :)
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.
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.
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.
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!
Activity
lee-dohm commentedon Dec 14, 2015
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 executingatom ~/Source/bar, it will open a clean environment (assuming you've never openedbarbefore). 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
atomby itself.I don't know what the save-session package is supposed to do, I've never used it.
winstliu commentedon Dec 14, 2015
Hey @snario, try deleting the
~/.atom/storagefolder as that contains the previous states of the editor (eg what tabs were open). In addition, you shouldn't need to havesave-sessioninstalled 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 😆
lee-dohm commentedon Dec 14, 2015
Hehe ... I was actually going to add that information too, so I'm glad you replied @50Wliu 😆
snario commentedon Dec 14, 2015
You would think so @50Wliu but the project description says:
(source: https://github.com/mpeterson2/save-session)
Regardless, after
rm -rf ~/.atom/storagemy Atom now opens empty every time. Is this a permissions issue?snario commentedon Dec 14, 2015
chmod -R a+rwx ~/.atom/storagedoes 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:
atom ., Atom opensatom ., Atom opens, no tabs are openwinstliu commentedon Dec 14, 2015
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.
snario commentedon Dec 17, 2015
@alexchandel's repro steps:
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.
snario commentedon Dec 20, 2015
rm -rf ~/.atom/compile-cacheseems to fixwinstliu commentedon Dec 20, 2015
@alexchandel can you try @snario's fix and see if that works? Thanks!
jeoje commentedon Jan 16, 2016
Thanks @snario -- This works in Windows as well. Deleting ~/.atom/compile-cache and ~/.atom/storage fixed this for me.
alexchandel commentedon Jan 19, 2016
@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.
winstliu commentedon Jan 19, 2016
@alexchandel Ok, then can you try removing
~/.atom/storageinstead?cobyism commentedon Jan 20, 2016
I was running into this as well, and running
rm -rf ~/.atom/compile-cachefixed it for me immediately.Edit: Running on OSX, Atom 1.4.0
67 remaining items
lee-dohm commentedon Feb 8, 2017
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.
jpalomaki commentedon Feb 14, 2017
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.pepperonas commentedon Feb 22, 2017
Even deleting the whole
~/.atomdir 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?! :)
h2ku commentedon Mar 9, 2017
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.
pepperonas commentedon Mar 15, 2017
fix for macOS: https://youtu.be/3cpOFEpnYP8 - hackish solution, but works great.
reimax commentedon Mar 22, 2017
atom 1.15
re-opening editor does not save the open tabs and project folder
rm -rf ~/.config/Atom/IndexedDB/fix this bug
pwnall commentedon Jun 8, 2017
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--safecould blow up the IndexedDB databases? I think theAtomEnvironmentsdb was the source of my troubles, but wiping everything seems pretty safe.lee-dohm commentedon Jun 9, 2017
No. The point of
--safeis 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-stateas documented in the Atom Flight Manual.wbkoetsier commentedon Jul 31, 2017
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:
Did not work.
I would like to try:
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.exefromC:\Users\me\AppData\Local\atom,C:\Users\me\AppData\Local\atom\app-1.17.2orC:\Users\me\AppData\Local\atom\app-1.18.0.I tried starting Atom using the
atom.cmdfromC:\Users\me\AppData\Local\atom\app-1.18.0\resources\cliand I noticed thatapp-1.18.0\resources\app\apm\bin\node.exeis started withC:\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 startatom.exefrom one of the folders above or from the start menu.lee-dohm commentedon Jul 31, 2017
@wbkoetsier As I stated in my last message: If you want to clear Atom's saved state, then use
--clear-window-stateas documented in the Atom Flight Manual.wbkoetsier commentedon Aug 1, 2017
I can confirm that calling atom with
--clear-window-statedid 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'.
ninjabourbon commentedon Oct 19, 2017
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!
lock commentedon Apr 17, 2018
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!