Clinic v0.6.2 / Node v8.9.4: Error: Invalid JSON (Unexpected "p" at position 24584 in state STOP)
See original GitHub issueThis pops up after hanging at ‘analyzing data’ for a few seconds:
analysing data
events.js:183
throw er; // Unhandled 'error' event
^
Error: Invalid JSON (Unexpected "p" at position 24584 in state STOP)
at Parser.proto.charError (/home/aaron/code/mspdna-ssh/node_modules/jsonparse/jsonparse.js:90:16)
at Parser.proto.write (/home/aaron/code/mspdna-ssh/node_modules/jsonparse/jsonparse.js:154:23)
at Stream.<anonymous> (/home/aaron/code/mspdna-ssh/node_modules/JSONStream/index.js:21:12)
at Stream.stream.write (/home/aaron/code/mspdna-ssh/node_modules/through/index.js:26:11)
at TraceEventDecoder._transform (/home/aaron/code/mspdna-ssh/node_modules/@nearform/clinic-doctor/format/trace-event-decoder.js:114:19)
at TraceEventDecoder.Transform._read (_stream_transform.js:186:10)
at TraceEventDecoder.Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at TraceEventDecoder.Writable.write (_stream_writable.js:290:11)
19:12:39 ⌂131% [aaron@ripley:~/code/mspdna-ssh] [mspdna] develop(+2861/-42)* 1 ±
The instructions say it would be super helpful if I tell clinic to upload some data to the cloud to help with debugging. I’m hesitant to do that on a private project that has SSH keys loaded into memory. What’s “the cloud”, where’s the data going, and who gets to see it? 😉
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
Clinic v0.6.2 / Node v8.9.4: Error: Invalid JSON ... - GitHub
Clinic v0.6.2 / Node v8.9.4: Error: Invalid JSON (Unexpected "p" at position 24584 in state STOP) #9.
Read more >Unexpected token in JSON at position 0, when reading and ...
The error is indicating some unsupported characters at the beginning of ... invalid json syntax (check for quotations, trailing commas, etc.) ...
Read more >What Is JSON and How to Handle an “Unexpected Token” Error
Learn what JSON is and how you can deal with errors occurring when parsing JSON data, such as "Unexpected Token < in JSON...
Read more >Security Bulletin 25 May 2022
SingCERT's Security Bulletin summarises the list of vulnerabilities collated from the National Institute of Standards and Technology ...
Read more >Unexpected token } in JSON at position 65 - Google Groups
the error is telling you that msg.payload is a string, but is not valid JSON. If you pass the message to the Debug...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How about we put that explanation of the files being uploaded into the README? Seems a valid question.
Properly this is because you use Node v8.9.4. There are some issues with Node v8.9.4 that will be fixed in Node 8.10.0. Unfortunately, that hasn’t been released yet. Please try Node v9.4.0 and see if that helps.
The cloud is our Amazon server that is in the US (@mafintosh confirm please) and only the clinic team gets to see it.
I think the more important question is what gets uploaded. There are three files, the information is not sensitive at all. The upload code is in https://github.com/nearform/node-clinic/blob/master/lib/tar-and-upload.js you can confirm yourself that it only uploads the clinic data. The clinic data itself contains three files:
{pid}.clinic-doctor-traceevent
: A JSON file containing GC data and execution timing data (inspect it yourself). This is also the file that is partial.{pid}.clinic-doctor-systeminfo
: A JSON file (inspect it yourself).{pid}.clinic-doctor-processstat
: A protocol buffer file, containing samples of memory usage, cpu usage, delay, and number of handles. You can see the schema here: https://github.com/nearform/node-clinic-doctor/blob/master/format/process-stat.protoCould you tell me if you have any files called
node_trace.2.log
?