Debugger stops at "SyntaxError: Unexpected token in JSON at position 1"
See original GitHub issueI’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:
https://i.stack.imgur.com/hT3ts.png
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:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top 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 Pipe.channel.onread ...
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 >
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 Free
Top 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
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:
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”:
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!
That did the trick, thank you so much for taking the time to look into it. My productivity has definitely increased 👍