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
Cannot deploy Angular SSR application using firebase deploy #7054
Comments
[REQUIRED] Environment infofirebase-tools:
Platform: [REQUIRED] Test caseDeployment of Next app using Firebase Webframeworks fails due to runtimeClassName HTTP Error: 400 [REQUIRED] Steps to reproduce
[REQUIRED] Expected behaviorUpdate a new version next.js app [REQUIRED] Actual behaviorError:
|
Same issue
Fail to finalize version |
Same issue with Nextjs .Failed to replace Run service projects |
Have the same issue when deploying Cloud Functions 2nd generation. |
Also running into this issue when trying to deploy my React + Next project. [REQUIRED] Environment infoPlatform: macOS Ventura 13.5 package.json
[REQUIRED] Test caseDeployment of React+Next app using Firebase Webframeworks fails due to runtimeClassName HTTP Error: 400 [REQUIRED] Steps to reproduceCreate a Next.js project [REQUIRED] Expected behaviorDeploy the project along with the SSR function. [REQUIRED] Actual behavior
|
Same issue, any solutions? |
Same situation as @Lzak deploying React + Next project. |
I get this issue when trying to add a Cloud SQL connection to Cloud Runs - this was working last week, seems like there was a change that impacts Cloud Run (Annotation logic)? This also seems to affect firebase then |
Same issue as @Lzak from 14 hours ago. |
Same issue in sveltekit deployment as well |
No solution, but I found out what's going on under the hood: firebase-tools makes a GET request for the cloud run resource firebase-tools/src/hosting/runTags.ts Line 102 in 24accb1
The result of that call contains the annotation firebase-tools/src/hosting/runTags.ts Line 144 in 24accb1
Instead of patching the cloud run service using a PATCH call, it uses a PUT call to replace the whole service resource. This PUT call fails with the mentioned error message, since the original result from the GET call above did include the annotation but not the Not sure who to blame here, but I think two parties have bugs:
|
Oh, the replaceService function is calling PUT. |
Oh. I got the documentation links wrong. firebase-tools is using v1 endpoints. Not sure if v1 even had a patch endpoint, but it also lacks documentation for get and put ;-) https://cloud.google.com/run/docs/reference/rest/v1/projects.locations.services |
Same error here... for those in need to deploy immediately, disabling pintags |
Another workaround: Explanation: The cloud run admin api behaves different depending on the region. Some regions return the annotation
|
This works for me, thank you.
report:
|
Hey folks, thanks for all the information you shared, and apologies for the delay. Thanks @benediktarnold and @phminella for sharing your workarounds. I was able to reproduce the issue when setting the region to |
Good catch! I have the error with |
Likewise seeing this issue with updating cloud run labels via gcloud.. |
Same boat as you w respect to CF gen2 |
Hello, I am encountering the same issue as others when trying to deploy my Cloud Function for an Angular SSR application in the europe-west3 region. Initially, I tried disabling firebase experiments:disable pintags, but this did not resolve the problem. Since re-enabling pintags, I have been facing a new error: "Invalid Request. Violations: {runtime_update_policy=Base image update feature is not applicable to 2nd Gen functions.}" Is this issue related to the use of pintags? Are there any ongoing updates regarding this bug? Thank you for your assistance. |
@Camille-D This not only applies to functions related to the Webframeworks but to all 2nd Gen Cloud Functions. Does anyone have a fix yet? |
Hello, I wanted to provide an update on my previous issue regarding the deployment of my Angular SSR Cloud Function in the europe-west3 region. Today, I retried Thank you for the support, and I hope this information might be helpful to others experiencing similar issues. |
Same problem here, us-west1 giving the same error. and |
Same here when using |
Folks, I just tried to deploy my Nextjs project to Firebase without using [2024-05-01T08:03:11.225Z] >>> [apiv2][query] PATCH https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/<My project>/versions/<My Version> updateMask=status%2Cconfig
[2024-05-01T08:03:11.225Z] >>> [apiv2][body] PATCH https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/<My project>/versions/<My Version> {"status":"FINALIZED","config":{"rewrites":[{"glob":"**","run":{"serviceId":"<My project>","region":"asia-east1","tag":"fh-<My Version> "}}],"redirects":[],"headers":[{"glob":"/_not-found","headers":{"x-next-cache-tags":"_N_T_/layout,_N_T_/_not-found/layout,_N_T_/_not-found/page,_N_T_/_not-found"}}],"cleanUrls":true,"trailingSlashBehavior":"REMOVE"}}
[2024-05-01T08:03:12.867Z] <<< [apiv2][status] PATCH https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/<My project>/versions/<My Version> 200
[2024-05-01T08:03:12.867Z] <<< [apiv2][body] PATCH https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/<My project>/versions/<My Version> {"name":"projects/<My Project ID>/sites/<My project>/versions/<My Version> ","status":"FINALIZED","config":{"headers":[{"headers":{"x-next-cache-tags":"_N_T_/layout,_N_T_/_not-found/layout,_N_T_/_not-found/page,_N_T_/_not-found"},"glob":"/_not-found"}],"rewrites":[{"glob":"**","run":{"serviceId":"<My project>","region":"asia-east1","tag":"fh-<My Version> "}}],"cleanUrls":true,"trailingSlashBehavior":"REMOVE"},"labels":{"deployment-tool":"cli-firebase","firebase-web-framework":"next_ssr"},"createTime":"2024-05-01T07:41:47.528736Z","createUser":{"email":"<My Email>"},"finalizeTime":"2024-05-01T08:03:13.222627Z","finalizeUser":{"email":"<My Email>"}}
[2024-05-01T08:03:12.868Z] [hosting] finalized version for <My project>:[object Object]
✔ hosting[<My project>]: version finalized
i hosting[<My project>]: releasing new version...
[2024-05-01T08:03:12.869Z] >>> [apiv2][query] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/<My project>/channels/live/releases versionName=projects%2F<My Project ID>%2Fsites%2F<My project>%2Fversions%2F<My Version>
[2024-05-01T08:03:12.869Z] >>> [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/<My project>/channels/live/releases {}
[2024-05-01T08:03:13.418Z] <<< [apiv2][status] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/<My project>/channels/live/releases 200
[2024-05-01T08:03:13.418Z] <<< [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/-/sites/<My project>/channels/live/releases {"name":"projects/<My Project ID>/sites/<My project>/channels/live/releases/<My release>","version":{"name":"projects/<My Project ID>/sites/<My project>/versions/<My Version> ","status":"FINALIZED","config":{"headers":[{"headers":{"x-next-cache-tags":"_N_T_/layout,_N_T_/_not-found/layout,_N_T_/_not-found/page,_N_T_/_not-found"},"glob":"/_not-found"}],"rewrites":[{"glob":"**","run":{"serviceId":"<My project>","region":"asia-east1","tag":"fh-<My Version> "}}],"cleanUrls":true,"trailingSlashBehavior":"REMOVE"},"labels":{"firebase-web-framework":"next_ssr","deployment-tool":"cli-firebase"},"createTime":"2024-05-01T07:41:47.528736Z","createUser":{"email":"<My Email>","imageUrl":"<My img>"},"finalizeTime":"2024-05-01T08:03:13.222627Z","finalizeUser":{"email":"<My Email>","imageUrl":"<My img>"}},"type":"DEPLOY","releaseTime":"2024-05-01T08:03:13.222Z","releaseUser":{"email":"<My Email>","imageUrl":"<My img>"}}
[2024-05-01T08:03:13.419Z] [hosting] release: {"name":"projects/<My Project ID>/sites/<My project>/channels/live/releases/<My release>","version":{"name":"projects/<My Project ID>/sites/<My project>/versions/<My Version> ","status":"FINALIZED","config":{"headers":[{"headers":{"x-next-cache-tags":"_N_T_/layout,_N_T_/_not-found/layout,_N_T_/_not-found/page,_N_T_/_not-found"},"glob":"/_not-found"}],"rewrites":[{"glob":"**","run":{"serviceId":"<My project>","region":"asia-east1","tag":"fh-<My Version> "}}],"cleanUrls":true,"trailingSlashBehavior":"REMOVE"},"labels":{"firebase-web-framework":"next_ssr","deployment-tool":"cli-firebase"},"createTime":"2024-05-01T07:41:47.528736Z","createUser":{"email":"<My Email>","imageUrl":"<My img>"},"finalizeTime":"2024-05-01T08:03:13.222627Z","finalizeUser":{"email":"<My Email>","imageUrl":"<My img>"}},"type":"DEPLOY","releaseTime":"2024-05-01T08:03:13.222Z","releaseUser":{"email":"<My Email>","imageUrl":"<My img>"}}
✔ hosting[<My project>]: release complete
✔ Deploy complete! Additional info "region":"asia-east1"
npm -v: 10.5.0
npm list -g: firebase-tools@13.7.5
next: ^14.2.3 Update 2 hr later: |
Any update on this? I'm deploying with the region set to |
Not sure if this was luck or if it's officially fixed, but I just had a successful deploy in |
I use |
Hey folks, apologies for the headache. It seems there was a backend issue on the Cloud Run API that caused issues deploying/re-deploying 2nd gen functions. This applies to the Web Frameworks code path since we use the Run API directly. The fix has been rolling out to different regions starting a few days ago, so most of you should be unblocked now (or very soon) |
Thanks @colerogers I noticed cloud run --update labels was working and no longer asking about, presumably, something to do with cloud run's (knative/k8s'runtimeClass) |
[REQUIRED] Environment info
13.7.5
firebase-tools:
macOS / Ubuntu in GitHub Actions
Platform:
[REQUIRED] Test case
Deployment of Angular using Firebase Webframeworks fails due to runtimeClassName error
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
Deployment of hosting and SSR Function should work without problems.
[REQUIRED] Actual behavior
Deployment fails with result:
Error: Failed to replace Run service projects/123456789/locations/us-east1/services/ssrtestdeployxxxxxx
Google Cloud logging tells the following error
spec.template.spec.runtimeClassName: When annotation [run.googleapis.com/base-images] set, runtimeClassName must be set to run.googleapis.com/linux-base-image-update
The text was updated successfully, but these errors were encountered: