Repository navigation
Closed
Description
[REQUIRED] Environment info
firebase-tools: 14.17.0
Platform: macOS
[REQUIRED] Test case
firebase.json
{
"functions": [
{
"codebase": "exampleCodebase",
"source": "example-codebase"
}
],
"hosting": [
{
"target": "example-api",
"public": "site/example-api",
"rewrites": [
{
"source": "/v1/**",
"function": {
"functionId": "runApiV1"
}
},
{
"source": "**",
"destination": "/index.html"
}
]
},
{
"target": "example-dynamic",
"public": "site/example-dynamic",
"rewrites": [
{
"source": "**",
"function": {
"functionId": "hostExampleDynamicSite"
}
}
]
},
{
"target": "example-static",
"public": "site/example-static",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
]
}[REQUIRED] Steps to reproduce
- Deploy all sites using
firebase deploy --only hosting
[REQUIRED] Expected behavior
All hosting deployed successfully or deployment failure.
(Deploying the sites individually (e.g. firebase deploy --only hosting:example-dynamic) works)
[REQUIRED] Actual behavior
$ firebase deploy --only hosting
=== Deploying to 'example-project'...
i deploying hosting
i hosting[example-api]: beginning deploy...
i hosting[example-api]: found 3 files in site/example-api
✔ hosting[example-api]: file upload complete
i hosting[example-dynamic]: beginning deploy...
i hosting[example-dynamic]: found 6 files in site/example-dynamic
✔ hosting[example-dynamic]: file upload complete
i hosting[example-static]: beginning deploy...
i hosting[example-static]: found 62 files in site/example-static
✔ hosting[example-static]: file upload complete
i hosting[example-api]: finalizing version...
i hosting[example-dynamic]: finalizing version...
i hosting[example-static]: finalizing version...
⚠ hosting[example-dynamic]: Unable to find a valid endpoint for function `hostExampleDynamicSite`, but still including it in the config
✔ hosting[example-static]: version finalized
i hosting[example-static]: releasing new version...
✔ hosting[example-dynamic]: version finalized
i hosting[example-dynamic]: releasing new version...
✔ hosting[example-static]: release complete
✔ hosting[example-dynamic]: release complete
✔ hosting[example-api]: version finalized
i hosting[example-api]: releasing new version...
✔ hosting[example-api]: release complete
✔ Deploy complete!
Project Console: https://console.firebase.google.com/project/example-project/overview
Hosting URL: https://example-api.web.app
Hosting URL: https://example-dynamic.web.app
Hosting URL: https://example-static.web.app
https://example-dynamic.web.app/subpage site now returns the following:
Error: Page not found
The requested URL was not found on this server.
Activity
fwal commentedon Oct 2, 2025
I made a PR with the deploys running in sequence and that works (#9214) however I'm unsure about any underlying issues that's causing this.
aalej commentedon Oct 2, 2025
Hey @fwal, thanks for the detailed report and for opening up a PR! I was able to reproduce the issue you reported. Though in my case, the rewrites to the function(
curl https://example-dynamic.web.app/subpage) still serves the expected content which is the response from thehostExampleDynamicSitefunction. Sharing my mcve hereI’ll raise this to our engineering team so they can take a look.
fwal commentedon Oct 2, 2025
Hi @aalej and thanks for looking into it! I've tested your mcve and it does indeed not fail.
However, I realize I haven't included the region in my report (sorry about that!): My functions run in
europe-west1and if I update your mcve to reflect that, it too fails when requestingcurl https://example-dynamic.web.app/subpage(probably defaults tous-central1when the function isn't found)Let me know if you or your team need anymore details.
aalej commentedon Oct 2, 2025
You're right! I was able to reproduce the
Error: Page not foundwhen the function region was set to something other thanus-central1, thanks for pointing this out! This definitely looks like a a bug. I'll update the mcve to include this.