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

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Setting a message handler before the FlutterEngine has been run.' #381

Closed
malibayram opened this issue Jun 28, 2020 · 3 comments

Comments

@malibayram
Copy link

Describe the bug
On iOS simulator when I try to stop service. The App is being terminated.

Minimal reproduction project
If the example project exhibits the bug, please mention that here, otherwise fork this project and modify the example to reproduce the bug. Provide the link to your repository here.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Error messages

Runner[74944:1317010] *** Assertion failure in -[FlutterEngine setMessageHandlerOnChannel:binaryMessageHandler:], ../../flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm:638
2020-06-28 07:34:59.067891+0300 Runner[74944:1317010] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Setting a message handler before the FlutterEngine has been run.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff23e3cf0e __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x00007fff50ba89b2 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
	3   Foundation                          0x00007fff258b8bd2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
	4   Flutter                             0x00000001059b7f26 -[FlutterEngine setMessageHandlerOnChannel:binaryMessageHandler:] + 271
	5   Runner                              0x0000000102352ef4 -[FLTFirebaseAdMobPlugin dealloc] + 68
	6   libobjc.A.dylib                     0x00007fff50bbea16 _ZN11objc_object17sidetable_releaseEb + 174
	7   CoreFoundation                      0x00007fff23ea09d6 -[__NSDictionaryM dealloc] + 422
	8   libobjc.A.dylib                     0x00007fff50bbea16 _ZN11objc_object17sidetable_releaseEb + 174
	9   Flutter                             0x00000001059b5468 -[FlutterEngine dealloc] + 158
	10  libobjc.A.dylib                     0x00007fff50bbea16 _ZN11objc_object17sidetable_releaseEb + 174
	11  flutter_isolate                     0x00000001045aec6d -[IsolateHolder .cxx_destruct] + 141
	12  libobjc.A.dylib                     0x00007fff50ba7d0c _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 83
	13  libobjc.A.dylib                     0x00007fff50bb8465 objc_destructInstance + 64
	14  libobjc.A.dylib                     0x00007fff50bbe296 -[NSObject dealloc] + 21
	15  libobjc.A.dylib                     0x00007fff50bbea16 _ZN11objc_object17sidetable_releaseEb + 174
	16  flutter_isolate                     0x00000001045af964 -[FlutterIsolatePlugin handleMethodCall:result:] + 1060
	17  Flutter                             0x0000000105a459df __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104
	18  Flutter                             0x00000001059d4622 _ZNK7flutter21PlatformMessageRouter21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 166
	19  Flutter                             0x00000001059d877a _ZN7flutter15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 38
	20  Flutter                             0x0000000105a3f6bb _ZNSt3__110__function6__funcIZN7flutter5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrINS2_15PlatformMessageEEEE4$_32NS_9allocatorIS8_EEFvvEEclEv + 57
	21  Flutter                             0x00000001059e9267 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 117
	22  Flutter                             0x00000001059ee1b4 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26
	23  CoreFoundation                      0x00007fff23da14b4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
	24  CoreFoundation                      0x00007fff23da114e __CFRunLoopDoTimer + 1038
	25  CoreFoundation                      0x00007fff23da07aa __CFRunLoopDoTimers + 282
	26  CoreFoundation                      0x00007fff23d9b3fe __CFRunLoopRun + 1950
	27  CoreFoundation                      0x00007fff23d9a944 CFRunLoopRunSpecific + 404
	28  GraphicsServices                    0x00007fff38ba6c1a GSEventRunModal + 139
	29  UIKitCore                           0x00007fff48c8b9ec UIApplicationMain + 1605
	30  Runner                              0x0000000101c73a8b main + 75
	31  libdyld.dylib                       0x00007fff51a231fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Runtime Environment (please complete the following information if relevant):

  • Device: [e.g. Samsung Galaxy Note 8]
  • OS: [e.g. Android 8.0.0]

Flutter SDK version

insert output of "flutter doctor" here

Additional context
Add any other context about the problem here.

@malibayram malibayram added 1 backlog bug Something isn't working labels Jun 28, 2020
@ryanheise
Copy link
Owner

Can you please complete all sections of the bug report? Thank you.

@ryanheise
Copy link
Owner

Closing since no reproduction project was provided (or reproduction steps, etc.).

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants