Sudden 404 Error in Firebase Studio Project

Hi everyone,

My Firebase Studio project was running perfectly on IDX. Suddenly, my app stopped working and started giving 404 errors. I hadn’t touched any JSON file when the issue appeared. I tried downgrading Next.js from version 15 to 14.2.5, but the problem persists.
When I test the app at:

https://6000-firebase-studio-1753775372527.cluster-htdgsbmflbdmov5xrjithceibm.cloudworkstations.dev/dashboard

it shows a 404 error. My folder structure is correct, and I am using the app route properly.
Is anyone else facing this, or is there an update on IDX that could be causing this issue?
Thanks for any help.

A 404 error means that you are attempting to load a page that your Next.js app doesn’t have a route for. Next.js is failing to render this route. It could be that Next.js isn’t building for another reason and is unable to render any route. Review the server build logs in code mode to see if you are building successfully.

If your app is building successfully (I suspect it isn’t) then look at this log for which route is giving the 404 and ask Gemini to fix it.

I was curious as to how this ended. Did asking Gemini to fix it work? I would also like to know what happened prior to the 404-error showing up.

Hi,

Thanks for sharing the details. It sounds frustrating! A few things you could check:

  1. Next.js Version Compatibility: Even though you downgraded to 14.2.5, some Firebase Studio or IDX updates might expect a newer version. Double-check the compatibility notes for your current Firebase Studio version.

  2. Deployment / Hosting Config: Sometimes 404s happen if the build output isn’t being served correctly. Make sure your firebase.json (or equivalent hosting config) points to the correct output or build directory for Next.js.

  3. App Folder Routing: Since you’re using the app route, verify that your route names exactly match the expected paths — a small mismatch can trigger 404s even if your folder structure looks correct.

  4. IDX Updates: It’s possible IDX pushed a backend change affecting route resolution. If you have access to their changelog or status updates, check for recent deployments or breaking changes.

  5. Test Locally: Try running next build && next start locally in production mode to see if the 404 happens there as well. This can help determine if it’s a deployment issue vs. a framework/IDX issue.

If none of this works, consider opening a support ticket with IDX/Firebase Studio including the build logs and folder structure that usually helps them pinpoint route issues quickly.

Have you tried clearing .next and rebuilding from scratch? That sometimes fixes mysterious 404s after upgrades or config changes.

Hello, where u able to fix this ?