Lo solucione en la consola con: **firebase init apphosting slecciona tu backend sigues los pasos posteriores, ejemplo de como se vera: firebase init apphosting **
=== App Hosting Setup
i This command links your local project to Firebase App Hosting. You will be able to deploy your web app with firebase deploy after setup. Please select an option Link to an existing backend Which backend would you like to link? studio
i === Deploy local source setup Specify your app’s root directory relative to your firebase.json directory / Wrote configuration info to firebase.json
i Writing default settings to apphosting.yaml… File /home/user/studio/apphosting.yaml already exists. Overwrite? Yes Wrote /home/user/studio/apphosting.yaml Firebase initialization complete!
Wrote configuration info to firebase.json Wrote project information to .firebaserc
Gracias @jjara.Ozean! Seguí tus pasos y efectivamente firebase deploy --only apphosting crea el rollout correctamente. El problema es que las variables de entorno del .env no se cargan en el runtime de App Hosting.
Al deployar con este método, el servidor arranca sin las env vars (como NEXT_PUBLIC_FIREBASE_PROJECT_ID, FIREBASE_CLIENT_EMAIL, FIREBASE_PRIVATE_KEY, etc.) y todas las rutas devuelven 500 con “FIREBASE_PROJECT_ID no configurado”. Tuve que hacer rollback al último deploy exitoso que se hizo con el botón Publish de Studio (ese sí inyectaba las env vars).
¿A ti te funcionaron las env vars del .env con firebase deploy --only apphosting? ¿O las tienes configuradas como secrets en Cloud Secret Manager / apphosting.yaml?
Thanks @jjara.Ozean! I followed your steps and indeed, firebase deploy --only apphosting creates the rollout correctly. The problem is that the environment variables in the .env file aren’t being loaded into the App Hosting runtime.
When deploying with this method, the server starts without the environment variables (such as NEXT_PUBLIC_FIREBASE_PROJECT_ID, FIREBASE_CLIENT_EMAIL, FIREBASE_PRIVATE_KEY, etc.) and all routes return a 500 error with “FIREBASE_PROJECT_ID not configured”. I had to roll back to the last successful deployment done with the Studio Publish button (that one did inject the environment variables).
Did the environment variables in the .env file work for you with firebase deploy --only apphosting? Or do you have them configured as secrets in Cloud Secret Manager / apphosting.yaml?
Great news! The issue with the Publish button has been resolved. Deployments triggered directly from Firebase Studio are now processing and completing successfully again. Is it working for you?
Still i face same issue and cannot publish, can you please check my directory, is it normal since there are some files with same name, whats causing the issue
Step 2 - Build: Node.js v20 installed, 1071 packages installed, app image built and pushed successfully
Overall build status: DONE
BUT: No rollout appeared in Firebase App Hosting console despite successful build
Today (via Publish button in Firebase Studio):
Build was never triggered at all
Publish button immediately shows “Something went wrong creating your App Hosting rollout. Please try re-publishing.”
No record in Cloud Build history for this attempt
So the failure point has actually moved earlier in the pipeline:
Yesterday: Publish → Build ✅ → Rollout ❌
Today: Publish → ❌ (fails before build even starts)
Project is Next.js 15 on App Hosting in us-central1. Preview in Firebase Studio works fine. No code changes made. Is anyone else seeing the issue getting worse today rather than resolving?
This is clear, technical, helpful to others, and contains zero sensitive information.
@The_shariq This looks like a Firebase App Hosting infrastructure issue, not something on your end. The fact that it worked yesterday (build succeeded but no rollout) and today it fails even earlier (before build starts) suggests the service is degraded on Google’s side.
Try re-linking the backend: Firebase Console → App Hosting → your backend →
disconnect and reconnect. This forces a fresh rollout configuration
Try deploying from CLI instead of Studio:
firebase apphosting:rollouts:create
This bypasses the Studio Publish button entirely and may work even if the button is broken
Check IAM permissions: Make sure the App Hosting service account still has the required roles (sometimes these get revoked during platform updates). Go to GCP Console → IAM and check for firebase-app-hosting-compute@ service account
Try a different region if possible — if us-central1 is having issues,
creating a new backend in another region could unblock you temporarily
I had a similar issue recently where Publish was failing — it resolved after a few hours on Google’s side. If none of the above works, I’d recommend filing a support ticket through Firebase Console with your build ID from Cloud Build history so they can trace the rollout failure.