Table of Contents
- Troubleshooting
- Gmail / OAuth
- "Gmail connection fails" or redirect URI mismatch
- "Access blocked: This app hasn't been verified"
- "Error 400: redirect_uri_mismatch"
- Gmail connects but scan finds 0 candidates
- Review queue
- Export and extraction
- Export fails with "Unauthorized" or auth error
- PDF extraction fails / "Playwright not installed"
- Extracted PDF is blank or garbled
- ZIP download triggers auth error in Docker
- Docker / self-hosting
- Container starts but app is unreachable
- Data doesn't persist between container restarts
- Gmail tokens expire after container restart
- Frontend / browser
Troubleshooting
Gmail / OAuth
"Gmail connection fails" or redirect URI mismatch
The redirect URI in your Google Cloud credentials must match exactly what Billdozer expects. Copy the URI from the setup wizard (Step 1) and paste it verbatim into Authorized redirect URIs in Google Cloud — no trailing slash, correct port.
Default: http://localhost:9191/api/auth/gmail/callback
If you changed the port or run behind a reverse proxy, the URI must reflect that.
"Access blocked: This app hasn't been verified"
This is expected for personal OAuth apps in testing mode. Click Advanced → Go to [app name] (unsafe) to proceed. If that option doesn't appear, make sure your Gmail address is added as a Test user in the OAuth consent screen.
"Error 400: redirect_uri_mismatch"
The redirect URI in Google Cloud does not match what the app sent. Go back to Google Cloud → Credentials → your OAuth client → Authorized redirect URIs and confirm the URI matches exactly (including protocol, host, and port).
Gmail connects but scan finds 0 candidates
- Check the selected year — the scan query is date-scoped.
- Your inbox may genuinely have no matching emails for the search terms and vendor domains.
- If you've scanned before, those emails are already in the DB (idempotent). Try the review page with the All status filter.
Review queue
Review queue is empty
- Check the status filter — make sure it isn't set to a status with no items.
- Check the selected year in the header.
- If you just scanned, wait a moment and refresh.
- Run a rescan from the Setup page — new candidates are only added if not already in the DB.
Item shows "Needs manual download" but I don't see a portal link
Portal links are extracted from the subject line and email snippet using heuristics. If the email doesn't contain a recognizable URL outside of tracking/unsubscribe links, no link is shown. In that case, find the invoice manually and use the upload button on the card.
Export and extraction
Export fails with "Unauthorized" or auth error
The export endpoints require the X-Billdozer-Token session token. The frontend sends this automatically — if it breaks, the token in the UI may have drifted from the server's in-memory value. Refresh the page to re-fetch the current token, or restart the server.
PDF extraction fails / "Playwright not installed"
Run:
.venv/bin/playwright install chromium
This is required for rendering HTML email bodies to PDF. It's a one-time download (~200 MB).
Extracted PDF is blank or garbled
The email body was likely rendered as plain text or contained only tracking pixels. Use the manual upload flow to attach the correct PDF.
ZIP download triggers auth error in Docker
Confirm the container started with the same BILLDOZER_UI_SESSION_TOKEN env var that the frontend expects. If not set, the default is local-dev-token and the frontend fetches it automatically on startup.
Docker / self-hosting
Container starts but app is unreachable
Check that port 9191 is not already in use:
lsof -i :9191
Data doesn't persist between container restarts
You must mount both billdozer.db and the .billdozer/ directory:
docker run -p 9191:9191 \
-v ./billdozer.db:/app/billdozer.db \
-v ./.billdozer:/app/.billdozer \
billdozer
Without these mounts, the database and OAuth tokens are lost on restart.
Gmail tokens expire after container restart
The UI session token resets to default on restart (expected). Gmail OAuth tokens are Fernet-encrypted and persist in .billdozer/tokens.json — as long as the .billdozer/ volume is mounted, you shouldn't need to re-authorize Gmail.
Frontend / browser
Frontend can't reach backend (network errors in console)
- Verify the backend is running on port 9191.
- In development (two-terminal mode), the Vite dev server proxies
/apito:9191. If the backend isn't running, all API calls will 502. - In production mode, the FastAPI process serves both the static frontend and the API on the same port.
Page is stuck loading / blank after deploy
Hard-refresh the browser (Cmd+Shift+R / Ctrl+Shift+R) to clear cached JS bundles from a previous build.