node-clinic: Clinic v0.6.2 / Node v8.9.4: Error: Invalid JSON (Unexpected "p" at position 24584 in state STOP)
This 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? 😉
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (11 by maintainers)
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?