You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Receiving: {"result":{"permit":false},"id":885,"status":"ok"} and non-resolving Promise.all while fetching from emulator storage #3915
Right so this is a bit of a guesswork thing, but I am loading a bunch off files from the storage emulator via a Promise.all call.
These are geojsons that I need to process further. But if the amount of files I load exceeds a certain threshold (I have no clue what the threshold is) it starts to return:
And never resolves the Promise.all. If I play around with the files, meaning load less this goes away and everything is working as expected. The problem is not the files themselves, loading them individually is all fine, just a certain amount becomes troublesome. Is there some kind of data size limit?
[REQUIRED] Expected behavior
I expect, that no matter how many files/file size I throw at Promise.all, it will resolve and not give me any issues
[REQUIRED] Actual behavior
Never resolves, and as a consequence times my cloud function out
Reacted by Jacob Jaffe, Jean-Louis Dinh, Raheel Junaid and Lucas Wiese
By the way, changing the Promise.all to a for loop, and loading the files one by one give the same issue. It seems the storage emulator is limiting in some way the requests maybe?
Can confirm also having this issue when using full emulator suite, not tested on prod. Occurred for me with 7 getDownloadUrl promises in a Promise.allSettled() call. Sometimes all will resolve, sometimes 2 or 3 will fail.
@braadworst try using Promise.allSettled(), so you can confirm that only 3 are sometimes failing.
I can confirm all the things you mention @skam22, @LB-Digital thanks for the info, I can see already how many resolve, I just need the missing ones to do so as well :-) @weixifan any progress on this?
I'm getting the same issue on emulator,
When I'm uploading 3+ files also with promises, it never returns and gets frozen on the front end. Even though the emulator functions execute fully and create thumbnails for the files, I can never complete the upload callback.
upload task gets stuck after first or second upload. this is my upload function if it helps at all
Activity
braadworst commentedon Nov 19, 2021
By the way, changing the Promise.all to a for loop, and loading the files one by one give the same issue. It seems the storage emulator is limiting in some way the requests maybe?
skam22 commentedon Dec 14, 2021
having the same issue here, the promise doesn't resolve, my console outputs:
{"result":{"permit":true},"id":1692,"status":"ok"} {"result":{"permit":true},"id":1693,"status":"ok"} {"result":{"permit":true},"id":1694,"status":"ok"} {"result":{"permit":true},"id":1695,"status":"ok"}those four console only outputs when a promise doesn't resolve. @braadworst are you seeing the same issue with firebase itself?
LB-Digital commentedon Dec 15, 2021
Can confirm also having this issue when using full emulator suite, not tested on prod. Occurred for me with 7 getDownloadUrl promises in a
Promise.allSettled()call. Sometimes all will resolve, sometimes 2 or 3 will fail.@braadworst try using
Promise.allSettled(), so you can confirm that only 3 are sometimes failing.weixifan commentedon Dec 20, 2021
I have filed an internal issue b/211308355 to track.
braadworst commentedon Jan 7, 2022
I can confirm all the things you mention @skam22, @LB-Digital thanks for the info, I can see already how many resolve, I just need the missing ones to do so as well :-) @weixifan any progress on this?
jelizarovas commentedon Jan 11, 2022
Is this just emulator issue or persists live?
skam22 commentedon Jan 11, 2022
Emulator only for me, working fine on production.
jelizarovas commentedon Jan 12, 2022
I'm getting the same issue on emulator,

When I'm uploading 3+ files also with promises, it never returns and gets frozen on the front end. Even though the emulator functions execute fully and create thumbnails for the files, I can never complete the upload callback.
upload task gets stuck after first or second upload. this is my upload function if it helps at all
skam22 commentedon Jan 13, 2022
seeing the error on production now - the items are taking a long time to download from firestore storage..
abhis3 commentedon Aug 17, 2022
Hi all, the fix for this issue has been merged and should be in the next release of the emulator.
If you're still running in to issues please feel free to reopen this issue
braadworst commentedon Sep 8, 2022
Works like a charm! Thanks for picking this up, much appreciated
royniels commentedon Feb 13, 2024
Sorry to pull up an old issue, but this is back in 13.0.2, uploading multiple files in parellel will generate the issue
nt-tuguldur commentedon May 16, 2024
Same here, firebase-tools 13.5.2 have same issue
fix(emulator): frame Storage rules runtime stdout on newlines
fix(emulator): Storage emulator hangs under concurrent requests
fix(emulator): Storage emulator hangs under concurrent requests (#10852)
fix(emulator): Storage emulator hangs under concurrent requests (#10852)
fix(emulator): Storage emulator hangs under concurrent requests (fire…