-
Notifications
You must be signed in to change notification settings - Fork 956
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 serve fails to rewrite URL to containerized app after 8.18.0 #3012
Comments
Just to supplement the description, the URL rewrite still works on the deployed Firebase app. |
Thanks - I'm taking a look into this right now. I just managed to reproduce this so I'm looking into what happened now. |
FWIW - I found this issue last week in my local environment. I only received the error above when developing locally and after deploying to firebase everything worked as intended. |
Ahh! I think I figured it out. The proxy is bringing along the |
[REQUIRED] Environment info
firebase-tools:
$ npx firebase --version
9.1.2
Platform:
macOS
[REQUIRED] Test case
I've create a repo to demonstrate the bug: https://github.com/clarmso/firebase-serve-bug. The repo contains some modified code from examples to demonstrate the bug.
[REQUIRED] Steps to reproduce
rest-api/
. Enable Cloud Run API, install gcloud beta, containerize the app and deploy the container (See steps 2-3 from https://firebase.google.com/docs/hosting/cloud-run).ui/
. Runnpm i
.firebase init
. Make sure to select the newly created firebase project in the setup..firebaserc
should have the correct project name..firebase.json
. Ensure the routes to/api
are rewritten to the Cloud Run service(https://github.com/clarmso/firebase-serve-bug/blob/main/ui/firebase.json#L15). (See step 4 from https://firebase.google.com/docs/hosting/cloud-run)npx firebase serve --debug
.curl http://localhost:5000/api/v1/hello
.[REQUIRED] Expected behavior
v8.18.0 or prior:
curl command is successful:
Here's the relevant snippet of debug log from firebase:
[REQUIRED] Actual behavior
curl command failed:
Here's the relevant snippet of debug log from firebase serve. Note the HTTP 500:
The text was updated successfully, but these errors were encountered: