firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

409 error while deploying to Firebase Hosting

Open khaled6mmd opened this issue 6 years ago • 91 comments

whenever I try to deploy my project to new firebase project with firebase deploy I get this error

⠇  hosting: uploading new files [0/7] (0%)
Error: Task 028c5d7ed641a4a3b636f112e22c192200a3b5932144f1b5d765f73e7c02a6d6 
failed: retries exhausted after 6 attempts

old firebase projects work fine

khaled6mmd avatar Apr 11 '20 05:04 khaled6mmd

Me too!!

mikejlaurie avatar Apr 13 '20 13:04 mikejlaurie

See https://stackoverflow.com/questions/60699826/firebase-hosting-deploy-error-task-5fc-failed-retries-exhausted-after-6-att I changed the "public": "www"," to public": "WWW", in firebase.json and it started working..

mikejlaurie avatar Apr 13 '20 13:04 mikejlaurie

@khaled6mmd please follow the template. There's a lot of information missing. What OS are you on? What version of firebase-tools are you using?

bkendall avatar Apr 13 '20 17:04 bkendall

same is happening to me, tried deploying several times today and nothing. Debian 9 firebase --version: 7.16.1

dalepo avatar Apr 13 '20 19:04 dalepo

@dalepo can you delete the cache that Hosting deploys use and try again? From the root of your project (likely where firebase.json is located), the command will look like rm .firebase/hosting.*.cache (note the beginning period - it's a hidden file)

bkendall avatar Apr 13 '20 22:04 bkendall

thanks for responding @bkendall I already tried deleting the entire .firebase folder

deploying hosting
hosting[my-project]: beginning deploy...
hosting[my-project]: found 1451 files in www
hosting: uploading new files [28/947] (2%)
Error: Task <long-task-string> failed: retries exhausted after 6 attempts

It seems that it gets stuck on certain files, these are mostly minified js files. Earlier it got stuck on the 64th edit: yeah the number seems irrelevant, it gets stuck randomly.

dalepo avatar Apr 13 '20 22:04 dalepo

That's super curious. I'm working with some other people to try to figure this out - I'll follow up when I have news.

bkendall avatar Apr 13 '20 23:04 bkendall

@khaled6mmd please follow the template. There's a lot of information missing. What OS are you on? What version of firebase-tools are you using?

windows 10

firebase 8.0.3

problem got solved after changing path to public then dist/project-name it deployed successfully

khaled6mmd avatar Apr 14 '20 10:04 khaled6mmd

Tried what @khaled6mmd did but still have the same error today.

dalepo avatar Apr 14 '20 20:04 dalepo

That's super strange that changing the path fixes it.

I've been trying to replicate this on a windows machine of my own but besides being kinda slow (old machine? windows node?), I haven't been able to replicate this issue.

I see that number of files isn't an issues (7 and 9xx both above). Are either of you uploading a lot of data? (Like, maybe we'll call a lot 10+ MB?)

bkendall avatar Apr 16 '20 19:04 bkendall

Mine is about 7MB

dalepo avatar Apr 16 '20 20:04 dalepo

In my case around 5Mb

mikejlaurie avatar Apr 17 '20 05:04 mikejlaurie

I think it got fixed on the new cli version 8.1.1. I was able to deploy it.

dalepo avatar Apr 19 '20 19:04 dalepo

same hear

i deploying hosting i hosting[eclassstudent]: beginning deploy... i hosting[eclassstudent]: found 15 files in dist ⠋ hosting: uploading new files [0/2] (0%) Error: Task 3e7c89812bf4fd87f9db14f54068690ed64b8be5e64316c9703f9616bef0b00e failed: retries exhausted after 6 attempts

my site is 3.64 Mb

tharinduvindula avatar May 17 '20 18:05 tharinduvindula

Firebase init

same hear

i deploying hosting i hosting[eclassstudent]: beginning deploy... i hosting[eclassstudent]: found 15 files in dist ⠋ hosting: uploading new files [0/2] (0%) Error: Task 3e7c89812bf4fd87f9db14f54068690ed64b8be5e64316c9703f9616bef0b00e failed: retries exhausted after 6 attempts

my site is 3.64 Mb

Firebase init Then change the path to public Try to deploy again it will deploy but this isn't what you want Firebase init again and change the path back to your website Then try to deploy, works for me every time

khaled6mmd avatar May 17 '20 18:05 khaled6mmd

Firebase init

same hear i deploying hosting i hosting[eclassstudent]: beginning deploy... i hosting[eclassstudent]: found 15 files in dist ⠋ hosting: uploading new files [0/2] (0%) Error: Task 3e7c89812bf4fd87f9db14f54068690ed64b8be5e64316c9703f9616bef0b00e failed: retries exhausted after 6 attempts my site is 3.64 Mb

Firebase init Then change the path to public Try to deploy again it will deploy but this isn't what you want Firebase init again and change the path back to your website Then try to deploy, works for me every time

my case solve when i Firebase init again and again

tharinduvindula avatar May 17 '20 21:05 tharinduvindula

I think it got fixed on the new cli version 8.1.1. I was able to deploy it.

Happened again tonight with another project :/

dalepo avatar Jun 05 '20 02:06 dalepo

I had this problem several times in an older react project, for me, delete .firebase folder solved. But before deploy with build target, i had to deploy with public target and then build. From time to time i keep having this problem, always solved by deleting .firebase folder.

MarceloSavian avatar Jun 07 '20 09:06 MarceloSavian

Is this going to be fixed? I had to revert my hosting apps due to inconsistent file errors, I don't know if this is a problem with the files I upload or the fact that I have to run the command several times to be able to deploy.

dalepo avatar Jun 08 '20 21:06 dalepo

I am running into the same issue, uploading gets stuck at 0%, and fails on some task after 6 attempts. Sometimes it fails for finding the project and doesn't reach uploading step.

But it goes through after multiple attempts for running firebase deploy. Is it failing because the request for upload or lookup hits bad instances?

vchoudhari45 avatar Jun 18 '20 17:06 vchoudhari45