Since it looks like the error seems to have something to do with pulling json data from the server, I tried starting from a blank db, but the error persists. The error seems to be called in an infinite loop presumably as react continuously tries to connect to the server and eventually crashes the browser.

EDIT:

I've checked the server response with chrome dev tools and chrome REST client, and the data appears to be proper json.

EDIT 2:

It appears that though the intended API endpoint is indeed returning the correct json data and format, react is polling

http://localhost:3000/?_=1463499798727

instead of the expected

http://localhost:3001/api/threads

.

I am running a webpack hot-reload server on port 3000 with the express app runnning on port 3001 to return the backend data. What's frustrating here is that this was working correctly the last time I worked on it and can't find what I could have possibly changed to break it.

The wording of the error message corresponds to what you get from Google Chrome when you run JSON.parse('<...'). I know you said the server is setting Content-Type:application/json, but I am led to believe the response body is actually HTML.

with the line console.error(this.props.url, status, err.toString()) underlined.

The err was actually thrown within jQuery, and passed to you as a variable err. The reason that line is underlined is simply because that is where you are logging it.

I would suggest that you add to your logging. Looking at the actual xhr (XMLHttpRequest) properties to learn more about the response. Try adding console.warn(xhr.responseText) and you will most likely see the HTML that is being received.

Email codedump link for &quot;SyntaxError: Unexpected token &lt; in JSON at position 0&quot; in React App