409 error while deploying to Firebase Hosting
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
Me too!!
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..
@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?
same is happening to me, tried deploying several times today and nothing. Debian 9 firebase --version: 7.16.1
@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)
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.
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.
@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
Tried what @khaled6mmd did but still have the same error today.
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?)
Mine is about 7MB
In my case around 5Mb
I think it got fixed on the new cli version 8.1.1. I was able to deploy it.
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
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
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
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 :/
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.
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.
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?