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.

Debugger stops at "SyntaxError: Unexpected token in JSON at position 1"

See original GitHub issue

I’m using Google Chrome 56.0.2924.87 (Official Build) (64-bit) and I’m unable to edit any of my files without the following error happening:

I’m trying to edit the default files generated when create-react-app myapp is run.

It works fine on Google Chrome 58.0.3021.0 (Official Build) canary (64-bit)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

gaearoncommented, Feb 27, 2017

OK, I just looked at it, and this is coming from a fetch polyfill. However, as I mentioned earlier, there is no problem in this.

The error is intentionally thrown and caught. It should have zero effect on your code. It is not a crash because it gets caught.

If you’re wondering why debugger stops at it, it is because you left “Pause on Caught Exceptions” checked:

screen shot 2017-02-27 at 3 08 40 pm

Uncheck it, and debugger won’t stop there.

If you’d rather leave it checked to stop in your code early, you may also right-click on the line that throws and choose “Never pause here”:

screen shot 2017-02-27 at 3 09 24 pm

You’ll need to do this a couple more times since there are a few places where it could throw, but then you should be good and never pause there.

I hope this helps!

Carpetfizzcommented, Feb 27, 2017

That did the trick, thank you so much for taking the time to look into it. My productivity has definitely increased 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unhandled error in debug adapter: SyntaxError - Stack Overflow
Unhandled error in debug adapter: SyntaxError: Unexpected token L in JSON at position 0 at JSON.parse (<anonymous>) at ...
Read more >
What Is JSON and How to Handle an “Unexpected Token” Error
The first thing to do in this situation is to confirm where the error is happening exactly. To ensure the error happens on...
Read more >
How to Fix SyntaxError: Unexpected token < in JSON at ...
Usually this error is caused when your server returns HTML (which typically begins with <DOCTYPE html> or <html> ) instead of JSON. Valid...
Read more >
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
The JavaScript exceptions thrown by JSON.parse() occur when string failed to ... SyntaxError JSON.parse: unexpected character // at line 1 column 14 of...
Read more >
Cannot View Jobs – Unexpected token < in JSON at position 2
Hello! Our page has stopped displaying jobs, and the loading graphic just spins. The console shows the following error: parsererror: SyntaxError: Unexpected ......
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 Post

No results found

github_iconTop Related Hashnode Post

No results found