Skip to content
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

Production iOS app freezes #31

Open
etozzato opened this issue Jul 8, 2022 · 5 comments
Open

Production iOS app freezes #31

etozzato opened this issue Jul 8, 2022 · 5 comments

Comments

@etozzato
Copy link

etozzato commented Jul 8, 2022

Hello and thanks for the great project!

We are 72 hours into trying to understand what could cause the Isolate to freeze when our app is compiled and distributed with TestFlight. Everything works correctly in debug, profiling and distribution, but when we try flutter build ipa with our without the --obfuscate option, going into the Isolate does not return.

Initially I thought too many plugins where loaded inside the Isolate (MLKIt, TensorFlow and OpenCV), but even trying each of them individually, the result is the same.

Switching to a "non Isolated" execution of the same method works, but the UI is rightfully janky.

Flutter (Channel stable, 3.0.4, on macOS 11.6.5 20G527 darwin-x64, locale en-US)
    • Flutter version 3.0.4 at /usr/local/Caskroom/flutter/2.2.3/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 85684f9300 (8 days ago), 2022-06-30 13:22:47 -0700
    • Engine revision 6ba2af10bb
    • Dart version 2.17.5
    • DevTools version 2.12.2

Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

I don't think there is any issue with the code, but certainly something is missing/wrong in the build stage.

I am here to see if anyone else ran into the same issue!

@deakjahn
Copy link
Owner

deakjahn commented Jul 10, 2022

The question is whether this is true of isolates in general or anything specific to isolate_handler. I don't think the second is very probable because it doesn't do anything special on its own in the first place. Did you possibly try with a plain Dart Isolate, then with a FlutterIsolate, too?

@etozzato
Copy link
Author

HI

No solution for us yet, we are running the process in the main thread 😓
I can't tell if this is true for plain Isolates too, everything we do is related to plug-ins, and our only viable tool is isolate_handler 👍🏼

@deakjahn
Copy link
Owner

Well, I'm not proficient with Xcode at all (I can use it to ocasionally build my apps for iOS but otherwise, I don't use anything Apple), but on one hand, I suspect that you could try to debug it somehow, but, on the other hand, I also suspect that you're already doing this. :-)

By adding lots of log output lines, do you have at least an idea which part of your code doesn't return?

@etozzato
Copy link
Author

Yeah, I went down the rabbit hole for a while. Logging from inside Isolates would only work in development, so we accepted that this is probably a corner case we can't solve, at least for now!

Thank you

@srmncnk
Copy link

srmncnk commented Sep 6, 2022

Consider trying out this PR with a dependency override. rmawatson/flutter_isolate#118

It handles obfuscation etc. But be sure to add pragmas to your top level functions when using obfuscation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants