-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Image picker freezes on ios 18 simulator. (maybe on real device as well) #155401
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
Comments
Hi @Lazizbek97, I just tested the image_picker sample app in the iOS 18 simulator and it works as expected. See the recording below. Do you experience the same with the example app? If not, can you provide a complete minimal reproducible code sample so that we can properly investigate this? Thank you Screen.Recording.2024-09-19.at.12.46.48.PM.mov |
I have the same problem #155402 |
Hi @gulmensedat, do you get this in a new app or only in your actual project? If it is only in your actual project, can you provide a minimal sample so that we can properly investigate this? |
danagbemava-nc It has a cut off image like this. I tried 2 emulators, same problem. This is the latest version of xcode from the appstore. This screen opens and stays like this, I cannot click anything. |
Same issue as well. |
i have run the app on real ios device, and xcode console shows following error: but it is working, no freezes |
Hi @gulmensedat, I just tested again on two simulators and it works as expected in both cases. See the recording below. I do see the same error shared by @Lazizbek97 in #155401 (comment) with both the simulator and my physical device but it works as expected on all devices tested so far. I don't get the seemingly out of place image picker sheet. To everyone facing this issue with the simulator, can you try running the app from Xcode to see if you get any errors? Screen.Recording.2024-09-20.at.6.10.32.AM.mov |
I restarted my macbook and tried from xcode, the problem is the same. Is your Xcode version the latest in the appstore or beta? |
Hi @gulmensedat, I'm using the latest stable Xcode version, not a beta version. Did you see any errors in Xcode?
|
Very interesting, I mean it's a serious problem but you don't have the problem, I and others have it too. I don't know how we can solve it. In fact, there are people who have this problem on the react-native side, it's basically the same function anyway. The number of people who have this problem is constantly increasing. We've been waiting for an update for days, some people downgraded to xcode15 and there was no problem there. |
@gulmensedat, thanks for the link. This seems like there might be a general issue with iOS 18. Labeling for further investigation as I cannot reproduce this at the moment. |
hello, its happening in Xcode 16 too with a simulator iPhone 16 |
Happens on an iPhone 16 Pro Simulator running iOS |
This comment was marked as spam.
This comment was marked as spam.
I'm seeing the same problem, but only when I run on iOS 18. When I run on iOS 17.6.1 (my physical iPhone 14) there's no problem. |
This worked for me :) |
Well that explains why it's not reproducing from the image_picker example app. You are likely using a plugin that does not work on arm64 simulators, so on an Apple Silicon Mac it's running the simulator in Rosetta. This is another manifestation of Rosetta simulators having weird bugs, like #79641 and #93177. @Lazizbek97 can you check if any of your plugins have arm64 excluded? See #79641 (comment) for how to do this. |
I encountered the same issue on our real device and was able to reproduce it twice, though the cause remains unclear. |
@abhinand-kv That's concerning. If you can give any hint of how to reproduce it on a real device that would be very helpful. |
I have an app which relies heavily on Google ML Kit which is in fact the only packages in the app which don't support arm64 (thank you @Lazizbek97 for your tip above). So that stinks for me. What I don't understand is why image_picker does work in iOS 17.6 simulators but not iOS 18.0 simulators? Any Ideas what the issue is? |
Questions about why any given iOS simulator does or does not work correctly under Rosetta would need to be raised with Apple; we don't have any control over how simulators behave. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I think this issue is related to this issue #155535 Update: Launching lib/main.dart on iPhone 16 Pro in debug mode...
Watch companion app found.
Xcode build done. 72.9s
Failed to build iOS app
Error (Xcode): Building for 'iOS-simulator', but linking in object file (/Users/bahadirarslan/Development/Flutter/myproject/ios/Pods/MLImage/Frameworks/MLImage.framework/MLImage[arm64][2](GMLImage.o)) built for 'iOS'
Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)
Could not build the application for the simulator.
Error launching application on iPhone 16 Pro. I think it is the same for you @Fairfieldfred |
This is the fix. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm dealing with same problem. There is any error or exception on the try catch block |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I was running into an issue with image_picker and getting symptoms much like this. The app would "freeze" when the below was called and the only way I could get any further progress was to terminate the app and try again. I never was able to get it to successfully pick a file.
This is on an M1 MB Air with all updates applied, Android Studio Koala, XCode just installed (latest version) with a target of an iPad running iPadOS 17.x. (whatever is current as of today) I was building a very simple example app to demonstrate it and noticed that iPadOS 18 was available, and once I applied that the crash disappeared. In the hopes of being helpful in finding the cause of the bug, I do have some crash output from XCode:
|
I'm going to close this as another bug in the iOS Rosetta simulator. This is a bug in the iOS simulator, not Flutter. Flutter will fall back to the x64 simulator if one or more of your plugins don't support arm. You can try to find the offending plugin by following the steps at #79641 (comment). If you are seeing this issue on a real device or you are 100% sure all of your plugins support arm64, please file a new issue with specific instructions about how to reproduce. Thank you! |
Steps to reproduce
once app successfully run, while selecting images from gallery, it is freezing.
App itself works as usual, no problem. But image picker screen freezes on top of it. you cannot cancel or close it. One way is kill the app, and run it again.
Expected results
It should work as before.
Actual results
Here is how it is acting.
Code sample
Code sample
[Paste your code here]
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: