Cloudflare Troubleshooting¶
Reproduced and expanded from docs/DEPLOYMENT.md §7, plus additional detail specific to this
portal's own inspection.
| Symptom | Likely cause | What to check |
|---|---|---|
Authentication error [code: 10000] |
Expired/revoked/wrong-scope CLOUDFLARE_API_TOKEN |
Confirm the GitHub secret matches a live token with the right scopes - see Wrangler and docs/DEPLOYMENT.md §6 |
database not found |
database_id in a wrangler.jsonc doesn't match the account being deployed to |
Compare d1_databases[0].database_id against wrangler d1 list for that account |
| Migration step reports a table/column already exists | Migration already partially/fully applied outside CI | wrangler d1 migrations list akshaya-group-global --remote - do not hand-edit D1's migration bookkeeping without understanding it first |
wrangler deploy succeeds but the domain serves old content |
Edge cache, or wrong routes entry |
Check the routes block in that app's wrangler.jsonc; hard refresh before assuming the deploy failed |
| A real client-side route 404s | Not falling through to index.html - usually collides with run_worker_first or a real static file |
Check that app's run_worker_first patterns and public/ contents - see Static Assets |
npm run check:portal-styles-drift fails |
Hand-edited a generated apps/*/public/*/shared.css, or edited packages/ui/src/portal-shared.css without syncing |
npm run sync:portal-styles and commit the regenerated files |
| API response missing CORS headers / browser blocks the request | Calling origin isn't in ALLOWED_ORIGINS |
Check workers/api/wrangler.jsonc's vars.ALLOWED_ORIGINS - note investors.akshayagroupglobal.com is not currently in this list, see Workers |
/api/files/:key returns 404 for a key you know exists |
Key starts with private/ - refused by design, see R2 |
Not a bug - use a non-private key, or the object is genuinely meant to stay unreachable via this route |
A Worker with run_worker_first: true (Admin) behaves oddly on what looks like a static path |
Every path runs the Worker first - a Worker-side bug can affect the whole app | wrangler tail --config apps/admin-web/wrangler.jsonc before assuming it's an asset issue |
Related pages¶
- D1 → Troubleshooting · R2 → Troubleshooting
- Operations → Troubleshooting - the broader, cross-cutting reference with explicit READ-ONLY/MUTATING labels