Nutlope / roomGPT

Upload a photo of your room to generate your dream room with AI.
https://www.roomgpt.io/
MIT License
9.78k stars 1.29k forks source link

Generate Getting 500 server error. How to solve this issue. #109

Closed krishnamaurya-96 closed 6 months ago

krishnamaurya-96 commented 6 months ago

When add image facing this issue.

Unhandled Runtime Error SyntaxError: Unexpected end of JSON input app\dream\page.tsx (91:29) @ json

89 | }); 90 |

91 | let newPhoto = await res.json(); | ^ 92 | if (res.status !== 200) { 93 | setError(newPhoto); 94 | } else {

Also getting /generate 500 error .

How to solve this issue?

krishnamaurya-96 commented 6 months ago

Fixed

xxalan commented 6 months ago

I met the same problem, please tell me how you solved it

krishnamaurya-96 commented 6 months ago

In my case downgrade node version 18.16.1 and and also check .env file API details variable name there be KEY instead of TOKEN. This is works only when you facing "/generate getting 500 error".