Comments (16)
There are several reports of this. Something must have broken in the upgrade from 165 to 166.
See atom/atom#4855, See atom/atom#4856
from save-session.
I'm getting this one, myself, in every project I open. I'll take a peek around, see if I can be of any help.
from save-session.
I think @vraravam is onto something with this in #45:
Also noticed that the preference setting for ''dataSaveFolder' (which was set to '/Users/vijay/.atom/packages/save-session/projects') keeps getting removed from the '.atom/config.cson' file and this could be the reason for the beginning value of 'undefined' when this plugin is trying to figure out the location of the 'project.json' file.
save-session prepends dataSaveFolder
to the path to project.json (looked up through @saveFolder
), but since it's now undefined, it's literally prepending "undefined", which results in an invalid path. Looks like the default gets set in @saveFolderDefault
, but I don't see where that gets called. Judging from #44, @wn9FHW2nhO doesn't, either.
from save-session.
@clhynfield what does your config contain for save-session
? Config things did change in 166.
from save-session.
'save-session':
'project': '/Users/clayton/.atom'
'windowX': 0
'windowY': 23
'windowWidth': 1280
'windowHeight': 773
'treeSize': 201
Also, as @vraravam notes in #45, even when I set dataSaveFolder
manually in ~/.atom/config.cson, it's gone again shortly after.
Oh, and it looks like Config.saveFolderDefault
is supposed to be called at package activation time, but even if I yank it out of the conditional, and/or move it up to the top of save-session.coffee, it doesn't seem to set the config.
from save-session.
There were some large config changes in 166. @maxbrunsfeld should know more.
from save-session.
Looking into it now.
from save-session.
My first guess is that it's because dataSaveFolder
is not present in save-session
's config schema. Schemas are now enforced in certain cases where they weren't before.
Looking into it deeper to verify.
from save-session.
Thanks very much, @maxbrunsfeld, that was it. I added this to the default config in save-session.coffee, and the package is working as expected:
dataSaveFolder:
type: 'string'
description: 'The folder in which to save project states'
I'll submit a PR shortly.
from save-session.
Great! Thanks @clhynfield.
from save-session.
Couple of asides out of this:
- Direct file IO seems like a kludgy way to save project/workspace state—is there a more Atom-y way to do this?
- The error messages and stack traces caused by this third-party package didn't implicate the package in any way. I imagine this could cause serious headaches for the core Atom team as packages proliferate.
from save-session.
- The package system already allows packages to save and load state as part of activation and deactivation. I'm not familiar with all of
save-session
's functionality, so I don't know if loading its saved state at package activation time would work. - The notification system will associate errors with packages when possible, but often the stack trace doesn't contain enough information to do this. Perhaps we could use node's domain system to associate async stack traces with the packages that created them, but this might be more work than it's worth.
from save-session.
I figured serialization might be the way to do it. Dunno if @mpeterson2 has looked at that, but if I get the time, I'll see if it'll work. Thanks again, @maxbrunsfeld!
from save-session.
I haven't had time to look into this yet. I see a few of you have forked this, so I'd be happy to accept a pull request if you guys can find a fix.
from save-session.
Working it up now, @mpeterson2. Thanks much.
from save-session.
Just merged a few pull requests in that fixed the issue for me. Thanks for the help guys.
Reopen this if you still have issues.
from save-session.
Related Issues (20)
- content-to-restore isn't erased when an unsaved window is closed
- Is this still working with atom v1.2.1 ? HOT 11
- Uncaught SyntaxError: Unexpected token b
- do not work on os x HOT 1
- Re-deprecate save-session HOT 2
- can not save session HOT 3
- Can this saves file when I stops typing?
- Is there anything in Atom that makes this package possible now? HOT 1
- does not work osx
- Doesnt work on win10
- Uncaught SyntaxError: Unexpected end of JSON input HOT 1
- Uncaught SyntaxError: Unexpected token u in JSON at position 0 HOT 1
- Should not be depricated HOT 3
- Uncaught TypeError: this.promptToSaveItem(...).then is not a function HOT 10
- Multiple tabs Session save
- MAC OS X: Unable to close temp tab
- Uncaught SyntaxError: Unexpected token r in JSON at position 56
- Uncaught Callback must be a function HOT 7
- Uncaught TypeError: invalid options argument HOT 10
- Uncaught TypeError: Callback must be a function. Received undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from save-session.