firebase-tools: 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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 30
  • Comments: 91 (17 by maintainers)

Most upvoted comments

This is fixed now. If you are having deploy errors still, please file a new issue.

Hey folks, we’ve rolled out a backend change that we think may address this issue. If you’ve been experiencing 409 errors while deploying, can you please try again and see if it’s working now?

Thanks!

@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)

We have a potential server fix ready for this. It should be released within the week. In the meantime, if anyone needs a specific file unblocked because they cannot change the hash, file a bug with Firebase support (https://firebase.google.com/support/troubleshooter/contact) and mention this issue, as well as the your site and hash of the specific file that is blocked.

@ryanjohndias We recently updated our logic for preventing certain race conditions, and it looks like you got caught in an edge case. I believe the error you are encountering stems from the fact that the file (307124415f06d393885dd73538f2f87d3808e22ed667def13a9e7badc5828c9a) was uploaded months ago, then deleted. We’ll work on a server fix for it, but the workaround for you would be to change the file hash by modifying the file slightly.

@ryanjohndias We recently updated our logic for preventing certain race conditions, and it looks like you got caught in an edge case. I believe the error you are encountering stems from the fact that the file (307124415f06d393885dd73538f2f87d3808e22ed667def13a9e7badc5828c9a) was uploaded months ago, then deleted. We’ll work on a server fix for it, but the workaround for you would be to change the file hash by modifying the file slightly.

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…

I had the same issue with an existing site that has deployed hundreds of times successfully previously., 409 error with a large .js chunk file generated by webpack.

WHAT DIDNT WORK: Deleting the .firebase cache didn’t help, reverting firebase-tools version didn’t help, renaming the public folder didnt work, uploading a different build folder which did upload successfully but then re-uploading the original build folder didn’t work

WHAT SUCCESSFULLY WORKED AROUND THE ISSUE: Created a new hosting site within the same project, deployed the site to the new site, then deployed it back to the site that was failing and it worked fine. I can now delete the new site.

I’ve tried versions of firebase-tools all way upto 8.2, I’ve removed firebase caches, I’ve reinstalled firebase, I’ve re-installed my node_modules folder, I’ve tried renaming my upload folder (Firebase calls it public by default, but I’m on React so I had to specify build).

I’ve tried @davidbacisin comment, sorry doesn’t work. Also, my project isnt new, I’ve deployed countless times via Firebase before.

I know and I understand open source library maintenance isn’t an easy job, but at the very least I expected a response from any maintainer at least trying to explain if we’re wrong on our end or something’s wrong with the library.

OS: Ubuntu 20.04, Linux 5.8 Firebase Tools version: 9.10.0 NodeJS version: 14.16.1

I’m also having this issue. File count is around 700 files. Given that the 409 indicates a conflict of some sort, and that it tends to be the same files that keep failing across deployments, is there perhaps a way to remove all existing deployments (or hosted files)? The “current” deployment listed on the Firebase console does not provide any management options

OS: MacOS 11.3 Firebase Tools version: 9.10.0

I solved it by making changes in the 2 files that failed to upload - just added new line at the end 🤷‍♂️

Have the same problem deploying my pretty large site, now when I see this tread and no response from firebase team I realy start to doubt if this is the right vendor for me.

I’m having a similar issue as well.

Running firebase cli version 9.10.0 [2021-05-02T01:23:58.999Z] [hosting][upload] static/css/15.d8f0158a.chunk.css.map (b5a5353d8e3a2194f9dde0bfac5819bc549f9d71bff2e212368e065492142c98) HTTP ERROR 409: [object Headers] Couldn’t process request (status=409)

Deleting my chunk.css.map fixed the problem but it’s odd how only this file was causing an issue. The size of this file is only 259 bytes…

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

I am having the same issue as well. Then deleting all css files in build\static\css\ fixed the problem. now my site doesn’t have css. 😟

So I had to roll back the release.

I tried those things.

  • Deleted node_module folder and re-install.
  • Deleted .firebase folder
  • Changed webpack.config.js file to change the css file location and small file name.
  • Used GitHub action runs on Ubuntu to deploy. (I’m using windows 10)
  • ReInitialize firebase by running firebase init.

Nothing works for me instead of deleting css files.

This is part of the error


[2021-05-05T18:19:21.840Z] [hosting][upload] static/style/8.578.chunk.css (bd53daa561fff6e714cf6b34eb03dc5696984b13639a2ee5f8c6771e0df7caeb) HTTP ERROR 409: [object Headers] Couldn't process request (status=409)
Task bd53daa561fff6e714cf6b34eb03dc5696984b13639a2ee5f8c6771e0df7caeb failed: retries exhausted after 6 attempts
[2021-05-05T18:19:21.842Z] [hosting][upload queue][FINAL] {"max":0,"min":9999999999,"avg":0,"active":0,"complete":1,"success":0,"errored":1,"retried":5,"total":1,"elapsed":27017}
[2021-05-05T18:19:22.284Z] Error: Unexpected error while uploading file.
    at Uploader.uploadHandler (C:\Users\himan\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\hosting\uploader.js:187:19)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Queue.executeTask (C:\Users\himan\AppData\Roaming\npm\node_modules\firebase-tools\lib\throttler\throttler.js:180:22)
    at async Queue.handle (C:\Users\himan\AppData\Roaming\npm\node_modules\firebase-tools\lib\throttler\throttler.js:96:22)

Error: Task bd53daa561fff6e714cf6b34eb03dc5696984b13639a2ee5f8c6771e0df7caeb failed: retries exhausted after 6 attempts

Edit

Adding an extra line for every css files fixed my problem. so I created a script for that and it fixed the problem .( temporary 😉 )

I am having the same issue as well, with a relatively large website too

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