Next.js Discord

Discord Forum

Server return invalid JSON response. Status Code 500.

Unanswered
fek posted this in #help-forum
Open in Discord
Original message was deleted.

19 Replies

the error that you showed us (json parse), is because it can't parse the query json (ie {"key":"value"})...
you should console.log the .text instead of json to see the response
Thank you very much for your quick response. But I don't understand exactly what the problem is, could you please explain a little more?
wait, you arent doing fetch req here.. its hard to know the issue with this information
also where/how are you using uploadPhoto
Classic problem where you try to use .json but the response is html
Its probably happening in the background too. You'll have to find the source
its probably a 404 or other error
In version 13.4.9 everything works fine. So it works on localhost and when deployed. But when I upgraded to version 13.5, it gave an error when I deployed it. It was working localhost.
Now let me throw the codes again
how long was the time diference between you checking both versions?
13.5.3
btw thanks for video... can you check you browser console and see the network request?
ok let me show you but first you can see how it works in version 13.4.9
i also see that you use server actions... i wonder if they broke something there
when I check the network area and console in the browser, there is no error
only that
I really don't understand why, I guess I have no choice but to downgrade and use the old version :/