-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Targeting iOS 11 (Flutter default minimum) built with Xcode 15 crashes EXC_BAD_ACCESS
when using the Networking
framework
#136060
Comments
I run a minimal sample app on my device Am I correct if you have this issue on iPhone 6, iOS 12.5.7? (from your flutter doctor output) Please confirm if there is a similar issue on a newly created Flutter project. If it only occurs on your project, please share the complete output of |
If I create a new starter app it will run on the other iOS versions yes. But not my app. I have other devices that install the app via Testfligth that have the same issue. I have my own iPhone 14 with Here is the flutter run - v output of the iPhone 6 in a file as it is too long to post here. |
And here is the output of the same app on the iPhone 14 with iOS 17 that works. |
I have the same problem on my devices before iOS 17. |
Tail log[ +129 ms] ------ Debug phase ------
[ ] Starting debug of 4781749bcc830a01bf3326c466d1d86cea0bc844 (N61AP, iPhone 6 (GSM), iphoneos, arm64, 12.5.7, 16H81) a.k.a.
'Developmet iphone 6' connected through USB...
[+4205 ms] [ 0%] Looking up developer disk image
[ +32 ms] [ 95%] Developer disk image mounted successfully
[ +21 ms] Symbol Path: /Users/jacofourie/Library/Developer/Xcode/iOS DeviceSupport/12.5.7 (16H81)/Symbols
[ +409 ms] [100%] Connecting to remote debug server
[ ] -------------------------
[ +316 ms] (lldb) command source -s 0
'/tmp/81751DCA-E9E1-4E70-9F0D-D032E2A49369/fruitstrap-lldb-prep-cmds-4781749bcc830a01bf3326c466d1d86cea0bc844'
[ ] Executing commands in
'/tmp/81751DCA-E9E1-4E70-9F0D-D032E2A49369/fruitstrap-lldb-prep-cmds-4781749bcc830a01bf3326c466d1d86cea0bc844'.
[ ] (lldb) platform select remote-'ios' --sysroot '/Users/jacofourie/Library/Developer/Xcode/iOS DeviceSupport/12.5.7
(16H81)/Symbols'
[ ] Platform: remote-ios
[ ] Connected: no
[ ] Sysroot: /Users/jacofourie/Library/Developer/Xcode/iOS DeviceSupport/12.5.7 (16H81)/Symbols
[ ] SDK Path: "/Users/jacofourie/Library/Developer/Xcode/iOS DeviceSupport/12.5.7 (16H81)/Symbols"
[ ] (lldb) target create "/Users/jacofourie/Desktop/FlutterProjects/smh/build/ios/iphoneos/Runner.app"
[+4948 ms] Current executable set to '/Users/jacofourie/Desktop/FlutterProjects/smh/build/ios/iphoneos/Runner.app' (arm64).
[ ] (lldb) script
fruitstrap_device_app="/private/var/containers/Bundle/Application/2FA882A5-BBD7-4182-8E18-260A44577DE0/Runner.app"
[ +55 ms] (lldb) script fruitstrap_connect_url="connect://127.0.0.1:64213"
[ ] (lldb) script fruitstrap_output_path=""
[ ] (lldb) script fruitstrap_error_path=""
[ ] (lldb) target modules search-paths add /usr "/Users/jacofourie/Library/Developer/Xcode/iOS DeviceSupport/12.5.7
(16H81)/Symbols/usr" /System "/Users/jacofourie/Library/Developer/Xcode/iOS DeviceSupport/12.5.7 (16H81)/Symbols/System"
"/private/var/containers/Bundle/Application/2FA882A5-BBD7-4182-8E18-260A44577DE0"
"/Users/jacofourie/Desktop/FlutterProjects/smh/build/ios/iphoneos"
"/var/containers/Bundle/Application/2FA882A5-BBD7-4182-8E18-260A44577DE0"
"/Users/jacofourie/Desktop/FlutterProjects/smh/build/ios/iphoneos" /Developer "/Users/jacofourie/Library/Developer/Xcode/iOS
DeviceSupport/12.5.7 (16H81)/Symbols/Developer"
[ +36 ms] (lldb) command script import
"/tmp/81751DCA-E9E1-4E70-9F0D-D032E2A49369/fruitstrap_4781749bcc830a01bf3326c466d1d86cea0bc844.py"
[ +2 ms] (lldb) command script add -f fruitstrap_4781749bcc830a01bf3326c466d1d86cea0bc844.connect_command connect
[ ] (lldb) command script add -s asynchronous -f fruitstrap_4781749bcc830a01bf3326c466d1d86cea0bc844.run_command run
[ ] (lldb) command script add -s asynchronous -f fruitstrap_4781749bcc830a01bf3326c466d1d86cea0bc844.autoexit_command autoexit
[ ] (lldb) command script add -s asynchronous -f fruitstrap_4781749bcc830a01bf3326c466d1d86cea0bc844.safequit_command safequit
[ ] (lldb) connect
[ +27 ms] (lldb) run
[ +300 ms] success
[ ] (lldb) safequit
[ +126 ms] Process 490 detached
[ +47 ms] Application launched on the device. Waiting for Dart VM Service url.
[ +730 ms] [VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(37)] Using the Impeller rendering backend.
[+29274 ms] The Dart VM Service was not discovered after 30 seconds. This is taking much longer than expected... @JacoFourie Based on the tail log, it looks similar to #127656. Could you check if it's also your case? (@mcagrigoktas please also confirm this) |
@huycozy, how do I check as there is no solution to the issue? |
What I mean is to confirm you have the same situation there (similar issues should be centralized on one issue only).
The reporter of #127656 had updated iOS version instead but it might be related. Labeling this issue as a separate one for other's input. |
The same issue happened to me. I am working under the following environment, and I actually deployed the app to the App Store today. A user reported to me that they are on iOS 16.6.1 and the app crashes immediately upon launch, preventing them from accessing the app. The same issue was observed on another device running iOS 16.6.1 owned by my acquaintance. I downloaded the 16.4 simulator in Xcode and ran it in debug mode, but it executed normally. |
I'm also facing the same issue. |
My app is now working again on other IOS versions. I updated all my libraries to the latest versions and did a pod upgrade and a pod install. Now all is working again. |
In my case, the issue was with connectivity_plus 4.x.x having an iOS deployment target of 11.0. This issue was resolved in connectivity_plus 5.0.0. fluttercommunity/plus_plugins#1955 |
Is anyone experiencing this issue not able to resolve it by setting the minimum deployment target of your application (in Xcode and in your Podfile) to iOS 12? (If that is indeed necessary it seems like an Xcode bug, but we could potentially work around it with an auto-migration if the tool sees that Xcode 15 is being used.) |
It may be that Xcode is dropping unsupported |
OK so I guess I can close the issue then Thanks all for the info and help. |
Re-opening to evaluate for an auto-migration per my comment above. |
1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also #62902 and #85174 and #101963 Fixes #136060
Reverts #140478 Initiated by: loic-sharma This change reverts the following previous change: Original Description: 1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also #62902 and #85174 and #101963 Fixes #136060
#140478 (relanded with #140823) enforced a minimum of iOS 12 and is available in the master channel, which should prevent this and similar crashes. If you are not using the master channel you can set the version manually:
|
Reland #140478 with `ios_content_validation_test` test fix. ``` [ios_content_validation_test] Process terminated with exit code 0. Task result: { "success": true, "data": null, "detailFiles": [], "benchmarkScoreKeys": [], "reason": "success" } ``` __________ 1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also #62902 and #85174 and #101963 Fixes #136060
Reland flutter#140478 with `ios_content_validation_test` test fix. ``` [ios_content_validation_test] Process terminated with exit code 0. Task result: { "success": true, "data": null, "detailFiles": [], "benchmarkScoreKeys": [], "reason": "success" } ``` __________ 1. Change templates to `IPHONEOS_DEPLOYMENT_TARGET`, `MinimumOSVersion`, and Podfile `platform :ios` to 12.0. 2. Add migrator for Podfile part to migrate `platform :ios, '11.0'` -> `platform :ios, '12.0'` 3. Compile with `-miphoneos-version-min=12.0` 4. Run the migrator on all example apps and integration tests. See also flutter#62902 and flutter#85174 and flutter#101963 Fixes flutter#136060
Flutter 3.16.6 now updates your project automatically to iOS 12, so there shouldn't be networking crashes. |
@jmagman |
You should only need to update the Runner project minimum deployment, no changes needed in the Podfile. If you find you needed to change something else please let me know. |
We haven't upgraded from flutter 3.13.5 yet to the newest version, but I did have to do this in my Podfile, otherwise just changing it in:
by themselves did not make a difference for us. |
@danallen88 interesting, I didn't see that in my testing, it seemed to be the deployment target of the app, not the frameworks, that mattered. Was the crash in connectivity_plus or somewhere else? |
Do you have any guidance on how to best determine this? I've tried running from Xcode as suggested above but had to change some settings to point Flutter at our custom entrypoint (we have multiple based on what flavor app we're building). |
That looks unrelated to this issue, and probably because your flavors aren't set up correctly, check your Configurations (see note in https://docs.flutter.dev/deployment/flavors#creating-flavors-in-ios). You can file a new issue and I can take a look. I recommend updating to 3.16.6 to fix the connectivity crash, it will force all your pods to iOS 12 if they are at a lower minimum. |
I agree this is a different issue (it's my inability to run the app from Xcode the same way I would typically run it from Android Studio, probably because I'm missing something as you mentioned). I'm claiming that the app will actually crash immediately upon startup when I run our normal build through Android Studio, but I think I need to be able to run it from Xcode and not Android Studio in order to see the source of the crash if I understand correctly. We were holding off upgrading flutter because of the breaking changes it introduces for us and hoping to resolve this in the meantime. But unless there is guidance on how to run a flavored app from Xcode directly, I'm not able to be much help in showing the root cause here. |
@danallen88 is there a crash log for the device? Xcode > Window > Devices and Simulators > the crashing device > Open Recent Logs (the timestamps would match the crash) |
Unfortunately not. I appreciate you taking a look along with me! I'm thinking that if we can manage the upgrade to 3.16 and we still require that workaround, I will open a new issue. Thanks @jmagman! |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Is there an existing issue for this?
Steps to reproduce
Compile my add and try to run it on any iOS device with iOS less than 17
Expected results
Should still run on all devices
Actual results
The app will just close and not run. The version compiled on the previous Xcode runs on all iOS versions
Code sample
I can not sare my code on a public forum but here you see when doing a flutter run it compiles and sends the app to the device. But will not run and does not give any error
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: