Sudden 404 Error in Firebase Studio Project (IDX)

My Firebase Studio project was running perfectly on IDX. Suddenly, I didn’t make any major changes except touching a JSON file, and now my entire app has stopped working. I also downgraded my Next.js version from 15 to 14.2.5, but the issue persists.it gives a 404 error. My folder structure is correct, and I am using the app route properly. when i test this app on firebase preview link.

Is anyone else experiencing issues, or is there an update running on IDX that might be causing this?

Thanks for any guidance.

Hey there :waving_hand: — this type of 404 in Firebase Studio’s preview often isn’t about your routing code itself, but about how the preview environment is building and interpreting your routes.

A few things that can cause this suddenly, even if your app structure looks fine:

1. Build manifest drift

  • When a config or JSON file changes, or when you switch framework versions (like from Next.js 15 → 14), the build pipeline may silently regenerate or drop routing entries.

  • That can cause the deployed preview to “lose” routes, even though they work locally.

2. Stale or mismatched preview cache

  • Firebase Studio sometimes holds onto a cached preview build or routes manifest.

  • If it doesn’t rebuild cleanly, you may end up serving an older artifact that still references outdated routes.

Try this clean-reset sequence:

  1. Delete your local .next, .firebase, and node_modules folders.

  2. Reinstall dependencies and rebuild:

    npm install
    npm run build
    
    
  3. Trigger a fresh preview deploy, not an incremental one — make sure caching is disabled or cleared.

  4. Double-check your next.config.js and firebase.json rewrites to ensure nothing was dropped.

If your preview build logs mention “route not found” or “missing manifest entry,” that’s the confirmation — the environment is serving a stale or incomplete bundle. Once the cache is flushed and rebuilt from scratch, routes usually come back immediately.

Hope this helps narrow it down — these 404s are rarely random, they’re almost always linked to how the preview environment cached your routing manifest.