◉RORK LABJP
●ANIMATE — Rork can now animate a 3D model of a four-legged animal with 127 ready-made animations (12/2)●FLASH END — Intro pricing for the Gemini Flash models behind your AI features ends on 12/31, 27 days from now●ROUTER — Since expo-router 58.0.32, a reused screen can keep an old param even after it is set to undefined, users report●PODFILE — Once you ship several apps, settle iOS dependency rules early: minimum version, source and pinned versions●ENV — If an eas.json variable is missing during prebuild, check at which stage the value is passed in●COST — Lay out Apple and Google developer fees plus your Rork plan per year to see the real cost of shipping●ANIMATE — Rork can now animate a 3D model of a four-legged animal with 127 ready-made animations (12/2)●FLASH END — Intro pricing for the Gemini Flash models behind your AI features ends on 12/31, 27 days from now●ROUTER — Since expo-router 58.0.32, a reused screen can keep an old param even after it is set to undefined, users report●PODFILE — Once you ship several apps, settle iOS dependency rules early: minimum version, source and pinned versions●ENV — If an eas.json variable is missing during prebuild, check at which stage the value is passed in●COST — Lay out Apple and Google developer fees plus your Rork plan per year to see the real cost of shipping
Articles/Dev Tools
⬡ Dev Tools/2026-10-20Advanced

Why Redeploying Doesn't Fix the Application Error You See Right After a Deploy

Right after I swapped a secret, every page showed Application error. Stale HTML was calling a JS file that no longer existed. Here are a detection script, a build-version check for the edge cache, and a once-only auto-reload, all run and verified.

Cloudflare Workers26Next.js3deploymentcaching4ChunkLoadError

✦ Premium Article

It was the day I swapped a single environment variable and waited for the deploy to finish. When I opened the site to check, the screen was white, with just "Application error: a client-side exception has occurred."

The article pages failed, and so did the home page. The server logs were quiet and the build had succeeded. So I deployed again. It still did not recover.

A redeploy renews the server, but it does not renew the HTML that has already been handed out. This post records the detour I took before noticing that obvious fact, and the line I drew afterward. As an indie developer running a Next.js site on Cloudflare Workers, I wrote it so that anyone in the same spot can get through that evening faster, with steps and code I actually ran.

Two red lines in the console

Opening the browser's developer tools, I found two red lines: __name is not defined and ChunkLoadError.

The first looks like a bug in my own code. But the network tab showed one JS file returning 404, and the body of that 404 was HTML. The browser tried to treat it as JavaScript, and everything after it stopped in a chain.

Every page failed because, I believe, that chunk belonged to a shared part of the app. Only one file was missing, yet the whole screen stopped. The first thing to look at was not the code but the name of the file returning 404.

What was happening: old HTML meets new chunks

Every build puts a hash in the JS file names, and a new build does not ship the files with old hashes. Anyone who still holds old HTML, in the browser or at the edge, is told to fetch the old names.

What is heldFile it callsIn the new build's assets
HTML generated before the deployChunk with the old hashMissing. It returns 404
HTML generated after the deployChunk with the new hashPresent. It loads normally

So the problem is not inside the new build. Old HTML is still being served ahead of the new build. Changing an environment variable or a secret redeploys the Worker with a new build ID, and right after that the mismatch is especially easy to hit.

If only the browser holds the old HTML, a hard reload fixes it, and on some days that was enough. On other days it was not.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦When an Application error appears right after a deploy, you can decide which layer to suspect first instead of redeploying again and again
✦Right after a deploy finishes, you can verify with one script that every JS file your HTML references really exists
✦You can stop old edge-cached HTML from being served ahead of the new build with a few dozen lines added to your own Worker
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-05-09
Building a Rork A/B Testing Platform with GrowthBook and PostHog from Scratch
Drop Firebase and pair GrowthBook with PostHog to ship an A/B testing stack for your Rork apps: SDK wiring, a KV-cached feature endpoint on Cloudflare Workers, sample-size math, SRM checks, and the operational pitfalls.
⬡ Dev Tools2026-05-03
Sign in with Apple in Rork: Server-Side Verification, Account Linking, and the Mandatory Deletion Flow
A Sign in with Apple button that only lives on the client tends to fray on the server before it ever fails review. This guide builds the rest on Cloudflare Workers: a server-issued nonce, ID token verification, prompt authorizationCode exchange, an account deletion flow that revokes properly, and Apple's server-to-server notifications.
⬡ Dev Tools2026-04-30
Rork × AI Moderation Production Guide: Reporting, Auto-Review, and Tiered Sanctions for UGC Apps
A complete production-grade guide to layering AI moderation, reporting, and tiered sanctions into your Rork UGC app. Includes a working three-layer pipeline using OpenAI Moderation, Perspective API, and Cloudflare Workers Queues.