-
Notifications
You must be signed in to change notification settings - Fork 153
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Background Isolate broken on Flutter version 3.3.2 in release mode #245
Comments
You need to add This also needs to be added to UploadTaskStatus class from flutter uploader side most likely, otherwise you will not be able to pass that class through the isolate. |
@RamunasO The flutter downloader docs also make it seem like the pragma entry is only required for Android, but my issue was happening on iOS. I'll have to try it out and see if it works. |
Hi @JoshJuncker, did you find any solution? I am also having this issue. It is not working on release mode. Can you please help me out? |
@waqadArshad I just downgraded to flutter 3.0.5. Not a great solution, but I don't have the time to dig in further... |
@JoshJuncker thanks a lot. I really appreciate this. I was stuck at this for quite a long time, thinking that there was something wrong with my code. I cannot really express how thankful I am. Thanks a lot. |
Had a similar issue with Flutter 3.3.5 & Dart 2.18.2, can confirm this solved it. Thank you 👍
|
I upgraded to flutter 3.3.2 from 3.0.5, and I get the following error in release mode. Debug mode works fine, and 3.0.5 works fine.
Note that the error only happens upon enqueueing a background upload. Not upon registering the backgroundHandler.
The error results in no callbacks getting called in the dart code (the backgroundHandler isn't ever called). Although you can see the plugin logs from the native code logging the status and completion of the actual upload.
Note that 'package:shout_flutter/utilities/service_locator.dart' is simply the dart file that contains the top level backgroundHandler function (copied directly from the readme).
It seems something is wrong when it tries to boot the isolate with the top level function. I don't know what might have changed with isolates and top level functions from flutter 3.0.5 to 3.3.2. But I am using the same version/ref of flutter_uploader in both cases.
The text was updated successfully, but these errors were encountered: