Firebase hosting deploy error "HTTP Error: 404, Not Found"

firebase deploy
firebase deploy not working
firebase hosting setup complete
firebase hosting php
firebase hosting pricing
firebase deploy hosting not working
firebase hosting nodejs
firebase hosting react

I don't know if this is related to the recent bump of firebase-tools to 6.0 or not. But I'm unable to deploy my files to a hosting project.

The output after I type firebase deploy:

=== Deploying to 'legofun-8f22d'...

i  deploying hosting
i  hosting[legofun-8f22d]: beginning deploy...
i  hosting[legofun-8f22d]: found 42 files in /_site
(node:10178) UnhandledPromiseRejectionWarning: Error
    at new FirebaseError (/usr/lib/node_modules/firebase-tools/lib/error.js:9:18)
    at Object.reject (/usr/lib/node_modules/firebase-tools/lib/utils.js:67:31)
    at /usr/lib/node_modules/firebase-tools/lib/deploy/hosting/prepare.js:48:26
    at arrayEach (/usr/lib/node_modules/firebase-tools/node_modules/lodash/lodash.js:516:11)
    at Function.forEach (/usr/lib/node_modules/firebase-tools/node_modules/lodash/lodash.js:9344:14)
    at module.exports (/usr/lib/node_modules/firebase-tools/lib/deploy/hosting/prepare.js:29:7)
    at _chain (/usr/lib/node_modules/firebase-tools/lib/deploy/index.js:22:40)
    at /usr/lib/node_modules/firebase-tools/lib/deploy/index.js:63:16
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
(node:10178) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10178) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠏  hosting: adding files to version [0/42] (0%)(node:10178) UnhandledPromiseRejectionWarning: Error
    at new FirebaseError (/usr/lib/node_modules/firebase-tools/lib/error.js:9:18)
    at module.exports (/usr/lib/node_modules/firebase-tools/lib/responseToError.js:38:12)
    at Request._callback (/usr/lib/node_modules/firebase-tools/lib/api.js:37:35)
    at Request.self.callback (/usr/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request. (/usr/lib/node_modules/firebase-tools/node_modules/request/request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage. (/usr/lib/node_modules/firebase-tools/node_modules/request/request.js:1083:12)
(node:10178) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)

Error: HTTP Error: 404, Not Found

I had the same problem

In my case I fixed it by adding on the firebase.json a dot before /dist on public tag "public": "./dist/my-app-name",

Example of my json

{ "hosting": { "public": "./dist/my-app-name", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } }

Valid targets are: database,storage,functions,hosting. hosting error image run firebase init again. When you are asked for - Which Firebase CLI features do you want to setup for this folder? then run firebase deploy. I have a vue application, I install firebase tools and upload the application to firebase hosting, the first time all done and I make npm run build and firebase deploy, but when I realise any change, and later do npm run serve or build or firebase deploy I have the next error:

Get started with Firebase Hosting. Contents; Before you begin; Step 1: Install the Firebase CLI; Step 2: Initialize your project; Step 3: Deploy to  > firebase deploy Error: Authorization failed. This account is missing the following required permissions on project deploy: firebase.projects.get firebasehosting.sites.update npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! n00001@0.0.0 deploy: `firebase deploy` npm ERR! Exit status 1 npm ERR! npm ERR!

I had a similar error while trying to follow the Starting with React Most Wanted codelab step "Prepare Firebase Databases"

Error: HTTP Error: 404, Project 'react-most-wanted-ef689' does not exist.

Where 'react-most-wanted-ef689' would contain the name of any project.

It seems that I didn't set up Firestore properly. Missing step:

Activate Firestore for the project and specify the Resource Location Id by following Get started with Cloud Firestore.

I don't think it was in the codelab, so maybe this is something new since the codelab was written.

firebase target:apply hosting blog my-cool-blog firebase deploy blog. The first line works, but getting error when try to deploy: ERROR: too  Firebase Hosting will display the content of this custom 404.html page if a browser triggers a 404 Not Found error on your domain or subdomain. Configure redirects Optional

I a similar issue and had to run the following to make it work

npm install firebase-functions@latest firebase-admin@latest --save
npm install -g firebase-tools

See Get started: write and deploy your first functions for more details.

Trying to deploy a Firebase app with cloud functions and getting an error: Currently, if your project only contains Firebase Hosting files + Database rules, it will  For removing firebase hosting deployment errors (also if you are updating existing hosted site) you can do process again 1] firebase login 2] firebase init 3] firebase deploy Make sure your current folder has two things: public folder (which contains all files index.html) And firebase.json file

Changed the public directory reference. Deploy. It will give error. Changed it back to original. Serve then check. Deploy.

Part One: Angular with Firebase Hosting; Part Two: Angular with Firestore — Intro for firebase hosting; Build Angular application for production; Deploy to the world the app-routing.module.ts file to support our home component and error​  Firebase Hosting provides fast and secure hosting for your web app, static and dynamic content, and microservices. This resource may not be available in your region. Firebase Hosting is production-grade web content hosting for developers. With a single command, you can quickly deploy web apps and serve both static and dynamic content to a global CDN (content delivery network).

In this guide, you will learn how to deploy your Gatsby site to Firebase Hosting. Firebase Hosting is a free web content hosting platform… I am trying to deploy on firebase. I have deployed in the past and it was working fine. I tried to deploy a few days ago and I am told the deployment is complete, I am getting no errors, however, when I go to the Hosting URL my old website was there.

Error: Cannot understand what targets to deploy. Check that you specified valid targets if you used the --only or --except flag. Otherwise, check your firebase.json to ensure that your project is initialized for the desired features. @pedrosnk "firebase init" should have populated firebase.json with the correct default options.

firebase deploy --only hosting fails with the attached log and with the "500 internal error" message firebase deploy --only functions works as expected Again the same codebase deploys without issues into the alternative dev project. Reverting to the previously deployed code doesn't solve the problem.

  • try updating your firebase-tools ? :S
  • I did already, just in case :)
  • I'm having the same problem. Ever since I ran firebase target:apply hosting. Here's a screenshot:
  • for those on multiple site using firebase target:apply hosting do not forget to add, "target": "targe-name",