Help
Troubleshooting
The most common reasons a deployment or an app fails, and how to fix them.
Always start with the Logs tab. The last lines of the log usually name the problem.
The build fails#
| You see | Likely cause | Fix |
|---|---|---|
command not found | The tool is not installed by your build command. | Install it in the build command, e.g. npm ci && npm run build. |
Cannot find module / No module named … | A dependency is missing from package.json / requirements.txt. | Add it, commit, redeploy. |
ENOSPC / out of memory during build | Build needs more memory than your plan. | Use a bigger plan, or reduce parallelism. |
No build output with an index.html was found | Static site with an unusual output folder. | Set Output folder in Settings. |
The output folder '…' was not found or is empty | The build wrote somewhere else. | Fix the folder name, or check the build command. |
The build succeeds but the site shows 502 or "Bad Gateway"#
The app is not answering on its port. Check that:
- it listens on
0.0.0.0, notlocalhost; - it uses the port in
PORT/APP_PORT; - the run command keeps running (it does not exit);
- the Logs do not show a crash right after start.
See Ports and the run command.
"Failed to update project … Another deployment is already running"#
A deployment of this project is in progress. Wait for it to finish, then try again. If one seems stuck for more than 20 minutes, contact support with the project name.
"Payment required"#
The project's paid period has not started or has ended. Open Billing and complete payment, then press Redeploy.
"Your plan is paid until …"#
You cannot change plans until the paid period ends; see Plans and billing.
Python: 400 Bad Request or "CSRF verification failed"#
The domain you are visiting is not in ALLOWED_HOSTS or CSRF_TRUSTED_ORIGINS. See the Python guide. Your settings must read those environment variables.
Python: the admin has no styling#
Static files are not being served. Add WhiteNoise and run collectstatic; see Python.
My uploaded files disappeared after a deploy#
They were stored outside /data. See Persistent storage.
The terminal says the project must be running#
Deploy the project first. A project that failed to deploy, or a stopped database, has no terminal.
My custom domain does not work#
| Badge | Meaning |
|---|---|
| Waiting for DNS | The records are not visible yet. Wait, then press Check DNS. |
| SSL pending | DNS is right; the certificate is being issued. Press Check DNS again in a few minutes. |
| Live | Done. |
Also check for an old A record for the same name, and that Cloudflare's proxy is off while the certificate is issued. See Custom domains.
Auto-deploy does not trigger#
Check that you pushed to the branch set in Settings, that auto-deploy is on, and that the webhook on GitHub shows Recent Deliveries with a green tick. If you changed the repository or branch, turn auto-deploy off and on again.
Still stuck?#
Contact support and include the project name, the time of the problem and the last lines of the Logs.