jupyter / jupyter/atom-notebook

Uncaught SyntaxError: Unexpected end of JSON input

Open
#62 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
301
Forks
48
PR merge metrics
No merged PRs in 30d

Description

[Enter steps to reproduce:]

1. ...
2. ...

**Atom**: 1.14.3 x64
**Electron**: 1.3.13
**OS**: Mac OS X 10.12.3
**Thrown From**: [jupyter-notebook](https://github.com/jupyter/atom-notebook) package 0.0.9

### Stack Trace

Uncaught SyntaxError: Unexpected end of JSON input

```
At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html#%7B%22initialPaths%22%3A%5B%22%2FUsers%2Fblueskywalker%2Fworkspace%2Fgithub.com%2Fjunkyard%2Feval%2Fpython%22%5D%2C%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2FUsers%2Fblueskywalker%2Fworkspace%2Fgithub.com%2Fjunkyard%2Feval%2Fpython%22%2C%22initialLine%22%3Anull%2C%22initialColumn%22%3Anull%2C%22forceAddToWindow%22%3Afalse%7D%5D%2C%22windowInitializationScript%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%2Fsrc%2Finitialize-application-window.js%22%2C%22resourcePath%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22profileStartup%22%3Afalse%2C%22clearWindowState%22%3Afalse%2C%22env%22%3A%7B%22__CF_USER_TEXT_ENCODING%22%3A%220x1F5%3A0x0%3A0x0%22%2C%22TMPDIR%22%3A%22%2Fvar%2Ffolders%2F9q%2F8rdrjdgj0n396_srr25lbn700000gn%2FT%2F%22%2C%22HOME%22%3A%22%2FUsers%2Fblueskywalker%22%2C%22SHELL%22%3A%22%2Fbin%2Fbash%22%2C%22SSH_AUTH_SOCK%22%3A%22%2Fprivate%2Ftmp%2Fcom.apple.launchd.CLvqmFMfxF%2FListeners%22%2C%22Apple_PubSub_Socket_Render%22%3A%22%2Fprivate%2Ftmp%2Fcom.apple.launchd.iFLvwVofBn%2FRender%22%2C%22DISPLAY%22%3A%22%2Fprivate%2Ftmp%2Fcom.apple.launchd.5yuBjknoLJ%2Forg.macosforge.xquartz%3A0%22%2C%22PATH%22%3A%22%2Fusr%2Fbin%3A%2Fbin%3A%2Fusr%2Fsbin%3A%2Fsbin%22%2C%22LOGNAME%22%3A%22blueskywalker%22%2C%22XPC_SERVICE_NAME%22%3A%220%22%2C%22COMMAND_MODE%22%3A%22unix2003%22%2C%22USER%22%3A%22blueskywalker%22%2C%22XPC_FLAGS%22%3A%220x0%22%2C%22GOOGLE_API_KEY%22%3A%22AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q%22%2C%22ATOM_HOME%22%3A%22%2FUsers%2Fblueskywalker%2F.atom%22%7D%2C%22appVersion%22%3A%221.14.3%22%2C%22atomHome%22%3A%22%2FUsers%2Fblueskywalker%2F.atom%22%2C%22shellLoadTime%22%3A671%7D:1

SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at NotebookEditor.parseNotebookFile (/packages/jupyter-notebook/lib/notebook-editor.js:243:19)
at NotebookEditor.loadNotebookFile (/packages/jupyter-notebook/lib/notebook-editor.js:217:29)
at /packages/jupyter-notebook/lib/notebook-editor.js:34:12)
at openURI (/packages/jupyter-notebook/lib/main.js:90:80)
at Workspace.module.exports.Workspace.openURIInPane (/app.asar/src/workspace.js:501:22)
at Workspace.module.exports.Workspace.open (/app.asar/src/workspace.js:436:19)
at TreeView.module.exports.TreeView.fileViewEntryClicked (/app.asar/node_modules/tree-view/lib/tree-view.js:486:40)
at TreeView.module.exports.TreeView.entryClicked (/app.asar/node_modules/tree-view/lib/tree-view.js:474:14)
at /app.asar/node_modules/tree-view/lib/tree-view.js:190:26)
at /app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at /app.asar/node_modules/jquery/dist/jquery.js:4121:28)
```

### Commands

```
```

### Non-Core Packages

```
aligner-python 1.0.1
atom-beautify 0.29.17
atom-python-run 0.7.3
autocomplete-haskell 0.7.2
autocomplete-json 5.2.0
autocomplete-python 1.8.57
column-select 0.2.0
environment 1.3.1
git-plus 7.3.2
go-debug 1.0.4
go-plus 5.1.1
go-signature-statusbar 1.2.0
haskell-ghc-mod 1.19.7
hyperclick 0.0.40
jupyter-notebook 0.0.9
kite 0.10.5
language-groovy 0.6.0
language-haskell 1.12.1
language-scala 1.1.8
linter 1.11.23
linter-rubocop 0.5.3
merge-conflicts 1.4.4
node-debugger 1.10.1
platformio-ide-terminal 2.3.0
python-debugger 0.2.0
python-tools 0.6.9
scala-worksheet-plus 0.4.2
script 3.14.1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with lib/notebook-editor.js, especially parseNotebookFile at line 243 and loadNotebookFile at line 217, then follow the opening path from lib/main.js. Try opening the affected notebook through the Atom tree view and determine the input that triggers the JSON parse error. Done means the notebook opens without the uncaught SyntaxError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jupyter-notebook
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.