mpeterson2 / save-session

An Atom package to restore your session.
https://atom.io/packages/save-session
MIT License
72 stars 15 forks source link

Unexpected end of input issue error #119

Open DionisiusMayr opened 9 years ago

DionisiusMayr commented 9 years ago

I am still getting that error from the closed issue #54.

Atom Version: 0.210.0 System: Microsoft Windows 7 Professional Thrown From: save-session package, v0.15.5

Stack Trace

Uncaught SyntaxError: Unexpected end of input

At file:///C:/Users/dionisiusma/AppData/Local/atom/app-0.210.0/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%7D%5D%2C%22bootstrapScript%22%3A%22C%3A%5C%5CUsers%5C%5Cdionisiusma%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-0.210.0%5C%5Cresources%5C%5Capp.asar%5C%5Csrc%5C%5Cwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22C%3A%5C%5CUsers%5C%5Cdionisiusma%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-0.210.0%5C%5Cresources%5C%5Capp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22includeDeprecatedAPIs%22%3Afalse%2C%22profileStartup%22%3Afalse%2C%22appVersion%22%3A%220.210.0%22%2C%22shellLoadTime%22%3A332%2C%22initialPaths%22%3A%5B%5D%7D:0

SyntaxError: Unexpected end of input
  at Object.parse (native)
  at C:\Users\dionisiusma\.atom\packages\save-session\lib\files.coffee:14:26
  at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:379:3)

Config

{
  "core": {
    "disabledPackages": [
      "pigments",
      "remember-session"
    ]
  },
  "save-session": {
    "dataSaveFolder": "C:\\Users\\dionisiusma\\.atom\\packages\\save-session\\projects",
    "projects": [
      "C:\\Users\\dionisiusma\\Desktop"
    ],
    "windowX": -8,
    "windowY": -8,
    "windowWidth": 1936,
    "windowHeight": 1066,
    "fullScreen": false
  }
}

Installed Packages

# User
autoclose-html, v0.18.0
color-picker, v2.0.5
highlight-selected, v0.10.1
linter, v0.12.7
minimap, v4.10.0
minimap-highlight-selected, v4.3.0
pretty-json, v0.3.3
save-session, v0.15.5

# Dev
No dev packages
rmenessec commented 9 years ago

Also affected.

4 community packages:

block-cursor line-ending-converter minimap save-session

All current, according to Atom.

Gabriel-p commented 9 years ago

Just got this:

[Enter steps to reproduce below:]

  1. Close tabs that had unsaved changes without saving them.
  2. Close / open atom.

Atom Version: 1.0.0 System: elementary OS Thrown From: save-session package, v0.15.5

Stack Trace

Uncaught SyntaxError: Unexpected end of input

At file:///usr/share/atom/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2Fmedia%2Frest%2Fgithub%2Fmc-catalog%22%7D%5D%2C%22bootstrapScript%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%221.0.0%22%2C%22shellLoadTime%22%3A678%2C%22initialPaths%22%3A%5B%22%2Fmedia%2Frest%2Fgithub%2Fmc-catalog%22%5D%7D:0

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /home/gabriel/.atom/packages/save-session/lib/files.coffee:22:30
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:379:3)

Commands

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "sublime-default-syntax"
    ],
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "linter-python-pep8"
    ]
  },
  "save-session": {
    "dataSaveFolder": "/home/gabriel/.atom/packages/save-session/projects"
  }
}

Installed Packages

# User
atom-alignment, v0.12.1
feedback, v0.38.0
highlight-selected, v0.10.1
linter, v1.0.9
linter-pep8, v0.2.0
linter-pylint, v0.2.2
minimap, v4.10.0
minimap-git-diff, v4.1.3
save-session, v0.15.5
script-runner, v1.8.3
sublime-default-syntax, v0.2.2

# Dev
No dev packages
set-killer commented 9 years ago

+1 :( I have this problem with fresh install of Atom. This is the only community package that i have.

Edit: I think this bug occurs only if you don't have empty line at the end of the "Untitled" file. This way the exception: Unexpected end of input sound more logical.

davmrtl commented 9 years ago

+1 Same problem for me.

bitbonk commented 9 years ago

I just got the same error.

[Enter steps to reproduce below:]

  1. Open Atom
  2. Create some untitled buffers and add some text to each
  3. Close Atom
  4. Reopen Atom
  5. See the error below (doesn't happen always, but often)

Atom Version: 1.0.7 System: Microsoft Windows 7 Ultimate Thrown From: save-session package, v0.15.7

Stack Trace

Uncaught SyntaxError: Unexpected end of input

At file:///C:/Users/Ludewig/AppData/Local/atom/app-1.0.7/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%7D%5D%2C%22bootstrapScript%22%3A%22C%3A%5C%5CUsers%5C%5CLudewig%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-1.0.7%5C%5Cresources%5C%5Capp.asar%5C%5Csrc%5C%5Cwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22C%3A%5C%5CUsers%5C%5CLudewig%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-1.0.7%5C%5Cresources%5C%5Capp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%221.0.7%22%2C%22shellLoadTime%22%3A287%2C%22initialPaths%22%3A%5B%5D%7D:0

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at C:\Users\Ludewig\.atom\packages\save-session\lib\files.coffee:22:30
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:379:3)

Commands

Config

{
  "core": {},
  "save-session": {
    "dataSaveFolder": "C:\\Users\\Ludewig\\.atom\\packages\\save-session\\projects"
  }
}

Installed Packages

# User
save-session, v0.15.7

# Dev
No dev packages
cc0code commented 9 years ago

I also got this error.

  1. After I did an update of a few packages
  2. and did a restart of atom with no tabs left open

Atom Version: 1.0.7 System: Linux Mint Thrown From: save-session package, v0.15.7

Stack Trace

Uncaught SyntaxError: Unexpected end of input

At file:///usr/share/atom/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%7D%5D%2C%22bootstrapScript%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%221.0.7%22%2C%22shellLoadTime%22%3A530%2C%22initialPaths%22%3A%5B%5D%7D:0

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /home/user/.atom/packages/save-session/lib/files.coffee:22:30
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:379:3)

Commands

Config

{
  "core": {
    "autoHideMenuBar": true,
    "disabledPackages": [
      "metrics",
      "autocomplete-clang"
    ]
  },
  "save-session": {
    "dataSaveFolder": "/home/user/.atom/packages/save-session/projects"
  }
}

Installed Packages

# User
language-cmake, v0.1.4
linter, v1.4.3
minimap, v4.13.1
save-session, v0.15.7
tabs-to-spaces, v0.11.1

# Dev
No dev packages