0

I am working on a React Native App and using Flipper for debugging. Flipper will not consistently stay connected to my application. I thought it had something to do with a miss-patch of Flipper versions in the Podfile. Fixing the version miss-match worked for a short time.

I have a single error now: Failed while retrieving marketplace plugins SyntaxError: Unexpected token < in JSON at position 0

I understand the error. But, I can't track it down, since there is no stack-trace!

Christian
  • 51
  • 7

1 Answers1

0

The Cause This happens when you make a request to the server and parse the response as JSON, but it’s not JSON. The code responsible might look something like this:

fetch('/users').then(res => res.json())

The actual request worked fine. It got a response. But the res.json() is what failed.

Iva
  • 2,447
  • 1
  • 18
  • 28