question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Invalid JSON (Unexpected " " at position 4 in state STOP)

See original GitHub issue

Due to: https://github.com/IBM/audit-ci/issues/96

Yarn audit report results:
events.js:167
      throw er; // Unhandled 'error' event
      ^
Error: Invalid JSON (Unexpected " " at position 4 in state STOP)

(It’s visible here: https://travis-ci.org/sumup/circuit-ui/jobs/559411807)

Related: #102

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:27 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
Willianvdvcommented, Oct 28, 2020

We were running into the same problem as described in the first post of this issue. After some debugging, I found out that the string in the buffer where the JSON decoding fails is <--- Last few GCs --->. Kinda strange, I was not expecting this string. Anyway, I’ve upped our --max_old_space_size and can now run audit-ci without issues.

The side effect of this change is that this process now has a significant memory footprint.

4reactions
jzsplkcommented, Mar 10, 2020

same issue here if I use version 2.5.1.

Yarn audit report results:
events.js:167
      throw er; // Unhandled 'error' event
      ^
Error: Invalid JSON (Unexpected " " at position 4 in state STOP)

if I revert to 2.1.0, another error 😂 image

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON Recognized as Invalid Through Stream When Using ...
you could try the solution to set the start pointer position from 0 to 3. I reckon this is quite hacky, but it...
Read more >
Unexpected end of JSON input Error in JavaScript | bobbyhadz
The "Unexpected end of JSON input" error occurs when trying to parse invalid JSON using the JSON.parse or $.parseJSON methods. Trying to parse...
Read more >
fetcherror: invalid json response body at reason: unexpected ...
Generally this error means the response you got is not properly formatted JSON. You can inspect it by console.log() , and parsing the...
Read more >
DataSource.Error: OData: Invalid JSON. Unexpected
The error message means probably a Json-file is corrupted. You can connect the data source in the new report to see if the...
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found