Repository navigation
No exceptions logged before runApp on iOS devices #44717
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationDebugging, breakpoints, expression evaluationplatform-iosiOS applications specificallyiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Exceptions that occur before runApp() are not printed to log on iOS devices. Works in simulator.
Related: #41133
Reproduce:
void main() {
throw Exception('an error happened here');
runApp(MyApp());
}
Result is a frozen app and nothing in the logs.
[✓] Flutter (Channel master, v1.10.16-pre.98, on Mac OS X 10.15.1 19B88, locale en-US)
• Flutter version 1.10.16-pre.98 at /Users/james/Development/flutter
• Framework revision 03ac37af08 (2 hours ago), 2019-11-08 12:47:26 -0800
• Engine revision 5f5713e339
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/james/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2, Build version 11B52
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 38.2.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.40.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.6.0
[✓] Connected device (1 available)
• Virgo • 00008030-000848D11EF0802E • ios • iOS 13.2.2
! Doctor found issues in 1 category.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationDebugging, breakpoints, expression evaluationplatform-iosiOS applications specificallyiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
[-]No exceptions logged before runApp on iOS devices[/-][+]No exceptions or logs logged before runApp on iOS devices[/+]jmagman commentedon Nov 12, 2019
@stx Also mentioned this is for logs as well as exceptions in #44718:
stx commentedon Nov 12, 2019
@jmagman These might be at least slightly separate problems.
Exceptions pre-runApp never get printed as far as I can tell.
Logs pre-runApp do get printed on hot restart, but never on first build. May apply to exceptions also, but can't test it due to the above.
jmagman commentedon Nov 12, 2019
Okay, will track separately then. Thanks for the clarification.
[-]No exceptions or logs logged before runApp on iOS devices[/-][+]No exceptions logged before runApp on iOS devices[/+]jmagman commentedon Mar 17, 2020
ios-deploycan attach via lldb, maybe we can get stream in the os logs that way...github-actions commentedon Aug 12, 2021
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
flutter doctor -vand a minimal reproduction of the issue.