The Dreaded 500 Error again

The 500 Error: Trying to get my Django-Python app to display live with vercel hosted with supabase. I tried multiple approaches. I tried so many things I cannot remember. But one of the last things I did was to have my app display a simple line of JSON that says HELLO. It works in development but deployment, I get the sane 500 Error. Even reducing the requirements.txt to a minimal produces the same thing. I am stuck. How do I handle this error in my case.

This Serverless Function has crashed.

Your connection is working correctly.

Vercel is working correctly.

500: INTERNAL_SERVER_ERROR

Code: FUNCTION_INVOCATION_FAILED

ID: cle1::6tmk6-1743047530274-c1dd48758875

These are some of the many things I have done.

Check Build Logs

seems like you’ve successfully deployed your project on Vercel! From the logs, it shows that the build and deployment processes were completed without any errors.

Verify Environment Variables

Checked Environment variable in the app and in vercel

Check vercel.json Configuration

builds and routes sections are set up to serve my app correctly.

Logs and Errors

500 Internal Server: this is the problem

Static Files and Media

Ran collect static

Domain Configuration

Not using custom domin

Test Locally

locally to ensure it works as expected

Simplify Function

To show simple JSON

Simplify requirements

To only a few bare minimum lines

Hi @oldhamtyrone-yahooco, welcome to the Vercel Community!

Sorry that you’re facing this issue. If you need more help, please share your public repo or a minimal reproducible example. That will let us all work together from the same code to figure out what’s going wrong.

My GitHub repo is GitHub - RevHam1/NinjaGold this is a Django/Python app. The name of the project is ninja_gold the name of the app is called ninja_gold_app this is where you will find the main files. Many of the other file come from my failing attempts to solve my problem.

Hi @oldhamtyrone-yahooco, thanks for sharing this. I recommend you follow the directory structure and project configurations from the examples/python/django at main · vercel/examples · GitHub repository. For example, you need to use the api/ folder.

I think that’d solve your issue.

I have changed my code. The GiHub link is GitHub - RevHam1/myNinjaGold I changed it according to what you sent formatting and restructuring it to display

Hello from Vercel!

The current time is 2025-03-28 03:57:30.760050.

Works well in development but when I deploy to vercel I now get a 404 error. Some of the Logs are:

Application errors

BODY_NOT_A_STRING_FROM_FUNCTION
Function
502

MIDDLEWARE_INVOCATION_FAILED
Function
500

MIDDLEWARE_INVOCATION_TIMEOUT
Function
504

EDGE_FUNCTION_INVOCATION_FAILED
Function
500

EDGE_FUNCTION_INVOCATION_TIMEOUT
Function

And Platform errors

The following errors are related to the Vercel platform. If you encounter one of these errors, contact Vercel support.

INTERNAL_EDGE_FUNCTION_INVOCATION_FAILED
Internal
500

INTERNAL_EDGE_FUNCTION_INVOCATION_TIMEOUT
Internal
500

INTERNAL_FUNCTION_INVOCATION_FAILED
Internal
500

INTERNAL_FUNCTION_INVOCATION_TIMEOUT
Internal

I should only have two apps I am trying to deploy. The one with the dreaded and 500 error and now this new one. If it ain’t one thing is another.

Thanks for your help

Much respect

From Tyrone

Still cannot understand….Managed to narrow it to this error

404: NOT_FOUND
Code: NOT_FOUND
ID: cle1::qf9xw-1743185872018-521515f9da2f

With the following build log
Cloning GitHub - RevHam1/myNinjaGold (Branch: main, Commit: a24dede)
Cloning completed: 884.000ms
Restored build cache from previous deployment (B5SjvdNmDUGGWsdeYY2fdmkV9rBL)
Running build in Washington, D.C., USA (East) – iad1
Running “vercel build”
Vercel CLI 41.4.1
WARN! Due to builds existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: Error List
Build Completed in /vercel/output [6ms]
Deploying outputs…
Deployment completed
Uploading build cache [4.00 kB]…
Build cache uploaded: 89.567ms

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