-
Notifications
You must be signed in to change notification settings - Fork 28.5k
App crashes on launch on physical iOS 14 device in debug mode when debugger not attached, EXC_BAD_ACCESS (SIGKILL - CODESIGNING) #60657
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
This question is same to mine.#60522 |
Hi @PhantomRay does this behaviour occur with an "hello world" app? |
this behaviour occur with an "hello world" app. |
Hi @iapicca
It happens when the iPhone is disconnected from the debug session, and then restart the app. I don't think |
Hi @codeliu6572 @PhantomRay I apologise I misinterpreted the disconnect reconnect part |
@iapicca I think is same. use usb debug, is ok, disconnect usb to point app, it crash. I tried use usb on release mode to run on device ,it crash. |
cc @jmagman Do the logs above provide useful information? What would we need to make this tractable? |
Seems like something happened between these lines:
I was hoping to see something from the sandbox or whatever system process killed it. Can we get the crash log from the device? |
@jmagman I have the same issue, full crashlog. https://gist.github.com/mitchross/d58a9ed7c7b8108766114d960ebc4e56 |
When running local builds of the app I get the same issue, it crashes on launch after exiting the debug session. (Using Xcode 12) On the other hand, when I use Firebase App Distribution to install my app (Ad Hoc) it's able to run fine on iOS 14. Flutter Doctor[✓] Flutter (Channel master, 1.20.0-8.0.pre.22, on Mac OS X 10.15.5 19F101, [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 11.5) [✓] Android Studio (version 3.6) [✓] VS Code (version 1.47.0) [✓] Connected device (1 available) • No issues found! |
Can someone hitting this try updating flutter on the master channel, upgrading to Xcode 12, and run from |
I just compiled a new build on master and can confirm that I am not able to reproduce the issue |
Just found a workaround in stable channel (1.17.5): |
I am also having same issue, |
I've met this issue recently and I've solve the problem. |
I already do that, but it still doesn't work. |
The release version's "fix technique" does not fit to me. I need to create a Custom Extension Notification, and it runs in parallel to the main app. The problem is, when i build the content extension on XCode, it also rebuilds the main app and, as the main app crashes at launch, the extension also crashes. PUT AN IF CONDITION IN FLUTTER DEBUG CODE AND FIX IT PROPERLY. DON'T IT LOOK LIKE A LITTLE BETTER IDEA? |
This comment has been minimized.
This comment has been minimized.
I am using Flutter v1.22 stable and Xcode 12 with iOS14. I am still facing the same issue. |
Same issue ios14 works fine in emulator but crashed on the second start on the actual device. The only way I could find to debug this is by using device analytics logs which you can find in settings -> analytics of your device. but it worked for me release mode |
This should have been resolved with flutter/engine#20980 on 1.22. When you launch from the home screen in Debug mode you should see a message like this: If you are seeing this on 1.22 stable we definitely want to take a look!
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Still struggling to upgrade my project, will continue tomorrow. Will keep you posted! |
@jmagman Upgrade to 1.22 worked for me. Thank you |
this works but there are no debug logs and notifications through fcm don't reach the device |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I am locking this closed issue. The original issue is tracking a crash that manifests in the Flutter framework. The original crash this issue is tracking should have been resolved with flutter/engine#20980 on 1.22. When you launch from the home screen in Debug mode you should see a message like this: If you are seeing a crash when launching your app only from the home screen on 1.22 stable we want to take a look in a new issue.
Thanks! |
As requested by @jmagman, I create this separate issue from #60424.
Steps to Reproduce
flutter run
or Xcode 12Note: running app in simulator does not have above issue.
Logs
As it says, codesigning issue. This may not be a flutter issue though.
Full logs
flutter doctor -v
Admin edit:
===============================================================================
Summary of issue as of 2020-09-7
The current solution based on ios-deploy 1.11.2 beta 1 will most likely be the stable solution when iOS 14 comes out this month.
Affected workflows
All Flutter apps built with a Debug Flutter build cannot be launched on iOS 14 physical devices from the device itself without a host computer. This includes launching via the home screen (springboard), deep linking, notifications etc. This is a new restriction from iOS 14 on apps' ability to set itself in debug mode in order to change the execution mode of newly JIT'ed code.
Full-Flutter - Solution
If you created your Flutter project via
flutter create
, you have a 'full-Flutter' project. To launch a debug build Flutter app, you can either1- Launch via
flutter run
on Flutter master channel.2- If you already have your desired flutter flags set (such as --local-engine, --target, --route, etc), you can also launch via Xcode with the iOS Xcode project at
<your Flutter project root>/ios/Runner.xcworkspace
.3- Build and install a Profile/Release build of your Flutter app. You can then relaunch from home screen, notification etc from the device directly without a connected host.
4- If you already build your iOS app via
flutter build ios --debug
, you can also launch with ios-deploy 1.11.2 beta 1 and later viaios-deploy --noinstall --justlaunch --bundle <your Flutter project root>/ios/Debug-iphoneos/Runner.app
.Add-to-app - Solution
If you created your Flutter project via
flutter create -t module
and embedded the Flutter module inside your own host iOS app via Cocoapods or the module framework build viaflutter build ios-framework
, you have an 'add-to-app' project.Your add-to-app project will crash starting in iOS 14 when you
run
yourFlutterEngine
if your Flutter module is a debug build.To mitigate, you can either:
1- Re-launch your host iOS app from Xcode.
2- Embed a Profile/Release build of your Flutter module instead. You can then relaunch your host app and enter the Flutter screen from the home screen, notification etc from your device directly without a connected host.
3- Re-launch your host iOS app with ios-deploy 1.11.2 beta 1 and later via
ios-deploy --noinstall --justlaunch --bundle <your iOS .app which embeds a Flutter module>
. (Convenience feature request to allow --bundle_id to be specified instead of --bundle in ios-deploy).Once launched, you can then enter your Flutter module's UI and
flutter attach
to debug and hot-reload as usual on Flutter master channel. Not #63893. You cannotflutter attach
on iOS 14 if you're not on master channel. You must accept the local network permission dialog in order toflutter attach
on iOS 14.The text was updated successfully, but these errors were encountered: