Receipts docs
v1.1.0
Get help
● Ship · Fixes

Troubleshooting
errors and their fixes.

Most messages appear in the app's log: the terminal in a local install, or journalctl -u receipts -f on a server. Tip: paste the exact error into the search box.

01Start and install

Windows

The commands on this page are written for bash or zsh on macOS or Linux, or for the Ubuntu server. On Windows, run them in WSL (Ubuntu) or Git Bash.

"Invalid configuration" at start

The app checks every variable in .env before it starts and lists each value it cannot use, one line per problem, for example PORT must be a whole number from 1 to 65535. Secret values are never printed. Correct the named variables (compare with .env.example) and start again.

"Port 8787 is already in use"

Another program (often an older copy of Receipts) uses the port. Find it with sudo lsof -i :8787 and stop it, or set another PORT and point your proxy at it.

The install fails while building better-sqlite3

Install build tools (macOS xcode-select --install; Ubuntu sudo apt install -y build-essential python3) and run the install again.

"process.loadEnvFile is not a function"

Node is older than 20.12. Install Node 22 LTS.

"ADMIN_SECRET_KEY is not set. Using a generated key in …"

Not an error, but move that key into .env as ADMIN_SECRET_KEY and back it up: without it the secrets saved in the console cannot be read.

"Cannot find module …/dist/src/index.js"

The app has not been built yet. Run pnpm build (or npm run build) in the project folder, then start again.

"DeprecationWarning: The punycode module is deprecated"

pnpm start hides this Node 22 notice from a dependency of the Telegram bot library. If you start the app another way and see it, it is harmless.

I lost the setup code

Restart the app: without ADMIN_SETUP_TOKEN, a new code is printed on every start until both accounts exist. If you claimed the site but not the console yet (or the other way round), the new code works for the one still missing. With a token set, use its value from .env.

"Enter the setup token: the value of ADMIN_SETUP_TOKEN in the server environment."

The sign-up or the console did not get the exact token. Copy it from .env without quotes or spaces. After changing .env, restart.

The app stops at start: "ADMIN_SETUP_TOKEN must be at least 24 characters"

Use a longer value (openssl rand -hex 24) or leave it empty.

Console Status page on the demo: one warning, members have a way to pay, and passing checks for wallet addresses, Stripe keys, open-signal prices, seal batches and OpenTimestamps
Status on the demo: one warning, because no keyless payment method is switched on.

02Prices and signals

A signal never fills / no candles for a symbol

Usually the symbol or venue is wrong. The log shows lines starting with [pricing]. Write the symbol exactly as the venue does (ETHUSDT, not ETH/USDT) and check it is listed on that market. Test from the server:

curl "https://api.binance.com/api/v3/klines?symbol=ETHUSDT&interval=1m&limit=1"
curl "https://fapi.binance.com/fapi/v1/klines?symbol=ETHUSDT&interval=1m&limit=1"
curl "https://api.bybit.com/v5/market/kline?category=linear&symbol=ETHUSDT&interval=1&limit=1"

A symbol the venue does not list is refused before sealing. If a symbol stops trading, the signal resolves as not filled six hours after expiry.

Binance answers HTTP 451 (or 403)

Binance blocks its API from some regions, depending on where your server is. Move the server to a region Binance serves, or have providers publish on bybit-spot / bybit-linear. Run the curl tests from the server before you decide.

OpenTimestamps calendars unreachable

The batch is still sealed; only the Bitcoin timestamp is missing. The error is saved with the batch (Anchors) and the anchor job retries. Seal a batch now also retries. Allow outbound HTTPS, or set OTS_CALENDARS to calendars you can reach.

03Stripe webhook

Stripe showsCause and fix
503 "Stripe webhooks are not configured"STRIPE_WEBHOOK_SECRET is empty, or you did not restart after setting it.
400 "webhook signature mismatch"The secret does not belong to this endpoint. Test and live endpoints, and the Stripe CLI, each have their own whsec_.
400 "missing Stripe-Signature"Something other than Stripe called the address, or a proxy removed the header.
400 "webhook timestamp outside tolerance"The server clock is more than 5 minutes off: sudo timedatectl set-ntp true.
200 with "handled":falseDelivered but not for a Receipts payment (another product on the same Stripe account), or an event Receipts does not use. Harmless.

04Payments

"Members have a way to pay" warning in Status

No card, bank or crypto method is set up. Add Stripe keys, or switch on Bank transfer with instructions, or Stablecoins with at least one wallet.

"Every wallet address matches its network" is a blocker

A wallet address does not fit its network: EVM networks need 0x + 40 hex characters; Tron needs a T… address.

"Coupons work with bank and crypto payments"

Coupons do not apply to card payments. Remove the coupon to pay by card, or pay by bank or crypto.

A member paid but has no access

Bank and crypto payments wait under Payments to confirm until you approve them. Card payments need the invoice.paid webhook to arrive.

05Telegram bot

The bot does not react in the group

It must be an administrator of the group. If it still ignores /connect, send /connect@YourBotName, or turn off privacy mode in @BotFather (/setprivacy → Disable), then remove and re-add the bot. Only a linked provider account can connect a group. After a group becomes a supergroup its id changes: send /connect again.

Subscribers do not get invites

The subscriber must link their chat account, the provider must have a connected group and Pro (when charged), and the bot needs the "Invite users via link" right. Errors appear in the log as telegram grant for subscription ….

/long does nothing in the group

Publishing commands work only in a private chat with the bot.

06Accounts and pages

"Form expired" after submitting a form

The page was open too long or cookies are blocked. Reload and submit again.

Login says "Too many attempts"

10 failed attempts from one address within 15 minutes. Wait. Behind a proxy set TRUST_PROXY=1, or every visitor shares the proxy's address.

"This site is being set up. Only the operator email set in ADMIN_EMAIL can create the first account."

The operator has not been claimed yet and ADMIN_EMAIL is set. Sign up with that address and the setup secret (ADMIN_SETUP_TOKEN, or the code from the log).

A script, style or image you added to a page does not load

Every page is sent with a strict Content-Security-Policy (src/web/csp.ts): scripts, styles and fonts only from your own site, no inline event handlers and no eval. Put your file in public/ and link it as /static/your-file.js; inline <script> and <style> blocks written in the templates get the page's nonce automatically. The browser console (F12) names any blocked address; add a trusted host to pagePolicy() if you really need it. Custom CSS from Admin → Brand keeps working.

Push notifications do not arrive

The member must allow notifications in the browser, and Admin → Delivery → Web push must be on. Push needs HTTPS (or localhost).