digitros / nextjs-fastapi

https://nextjs-fastapi-starter.vercel.app
MIT License
390 stars 112 forks source link

Meet 500 error in /api/python #19

Open olllo-top opened 2 months ago

olllo-top commented 2 months ago

I use the Deploy Your Own -> You can clone & deploy it to Vercel with one click to deploy the default version in vercel. But meet the 500 internal server error after successful deployment in the link of /api/python. And I try several times, the same issue is appear. I check the log of vercel of this project, bellow is the detail info: using Asynchronous Server Gateway Interface (ASGI) LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html [ERROR] TypeError: Queue.init() got an unexpected keyword argument 'loop' Traceback (most recent call last):   File "/var/task/vchandlerpython.py", line 305, in vc_handler     response = asgi_cycle(__vc_module.app, body)   File "/var/task/vchandlerpython.py", line 202, in call     self.app_queue = asyncio.Queue(loop=loop)

Do I miss any step in deploy process?

MichelML commented 1 month ago

+1

MCredbear commented 1 month ago

I solved it, change the nodejs version to 18.x fixed it

akshay7892 commented 1 month ago

I solved it, change the nodejs version to 18.x fixed it

For newbies like me what this means is

  1. Click on your project
  2. Click on Runtime Logs
  3. Click on "Settings" next to "Storage"
  4. Scroll down until you see "Node.js Version"
  5. Click on drop-down and select "18.x" and click on "Save"
  6. Redeploy your project