6.2.2
Windows,
firebase deploy --only functions
=== Deploying to 'vagtplan-1e00d'...
i deploying functions
Running command: npm --prefix "functions" run lint
> functions@ lint C:\Users\srenb\Documents\Arbejde\skemadoktor.dk\cfunctions\functions
> tslint --project tsconfig.json
Running command: npm --prefix "functions" run build
> functions@ build C:\Users\srenb\Documents\Arbejde\skemadoktor.dk\cfunctions\functions
> tsc
+ functions: Finished running predeploy script.
i functions: ensuring necessary APIs are enabled...
+ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (48.09 KB) for uploading
! functions: Upload Error: HTTP Error: 404, Not Found
Error: HTTP Error: 404, Not Found
Debug shows that it cannot find the required bucket:
Error: HTTP Error: 404, Not Found
[2019-01-15T11:17:12.995Z] Error Context: {
"body": {
"error": {
"message": "Not Found"
}
},
"response": {
"statusCode": 404,
"body": "<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist.</Message></Error>",
It should upload no problem
Fails because it can't find the bucket returned from
HTTP REQUEST POST https://cloudfunctions.googleapis.com/v1/projects/vagtplan-1e00d/locations/us-central1/functions:generateUploadUrl
This error looks project-specific. Please reach out to Firebase support for help, as the issue likely lies with the backend servers and not the Firebase CLI.
Thanks!
@mbleigh Was this project-specific? I am running into the same issue. ? Opened a case (2-2819000025743) as recommended by you, but could be a mistake that I am making?
Having the same issue, its a CLI issue.
There's no way that the CLI should return Error: HTTP Error: 404, Requested entity was not found. on a firebase deploy command.
There's obviously some other error going on but its not being surfaced.
Anyone know where to even look on this?
@oshalygin please open a new issue with the requested information (including parts of the --debug output or firebase-debug.log file)
I have the exact same error.
Any clue?
Well, apparently it's an issue with my internet connection.
I kept getting 404. But then I uploaded my IPA file to Drive and delivered to a friend in other country.
He uploaded the file really fast and successfully.
I have been deploying from TravisCI and have experienced a similar error Error: HTTP Error: 404, Requested entity was not found....
> tslint --project tsconfig.json
1477
1478 no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
1479 Running command: npm --prefix "$RESOURCE_DIR" run build
1480
1481 > functions@ build /home/travis/build/DashboardHub/PipelineDashboard/functions
1482 > tsc
1483
1484 ✔ functions: Finished running predeploy script.
1485 i firestore: checking firestore.rules for compilation errors...
1486 i firestore: reading indexes from firestore.indexes.json...
1487 ✔ firestore: rules file firestore.rules compiled successfully
1488 i functions: ensuring necessary APIs are enabled...
1489 ✔ functions: all necessary APIs are enabled
1490
1491 Error: HTTP Error: 404, Requested entity was not found.
I have also the same problem: Error: HTTP Error: 404, Requested entity was not found.
I ran into this error today. Went to https://console.firebase.google.com/ and created a Firebase project for my Google Cloud project and it started working.
I came across this same error and resolved it by making sure the site name in Firebase matched what I had in my firebase.json file.


Ideally, the site names shouldn't be added to firebase.json. If you use different Firebase projects for staging and production (as recommended by Firebase), having the site names hardcoded in firebase.json poses a problem when you switch between projects with firebase use <projectName>. Site names are unique across projects; no matter which project you use, deploys will be made to the same Firebase site.
Instead, set up deploy targets in .firebaserc. Here's an example of an app that has two Firebase projects (dev and prod), with two sites:
.firebaserc:
{
"projects": {
"dev": "myapp-staging", // alias "dev" to the project "myapp-staging"
"prod": "myapp-prod" // alias "prod" to the project "myapp-prod"
},
"targets": {
"myapp-staging": { // project ID
"hosting": {
"adminpanel": [ // user-defined identifier for the Hosting site, call it whatever you'd like
"myapp-staging-adminpanel" // name of the Hosting site as listed in your Firebase project
],
"catalog": [
"myapp-staging-catalog"
]
}
}
}
}
firebase.json:
{
"hosting": [
{
"target": "adminpanel",
"public": "adminpanel-app/dist",
},
{
"target": "catalog",
"public": "catalog-app/dist"
}
]
}
This way you can switch between, and deploy to, different Firebase projects without having to change your firebase.json.
firebase use dev
firebase deploy --only hosting:adminpanel
firebase use prod
firebase deploy --only hosting:adminpanel
If you add a new target to firebaserc file, make sure you add the same site in the firebase hosting @ firebase console too.
update your Firebase npm package to latest version . I works for me
https://www.npmjs.com/package/firebase
For me updating the firebase-tools package from version 6.12 to the latest one (8.9) fixed this problem.
Had same issue and finally solved it.
**
firebase login
firebase use --add (Choose the right Project ID)
firebase init (select hosting, than correct Project ID)
if needed (npm run build)
firebase deploy**
Solution was number 2 Choosing the right Project ID Because some how firebase commands was refering automatically to a wrong Project ID
Good Luck
It was npm i -g firebase-tools which resolved the issue for me. It updated my old firebase tools.
Hope this helps to someone.
Most helpful comment
I came across this same error and resolved it by making sure the site name in Firebase matched what I had in my
firebase.jsonfile.