Skip to content

Troubleshooting

Start with the bot's Overview: a failed deployment shows its error there. Then open Logs: the build log for build errors, the bot log for errors while running.

Deploy refused

Message Fix
Configure the bot source first. Connect a repository or upload an archive on the Source tab.
This bot has no active subscription. The plan ended. Renew the bot.
Too many deployments for this bot: the limit is 10 per hour. Try again in about N minutes. / Too many starts and restarts for this bot: the limit is 20 per hour. … The bot hit its hourly limit of deployments, or of starts and restarts. Wait the time the message gives; a refused request is not counted.
No server has room for this bot right now. Try again later. Every server is full for a bot of this size. Nothing was changed: the running deployment keeps running. Try again later.
Bot is not active. The bot was disabled, for example for breaking the acceptable use rules. It cannot be deployed until it is enabled again.

Upload refused

Message Fix
Unsupported archive type: upload a .zip, .tar.gz, or .tgz file. Create the archive in one of these formats.
The archive exceeds the 20 MB limit. Leave out node_modules, virtual environments, .git, data files and build output.
Archive contains a link: … / a special file: … Remove symbolic links from the folder, or zip with zip -r (which stores files, not links).
Archive contains an absolute path / a '..' path Create the archive from inside the bot folder: cd my-bot && zip -r ../my-bot.zip .
The archive is empty. / The archive cannot be read. Create the archive again.

Source errors (status Failed, error starts with "Source:")

Message Fix
git clone failed: … Authentication failed / Repository not found The repository is private or the URL is wrong. Check the URL and branch, and add an access token with read access.
git clone failed: … Remote branch … not found The branch does not exist. Check its name (main or master).
git clone timed out after … seconds. The repository is too large or the host is slow. Remove large files from the repository.
Unreadable zip archive. / Unreadable tar archive. Upload the archive again.

Build errors

Message Fix
No Containerfile, Dockerfile, main.py, bot.py, or app.py found. Put the entry point at the root, not in a subfolder: Preparing your code.
Build failed (podman build exit N). A build step failed. Open the build log and look at the last lines: usually a package that does not exist, a wrong version in requirements.txt, or a missing file in COPY.
Build timed out after 900 seconds. The build takes longer than 15 minutes. Use smaller base images and fewer dependencies.

Common causes in the build log:

  • No matching distribution found for …: the version does not exist, or has no build for Python your bot's version (old pins of packages with compiled parts). Fix the pin, or pick an older Python with a .python-version file (for example 3.12).
  • npm ci fails: commit package-lock.json together with package.json.

The bot does not stay up

Message Fix
Bot exited during startup (exit code 1). The bot stopped within 15 seconds. Open Logs: usually a missing variable (KeyError: 'TELEGRAM_BOT_TOKEN'), an import error, or an invalid token.
Bot exited during startup (exit code 137). or crashes with 137 Out of memory. Reduce memory use, or choose a plan with more memory.
Bot crashed 6 times. The bot keeps crashing while running. Fix the error in the log, then Start or Deploy.
Subscription expired. The plan ended and the bot was stopped. Renew it.
Invalid environment variable name … / … contains a line break. Fix the variable on the Variables tab.

The bot runs but does not answer

  • Conflict: terminated by other getUpdates request: the same token runs somewhere else, for example on your computer. Stop the other copy. One token, one running bot.
  • Conflict: can't use getUpdates method while webhook is active: the bot is in webhook mode (BotBarn sets the webhook) but its code polls. Serve the webhook on PORT, or switch the bot to Polling on the Telegram updates card. See Polling or webhook.
  • Webhook bot gets nothing: check the Telegram updates card. In webhook mode it shows when BotBarn set the webhook, or Telegram's error. Check that the bot listens on 0.0.0.0:$PORT (not 127.0.0.1) and serves /. In polling mode with your own webhook, check that it called setWebhook with BOTBARN_WEBHOOK_URL and the current secret. After Rotate secret, deploy again.
  • Unauthorized / InvalidToken: the token was revoked. Paste the new token in the Telegram card and deploy again.
  • Nothing in the log: in Python with your own Containerfile, set PYTHONUNBUFFERED=1.