-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 [firebase_storage] putFile
never resolves when using isolates
#9790
Comments
+1 to this issue. We're blocked from using Isolates until we figure this out. |
@JavierPerezLavadie were not on the 10.x sdk. |
I can reproduce the issue using the code sample in https://github.com/SpectoraSoftware/firebase-storage-isolate-issue-sample-app. Labeling for further investigation. |
A heads up that I just tried all of the latest Firebase dependencies that use SDK 10 under the hood and I am seeing the exact same issue. |
@danagbemava-nc do you have any sense of what the priority would be for this issue? I realize there are probably many things in the queue to be looked at, so I promise that I'm not being pushy 馃槃 This is a major blocker for us so we're considering whether or not we wait for this to be fixed in the underlying SDK or if we need to proceed with moving to S3 for our storage needs. Thank you! |
Hello Folks, I did a bit of investigation on my end and was able to find the issue. First, when we use the Because of that the I've tested the solution bellow and it seems to work:
It would be nice for someone on the flutterfire team to take a look so I can open a MR or so we can discuss better solutions. |
If anyone wants to test out, I've forked the flutterfire repo and created a branch with this fix. Just add the dependency override at the
|
Hello! Just a quick update with more info for next steps: By using the
|
Hello @GabrielAraujo , currently FlutterFire might not work with isolates, I'll check your provided code, thanks :) |
This is a big issue since many apps need isolates to perform heavy tasks. Now I am in the final stage of my project, optimizing some tasks and I found this problem which is blocking. Please, consider this important. |
Bug report
Describe the bug
When running any code in an isolate on iOS, Firebase Storage's
putFile
method no longer resolves and therefore halts any code to be executed after it's run. However, whileputFile
never resolves, the file is actually uploaded and can be seen in Firebase Storage.This issue is happening only after adding the flutter_isolate package to our application. We're not running any Firebase Storage code in the isolate -- we only use isolates in a separate image compression process before the upload is triggered.
This is only occurring on iOS and not Android.
This appears to be the same issue that @Wian-TMC opened in #5976 and was automatically closed
All that said, I don't believe that this is a
flutter_isolate
package issue as this same issue was mentioned many times, using many different packages, in #5976. One of the packages mentioned wasaudio_service
, which also uses isolates.Steps to reproduce
Steps to reproduce the behavior:
flutter_isolate
packageputFile
await bucket.putFile(...)
You'll see that the file is uploaded, but it never resolves and therefore any code after
putFile
is never run.Expected behavior
Calls to
putFile
should resolve and continue to the next line when done.Sample project
https://github.com/SpectoraSoftware/firebase-storage-isolate-issue-sample-app
Please see the README for more details.
Additional context
Add any other context about the problem here.
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: