New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firebase Deploy fails for NextJs app with SSR - Failed to replace Run service #6020
Comments
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information. |
I tracked the issue for this down in GCP logs. For anyone else who might hit a similar problem it was due to the length of the Firebase project ID. Although the project ID itself was within the allowed limit the SSR functions that get created from this are prefixed with 'ssr' and then a random ID is appended so all of this was taking it beyond the 46 character limit supported and causing the deployment to fail. |
so what is the solution as of now? |
Using a shorter Firebase project ID was the only way I was able to get this to work. |
Thanks! This worked. |
What worked here? There's nothing that can be done. You can't change the ID and even if I did, the path is still too long. |
Haven't had issues before (have deployed several dozen times prior), but it seems this become an issue now. Debug showing:
|
In case anyone else has this issue: I resolved it by changing the hosting region in my firebase.config to match the project |
@baileykyle worked 🙇 , previously I had migrated to a newer firebase project for the purpose of switching regions, missed it in the config. Though, I'm still surprised that my deploys were working the last few weeks. |
Since I had the same error with my nextjs deployment, I digged into the code and found some information (no solution so far) #7054 (comment) |
I have same issue as @benediktarnold mentioned. Is there any workaround? |
@baileykyle |
Since there is no such thing as a firebase project region the sentence "changing the hosting region in my firebase.config to match the project" didn't make any sense to me initially. But anyway: I played around a bit and changed the frameworksBackend region from europe-west3 to us-central1 (all my other functions are still in europe-west3) the deployment now works. |
Your projects region is typically set when you create a firestore DB or
cloud storage
https://firebase.google.com/docs/firestore/locations
…On Mon, Apr 29, 2024 at 6:58 AM Benedikt Arnold ***@***.***> wrote:
In case anyone else has this issue: I resolved it by changing the hosting
region in my firebase.config to match the project
@baileykyle <https://github.com/baileykyle> Can you please specify the
region you're using to solve this issue? 🙇
Since there is no such thing as a firebase project region the sentence
"changing the hosting region in my firebase.config to match the project"
didn't make any sense to me initially. But anyway: I played around a bit
and changed the frameworksBackend region from europe-west3 to us-central1
(all my other functions are still in europe-west3) the deployment now works.
—
Reply to this email directly, view it on GitHub
<#6020 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMDOL6DFG3UPPKTDDWAHIVLY7YRUTAVCNFSM6AAAAAAZPWD3PKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBSGQZDGMJXGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Well that's not a project location. That's just the location of the firestore database in your firebase project. Cloud storage and functions could and propably have different locations. Each service in your firebase project has a location that is independent from the other services location. For example my firestore database is in From the docs "There's not a global project-level or app-level setting for location" -> https://firebase.google.com/docs/projects/locations But you were right that the problem was related to the region of the SSR function and it's working in some regions but not all. Aligning your frameworks backend region with your firestore database region was just a coincident and shouldn't confuse others looking for a workaround. |
[REQUIRED] Environment info
12.4.0 (with webframeworks experimental feature enabled)
firebase-tools:
12.4.0
Platform:
macOS
[REQUIRED] Test case
Validate that deployment has succeeded.
[REQUIRED] Steps to reproduce
Pre-requisite: Existing NextJS project that requires SSR and Firebase project set up with billing enabled.
[REQUIRED] Expected behavior
Expect static files and functions for SSR to be deployed to firebase project
[REQUIRED] Actual behavior
Deployment step fails. SSR function seems to have been deployed but static site hosting has not and project hosting URL shows no site deployed. Console fail has the following output:
Error: Failed to replace Run service projects/...
The text was updated successfully, but these errors were encountered: