plus_plugins
plus_plugins copied to clipboard
[connectivity_plus] crash on iOS: Sending a message before the FlutterEngine has been run.
flutter: 2.10.5 connectivity_plus: 2.3.0
Sending a message before the FlutterEngine has been run.
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x99d78 __exceptionPreprocess
1 libobjc.A.dylib 0x16734 objc_exception_throw
2 Foundation 0x1311f0 _userInfoForFileAndLine
3 Flutter 0x126c4 (缺少 UUID d24b4305a5d8348c8a0909c859505f3a)
4 Runner 0x3859a4 thunk for @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () (<compiler-generated>)
5 Runner 0x3b670c partial apply for implicit closure #2 in implicit closure #1 in SwiftConnectivityPlusPlugin.init(connectivityProvider:) + 72 (SwiftConnectivityPlusPlugin.swift:72)
6 Runner 0x3b4f1c partial apply for implicit closure #2 in implicit closure #1 in PathMonitorConnectivityProvider.ensurePathMonitor() (<compiler-generated>)
7 libswiftNetwork.dylib 0x361c0 closure #1 in NWPathMonitor.init(requiredInterfaceType:)
8 libswiftNetwork.dylib 0x2c80 thunk for @escaping @callee_guaranteed (@guaranteed OS_nw_path) -> ()
9 libnetwork.dylib 0x804ae0 __nw_path_necp_update_evaluator_block_invoke
10 libdispatch.dylib 0x1e68 _dispatch_call_block_and_release
11 libdispatch.dylib 0x3a2c _dispatch_client_callout
12 libdispatch.dylib 0x15280 _dispatch_root_queue_drain
13 libdispatch.dylib 0x1596c _dispatch_worker_thread2
14 libsystem_pthread.dylib 0x1080 _pthread_wqthread
15 libsystem_pthread.dylib 0xe5c start_wqthread
Application Specific Information:
Sending a message before the FlutterEngine has been run.
Thread 37 Crashed:
0 CoreFoundation 0x32f261d78 __exceptionPreprocess
1 libobjc.A.dylib 0x360bae730 objc_exception_throw
2 Foundation 0x3322d51ec -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
3 Flutter 0x1070de6c4 <redacted>
4 Runner 0x2009059a4 __cxa_throw
5 Runner 0x20093670c __cxa_throw
6 Runner 0x200934f1c __cxa_throw
7 libswiftNetwork.dylib 0x411c3a1bc NWPathMonitor.init
8 libswiftNetwork.dylib 0x411c06c7c thunk for closure
9 libnetwork.dylib 0x33138aadc __nw_path_necp_update_evaluator_block_invoke
10 libdispatch.dylib 0x32ebc3e64 _dispatch_call_block_and_release
11 libdispatch.dylib 0x32ebc5a28 _dispatch_client_callout
12 libdispatch.dylib 0x32ebd727c _dispatch_root_queue_drain
13 libdispatch.dylib 0x32ebd7968 _dispatch_worker_thread2
14 libsystem_pthread.dylib 0x41215b07c _pthread_wqthread
15 libsystem_pthread.dylib 0x41215ae58 start_wqthread
Same here with Flutter v3.0.0. Already over 10k crash reports by Sentry in last 2 weeks due to this same thing.
Same here, flutter v2.10.1, connectivity_plus: 2.3.0
Can confirm that also see this issue in one of my projects. Not sure why it started to appear just in last 2 weeks, though.
The stacktrace from one of crashes in Crashlytics:
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x990fc __exceptionPreprocess
1 libobjc.A.dylib 0x15d64 objc_exception_throw
2 Foundation 0x1303ac _userInfoForFileAndLine
3 Flutter 0x161d0 (Missing UUID c25599caa061358c97027de2********)
4 connectivity_plus 0x8680 (Missing UUID 76fddfd7ffa7395296ef6fe7********)
5 connectivity_plus 0x92b0 (Missing UUID 76fddfd7ffa7395296ef6fe7********)
6 connectivity_plus 0x7870 (Missing UUID 76fddfd7ffa7395296ef6fe7********)
7 libswiftNetwork.dylib 0x34000 closure #1 in NWPathMonitor.init(requiredInterfaceType:)
8 libswiftNetwork.dylib 0x2ac4 thunk for @escaping @callee_guaranteed (@guaranteed OS_nw_path) -> ()
9 libnetwork.dylib 0x8357c4 __nw_path_necp_update_evaluator_block_invoke
10 libdispatch.dylib 0x2924 _dispatch_call_block_and_release
11 libdispatch.dylib 0x4670 _dispatch_client_callout
12 libdispatch.dylib 0x15f00 _dispatch_root_queue_drain
13 libdispatch.dylib 0x16608 _dispatch_worker_thread2
14 libsystem_pthread.dylib 0x10b8 _pthread_wqthread
15 libsystem_pthread.dylib 0xe94 start_wqthread
Same here. We found in Crashlytics that many users experiencing this bug

-- We also found this bug, it looks very similar. I think it might be related:

Any updates guys?
likely duplicated of https://github.com/fluttercommunity/plus_plugins/issues/766 and https://github.com/fluttercommunity/plus_plugins/issues/863
Also seem related:
- https://github.com/flutter/flutter/issues/66647
- https://github.com/flutter/flutter/issues/90781
- https://github.com/flutter/flutter/issues/96901
He seems to have found a solution: https://github.com/flutter/flutter/issues/96901#issuecomment-1053114107 Why don't you implement it?
Why don't you implement it and submit a PR?
unless people are still seeing this in 2.3.5, this should be able to be closed now
@miquelbeltran can we implement the same logic to sensor_plus? Looks like the same error here
@followthemoney1 Feel free to submit a PR, tag me in it once you got it, so I can review it quickly
Flutter version: 3.3.3 3.3.10 SDK version: 3.0.2
I have tried many methods, but they still don't work, and I feel that this problem only occurs on my computer:
Exception: Unable to launch com.niuke.flutterApp1 on 4F068ED4-3D84-47C6-9490-B01347FD1B03:
ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.niuke.flutterApp1" failed.
The request was denied by service delegate (SBMainWorkspace).
Underlying error (domain=FBProcessExit, code=128):
The operation couldn’t be completed. The process exited.
The process exited.
Command: xcrun simctl launch 4F068ED4-3D84-47C6-9490-B01347FD1B03 com.niuke.flutterApp1 --enable-dart-profiling --enable-checked-mode --verify-entry-points --start-paused --observatory-port=0
Error launching application on iPhone 14 Pro Max.

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days