#Server return invalid JSON response. Status Code 500.

19 messages · Page 1 of 1 (latest)

robust mantleBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

grizzled roost
#

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

ripe flare
#

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?

grizzled roost
#

wait, you arent doing fetch req here.. its hard to know the issue with this information

#

also where/how are you using uploadPhoto

wicked bramble
#

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

grizzled roost
#

its probably a 404 or other error

ripe flare
#

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

grizzled roost
#

how long was the time diference between you checking both versions?

ripe flare
grizzled roost
#

btw thanks for video... can you check you browser console and see the network request?

ripe flare
#

ok let me show you but first you can see how it works in version 13.4.9

grizzled roost
#

i also see that you use server actions... i wonder if they broke something there

ripe flare
#

when I check the network area and console in the browser, there is no error

#

only that