Uncaught (in promise) SyntaxError: Unexpected end of JSON input

Hello please help. My app gets this error when i deploy it here. My apps runs locally but after deployment it has “Uncaught (in promise) SyntaxError: Unexpected end of JSON input” error. Please help me and Thank you very much.

Here is my stackoverflow question: My Question

Hmm this doesn’t sound like a problem with render per say.

It sounds like you’re getting non-json response from your request. A quick and dirty way to figure out what is happening is throwing some console.logs around to see what is happening.

For example

  1. Check the dev tools > network what http response are you getting from the request? 200? 400? 500?
  2. Log out console.log(response) before trying response.json() - what does it show?
  3. On server side /api/skilledInfo/login - try logging there, are you getting the correct body? Is the db call finding the user returning the correct information?

Just a few things that might get you on the right track.



Here are my console.logs any tips to fix this?

Hey Patrick,

I could attempt to log in via https://adnarimn-ex-frontend.onrender.com/login and it seems to work fine. I’m not seeing any 400s. I believe the issue is solely coming from your code/implementation.

Make sure that your backend server is up when attempting to login.

Jérémy, Render Support

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.