Closed kostadin-t closed 2 years ago
Anyone with the same problem?
Hey @kostadin-t
Sorry for the late response - Is this still an issue?
Hey @kostadin-t
Sorry for the late response - Is this still an issue?
Yes. It still the same.
Hey @kendalled I think your problem might be that you are mixing state_changed listeners with for loops... Also, you are using await in a regular for loop, which doesn't wait for completion, maybe it will work if you change your for loop to something like this:
const promises = []
for (let i = 0; i < ad.images.length; i++) {
const image = ad.images[i]
promises.push(uploadImage(image, i))
}
const responses = await Promise.all(promises)
Your example is quite cumbersome to debug and contains a lot of unneeded code for us to debug. Could you provide a minimal working example where this issue happens and maybe upload it to codesandbox?
For the future: This is a question not really specific to the Nuxt/Firebase module and rather a general Firebase Storage question, so you would be better advised to ask it on StackOverflow.
Closing due to inactivity.
This is a problem i have been trying to solve for the last couple of weeks with no success. My store action is working fine and images are uploaded successfully when the website stores some data, meaning if you are not a new user and you haven't cleared site data from chrome>settings>site settings. However if you do that the same code doesn't work and only one image or sometimes not even one is uploaded. The worst part is that no error is thrown, neither by the firebase upload task, nor by the catch block.
This is the code i use. I know it is very ugly but after everything i tried i just want to find the problem and then refactor. Please help.