Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected end of JSON input #78

Closed
xanxanxan opened this issue Feb 19, 2017 · 1 comment
Closed

Unexpected end of JSON input #78

xanxanxan opened this issue Feb 19, 2017 · 1 comment

Comments

@xanxanxan
Copy link

Whenever I try to render an audiogram (i can start to render in fact but around "generating frames, 2%", it crashes), the application encounters an "Unexpected end of JSON input".
In the user interface, I get

{"readyState":0,"status":0,"statusText":"error"}

just beneath "Audiogram" and in the terminal, I get

[email protected] start /home/troth/audiogram
npm run postinstall && bin/server

[email protected] postinstall /home/troth/audiogram
mkdir -p editor/js && browserify client/index.js > editor/js/bundle.js

info: Listening on 8888
undefined:1

SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at load (/home/troth/audiogram/lib/transports/redis/fake.js:14:15)
at update (/home/troth/audiogram/lib/transports/redis/fake.js:24:12)
at Object.addJob (/home/troth/audiogram/lib/transports/redis/fake.js:72:5)
at WriteStream. (/home/troth/audiogram/server/render.js:48:16)
at emitNone (events.js:91:20)
at WriteStream.emit (events.js:185:7)
at fs.js:1871:14
at FSReqWrap.oncomplete (fs.js:111:15)

npm ERR! Linux 3.13.0-108-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.2.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: npm run postinstall && bin/server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'npm run postinstall && bin/server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the audiogram package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run postinstall && bin/server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs audiogram
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls audiogram
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/xan/audiogram/npm-debug.log

npm-debug.log says:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 silly lifecycle [email protected]
prestart: no script for prestart, continuing
7 info lifecycle [email protected]start: [email protected]
8 verbose lifecycle [email protected]
start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/troth/audiogram/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
10 verbose lifecycle [email protected]
start: CWD: /home/troth/audiogram
11 silly lifecycle [email protected]start: Args: [ '-c', 'npm run postinstall && bin/server' ]
12 silly lifecycle [email protected]
start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: npm run postinstall && bin/server
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:885:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/troth/audiogram
17 error Linux 3.13.0-108-generic
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v7.2.1
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error [email protected] start: npm run postinstall && bin/server
22 error Exit status 1
23 error Failed at the [email protected] start script 'npm run postinstall && bin/server'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the audiogram package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm run postinstall && bin/server
23 error You can get information on how to open an issue for this project with:
23 error npm bugs audiogram
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls audiogram
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

The strange thing is that some days ago, audiogram worked on this very machine. Maybe I installed distro upgrades but I didn’t change anything specific to my audiogram setup. I’d greatly appreciate any help on this.

@veltman
Copy link
Contributor

veltman commented Feb 20, 2017

It's possible that your jobs file got corrupted, so deleting [folder where you installed Audiogram]/.jobs could be a temporary fix for this.

A more permanent fix is to use Redis as described here: #63 (comment)

@veltman veltman closed this as completed Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants