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

Crashes on Hot Restart #454

Closed
3 of 11 tasks
mrgnhnt96 opened this issue May 5, 2021 · 2 comments
Closed
3 of 11 tasks

Crashes on Hot Restart #454

mrgnhnt96 opened this issue May 5, 2021 · 2 comments

Comments

@mrgnhnt96
Copy link

Platform:

  • Dart
  • Flutter Android or iOS
  • Flutter Web

IDE:

  • VSCode
  • IntelliJ/AS
  • XCode
  • Other, which one?

split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):

  • Enabled
  • Disabled

Platform installed with:

  • pub.dev
  • GitHub

Output of the command flutter doctor -v below:

Click to Expand
[✓] Flutter (Channel stable, 2.0.6, on macOS 11.2.3 20D91 darwin-x64, locale en-US)
    • Flutter version 2.0.6 at /Users/morganhunt/Development/versions/stable
    • Framework revision 1d9032c7e1 (6 days ago), 2021-04-29 17:37:58 -0700
    • Engine revision 05e680e202
    • Dart version 2.12.3

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/morganhunt/Library/Android/sdk
    • Platform android-30, build-tools 29.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_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.55.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.21.0

[✓] Connected device (2 available)
    • Morgans iPhone (mobile) • 00008030-000845423EBB802E • ios            • iOS 14.4.2
    • Chrome (web)            • chrome                    • web-javascript • Google Chrome 90.0.4430.93
    ! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13)

• No issues found!
The version of the SDK: **5.0.0**

I have the following issue:

Every time I Hot Restart my app, my app crashes

Steps to reproduce:

  • Create project
  • import Sentry
  • init Sentry
  • hot restart app
Click to Expand
await SentryFlutter.init(
    (options) {
      options.dsn =
         <MY SENTRY DSN>
    },
    appRunner: () => runZonedGuarded(() {
      runApp(const MyApp());
    }, flogError),
  );

Actual result:

Restarted application in 1,187ms.
-[__NSCFString setStreamHandler:]: unrecognized selector sent to instance 0x2818272f0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString setStreamHandler:]: unrecognized selector sent to instance 0x2818272f0'
*** First throw call stack:
(0x196e3586c 0x1abe4ec50 0x196d3c95c 0x196e38438 0x196e3a740 0x1026299d8 0x10262b9a0 0x102639a58 0x1026379c4 0x102636a18 0x103dac694 0x10354c038 0x10384b41c 0x1037ea81c 0x1037eced4 0x196db1fa0 0x196db1ba0 0x196db0ffc 0x196daaee4 0x196daa21c 0x1ae974784 0x1997eaee8 0x1997f075c 0x102387cc4 0x196a6a6b0)
libc++abi.dylib: terminating with uncaught exception of type NSException
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001c4d85414 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1c4d85414 <+8>:  b.lo   0x1c4d85434               ; <+40>
    0x1c4d85418 <+12>: pacibsp
    0x1c4d8541c <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1c4d85420 <+20>: mov    x29, sp
Target 0: (Runner) stopped.
Error handling 'checkPlatformOverride' custom request: method not available: ext.flutter.platformOverride
Error handling 'checkBrightnessOverride' custom request: method not available: ext.flutter.brightnessOverride
Error handling 'checkIsWidgetCreationTracked' custom request: method not available: ext.flutter.inspector.isWidgetCreationTracked
Error handling 'serviceExtension' custom request: method not available: ext.flutter.inspector.setPubRootDirectories
Lost connection to device.
Exited (sigterm)

Expected result:

  • Successfully run app
@mrgnhnt96
Copy link
Author

This is an issue with Flutter, not Sentry

@marandaneto
Copy link
Contributor

@mrgnhnt96 pay attention to your init. block https://docs.sentry.io/platforms/flutter/#configure
you don't need a runZonedGuarded

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

2 participants