cd /news/ai-tools/when-firebase-fights-back-debugging-… · home › topics › ai-tools › article
[ARTICLE · art-174836] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=· neutral

When Firebase Fights Back: Debugging App Check, Google Cloud, and a Broken Deploy

A developer traced persistent 401 errors on a Firebase AI Logic endpoint to a leftover App Check debug token that remained active in the production build, overriding the reCAPTCHA v3 provider. A separate Rollup parse error caused by an incorrectly wrapped reCAPTCHA site key was fixed first, and Google Cloud Console showed 100% error rates across the project's APIs while requests were being rejected upstream.

recommendation

Strip App Check debug tokens from production builds and verify the active provider in Cloud Console error rates before assuming the AI endpoint itself is failing.

more in playbook: Running AI in production
by read1 min views2 publishedNov 23, 2026

I spent a good chunk of time this week working through a build that looked fine on paper but kept throwing 401s in production. The stack was Firebase AI Logic, App Check with reCAPTCHA v3, and Vercel. The error was clear. The fix was not.

Here’s what the process actually looked like.

The build was passing. The app was still broken.

First issue: a Rollup parse error on deploy. The reCAPTCHA site key wasn’t wrapped correctly in the provider config — Vite couldn’t parse it. Fixing that got the build green. But the 401s kept coming on the AI endpoint.

The real problem was hiding in plain sight.

A debug token that was fine for local development was still active in the production build. Firebase App Check saw it and tried to use it instead of the reCAPTCHA provider. The Firebase AI Logic endpoint rejected it. One line removed, redeployed, and the connection to Firebase came back.

What Google Cloud showed me

While this was happening, the Cloud Console was showing 100% error rates across the APIs tied to this project. That’s a useful signal — not a panic button, but a clear indicator that something upstream was rejecting requests before they even got processed. What VS Code taught me

Working directly in VS Code, pushing commits manually, reading build logs line by line — it slows you down in a good way. You see exactly what changed and why. That’s how you learn the stack, not just the tool.

The takeaway

Debugging isn’t just fixing errors. It’s building a mental map of how the pieces talk to each other. Firebase, App Check, Vercel, Google Cloud — each one has its own layer. When something breaks, the error usually lives at the boundary between two of them.

── more in #ai-tools 4 stories · sorted by recency
── more on @firebase 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/when-firebase-fights…] indexed:0 read:1min 2026-11-23 · —