aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.32k stars 247 forks source link

iOS App Crash NSInternalInconsistencyException - Sending a message before the FlutterEngine has been run. #2628

Closed raphire08 closed 1 year ago

raphire08 commented 1 year ago

Description

iOS Flutter App is crashing on production. Seems to be related to GaaphQL API. We are using AppSync to get notifications from server.

Categories

Steps to Reproduce

Not able to reproduce yet. Need help in reproduction. This is coming from swift library.

Screenshots

No response

Platforms

Android Device/Emulator API Level

No response

Environment

[✓] Flutter (Channel stable, 3.3.7, on macOS 13.0.1 22A400 darwin-x64, locale
    en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version
    33.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.74.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Dependencies

Dart SDK 2.18.4
Flutter SDK 3.3.7
fdgv2 1.23.13+31

dependencies:
- amplify_api 0.6.10 [amplify_api_android amplify_api_ios amplify_core amplify_flutter aws_common collection flutter meta plugin_platform_interface]
- amplify_auth_cognito 0.6.10 [amplify_auth_cognito_android amplify_auth_cognito_ios amplify_core aws_common collection flutter meta plugin_platform_interface]
- amplify_flutter 0.6.10 [amplify_core amplify_datastore_plugin_interface amplify_flutter_android amplify_flutter_ios aws_common collection flutter meta plugin_platform_interface]
- async 2.9.0 [collection meta]
- auto_size_text 3.0.0 [flutter]
- camera 0.10.0+4 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle quiver]
- characters 1.2.1
- charts_flutter 0.12.0 [charts_common collection flutter intl logging meta]
- collection 1.16.0
- connectivity_plus 3.0.2 [flutter flutter_web_plugins connectivity_plus_platform_interface js meta nm]
- cupertino_icons 1.0.5
- device_info_plus 8.0.0 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta win32]
- dotted_border 2.0.0+3 [flutter path_drawing]
- easy_mask 2.0.1 [flutter]
- email_validator 2.1.17
- f_logs 2.0.1 [flutter sembast path_provider intl xxtea meta path stack_trace]
- fdg_formula_engine_test 0.0.0 [path intl expression_language]
- firebase_core 2.4.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 3.0.11 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_messaging 14.2.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flat_buffers 2.0.5
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver archive async boolean_selector characters clock collection crypto matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math]
- flutter_image_compress 1.1.3 [flutter]
- flutter_inapp_notifications 0.0.3 [flutter]
- flutter_keyboard_visibility 5.4.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_linux flutter_keyboard_visibility_macos flutter_keyboard_visibility_web flutter_keyboard_visibility_windows flutter]
- flutter_local_notifications 12.0.3 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_slidable 2.0.0 [flutter]
- flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml]
- flutter_switch 0.3.2 [flutter]
- geolocator 9.0.2 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- google_fonts 3.0.1 [flutter http path_provider crypto]
- google_mlkit_text_recognition 0.5.0 [flutter google_mlkit_commons]
- gps_connectivity 0.0.4 [flutter meta plugin_platform_interface]
- http 0.13.5 [async http_parser meta path]
- hypertrack_plugin 0.4.3 [flutter plugin_platform_interface]
- image 3.2.2 [archive meta xml]
- image_cropper 3.0.1 [flutter image_cropper_platform_interface image_cropper_for_web]
- image_picker 0.8.6 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface]
- in_app_notification 1.1.2 [flutter]
- intl 0.17.0 [clock path]
- isolate_handler 1.0.2 [flutter flutter_isolate]
- json_annotation 4.7.0 [meta]
- jwt_decoder 2.0.1
- keyboard_actions 4.1.0 [flutter]
- linked_scroll_controller 0.2.0 [flutter]
- local_auth 2.1.2 [flutter intl local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows]
- numeric_keyboard 1.1.0 [flutter]
- objectbox 1.6.2 [collection flat_buffers ffi meta path]
- objectbox_flutter_libs 1.6.2 [objectbox path_provider]
- package_info_plus 3.0.1 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface win32]
- path 1.8.2
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- path_provider_android 2.0.21 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.11 [flutter path_provider_platform_interface]
- permission_handler 10.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface]
- petitparser 5.1.0 [meta]
- rxdart 0.27.5
- scanbot_sdk 2.9.1 [logging json_annotation flutter]
- scrollable_positioned_list 0.3.5 [flutter collection]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- sprintf 7.0.0
- string_validator 0.3.0
- syncfusion_flutter_datepicker 20.3.56 [flutter intl syncfusion_flutter_core]
- url_launcher 6.1.6 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- uuid 3.0.6 [crypto]
- visibility_detector 0.3.3 [flutter]
- webview_flutter 3.0.4 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]

transitive dependencies:
- _flutterfire_internals 1.0.12 [collection firebase_core firebase_core_platform_interface flutter meta]
- amplify_api_android 0.6.10 [flutter]
- amplify_api_ios 0.6.10 [amplify_core flutter]
- amplify_auth_cognito_android 0.6.10 [flutter]
- amplify_auth_cognito_ios 0.6.10 [amplify_core flutter]
- amplify_core 0.6.10 [aws_common collection flutter intl json_annotation meta plugin_platform_interface uuid]
- amplify_datastore_plugin_interface 0.6.10 [amplify_core collection flutter meta]
- amplify_flutter_android 0.6.10 [flutter]
- amplify_flutter_ios 0.6.10 [amplify_core flutter]
- archive 3.3.0 [crypto path]
- args 2.3.1
- aws_common 0.1.1 [async collection http meta stream_transform uuid]
- boolean_selector 2.1.0 [source_span string_scanner]
- camera_android 0.10.0+4 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform]
- camera_avfoundation 0.9.8+6 [camera_platform_interface flutter stream_transform]
- camera_platform_interface 2.3.0 [cross_file flutter plugin_platform_interface stream_transform]
- camera_web 0.3.0+1 [camera_platform_interface flutter flutter_web_plugins stream_transform]
- charts_common 0.12.0 [collection intl logging meta vector_math]
- clock 1.1.1
- connectivity_plus_platform_interface 1.2.3 [flutter meta plugin_platform_interface]
- cross_file 0.3.3+2 [js meta]
- crypto 3.0.2 [typed_data]
- dbus 0.7.8 [args ffi meta xml]
- device_info_plus_platform_interface 7.0.0 [flutter meta plugin_platform_interface]
- expression_language 1.0.0 [petitparser rational]
- fake_async 1.3.1 [clock collection]
- ffi 2.0.1
- file 6.1.2 [meta path]
- firebase_core_platform_interface 4.5.2 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.1.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.3.11 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 4.2.10 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.2.11 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- flutter_isolate 2.0.3 [flutter uuid]
- flutter_keyboard_visibility_linux 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_keyboard_visibility_macos 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter]
- flutter_keyboard_visibility_windows 1.0.0 [flutter_keyboard_visibility_platform_interface flutter]
- flutter_local_notifications_linux 2.0.0 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories]
- flutter_local_notifications_platform_interface 6.0.0 [flutter plugin_platform_interface]
- flutter_plugin_android_lifecycle 2.0.7 [flutter]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform]
- geolocator_android 4.1.4 [flutter geolocator_platform_interface]
- geolocator_apple 2.2.3 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.0.7 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface]
- geolocator_windows 0.1.1 [flutter geolocator_platform_interface]
- google_mlkit_commons 0.2.0 [flutter]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- image_cropper_for_web 1.0.3 [flutter flutter_web_plugins image_cropper_platform_interface js]
- image_cropper_platform_interface 3.0.3 [flutter plugin_platform_interface http]
- image_picker_android 0.8.5+3 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.1.10 [flutter flutter_web_plugins image_picker_platform_interface]
- image_picker_ios 0.8.6+1 [flutter image_picker_platform_interface]
- image_picker_platform_interface 2.6.2 [cross_file flutter http plugin_platform_interface]
- js 0.6.4
- local_auth_android 1.0.15 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface]
- local_auth_ios 1.0.10 [flutter intl local_auth_platform_interface]
- local_auth_platform_interface 1.0.5 [flutter intl plugin_platform_interface]
- local_auth_windows 1.0.4 [flutter local_auth_platform_interface]
- logging 1.1.0
- matcher 0.12.12 [stack_trace]
- material_color_utilities 0.1.5
- meta 1.8.0
- nm 0.5.0 [dbus]
- package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- path_drawing 1.0.1 [vector_math meta path_parsing flutter]
- path_parsing 1.0.1 [vector_math meta]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.5 [flutter platform plugin_platform_interface]
- path_provider_windows 2.1.3 [ffi flutter path path_provider_platform_interface win32]
- permission_handler_android 10.2.0 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.0.7 [flutter permission_handler_platform_interface]
- permission_handler_platform_interface 3.9.0 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.1.2 [flutter permission_handler_platform_interface]
- platform 3.1.0
- plugin_platform_interface 2.1.3 [meta]
- process 4.2.4 [file path platform]
- quiver 3.1.0 [matcher]
- rational 1.2.1
- sembast 3.3.1 [meta path synchronized]
- shared_preferences_android 2.0.14 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.1.0 [flutter plugin_platform_interface]
- shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- sky_engine 0.0.99
- source_span 1.9.0 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_transform 2.1.0
- string_scanner 1.1.1 [source_span]
- sync_http 0.3.1
- syncfusion_flutter_core 20.3.56 [vector_math flutter]
- synchronized 3.0.0+3
- term_glyph 1.2.1
- test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timezone 0.9.0 [path]
- typed_data 1.3.1 [collection]
- url_launcher_android 6.0.21 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.1 [flutter plugin_platform_interface]
- url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- vector_math 2.1.2
- vm_service 9.0.0
- webdriver 3.0.0 [archive matcher path stack_trace sync_http]
- webview_flutter_android 2.10.4 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 1.9.5 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 2.9.5 [flutter path webview_flutter_platform_interface]
- win32 3.1.1 [ffi]
- xdg_directories 0.2.0+2 [meta path process]
- xml 6.1.0 [collection meta petitparser]
- xxtea 2.1.0

Device

iPhone XR

OS

iOS 16.1.1

Deployment Method

Amplify CLI

CLI Version

No response

Additional Context

Logs captured from crashlytics

Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x9e88 __exceptionPreprocess 1 libobjc.A.dylib 0x178d8 objc_exception_throw 2 Foundation 0x545b4c _userInfoForFileAndLine 3 Flutter 0x12bac (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 amplify_api_ios 0x15218 thunk for @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () () 5 amplify_api_ios 0x154b4 GraphQLSubscriptionsStreamHandler.sendEvent(payload:id:type:) () 6 amplify_api_ios 0xe768 closure #2 in static FlutterGraphQLApi.createOperation(bridge:flutterResult:graphQLSubscriptionsStreamHandler:id:request:) + 213 (FlutterGraphQLApi.swift:213) 7 Amplify 0x18d54 closure #1 in AmplifyOperation.subscribe(resultListener:) 8 Amplify 0x196c4 partial apply for closure #1 in AmplifyOperation.subscribe(resultListener:) () 9 Amplify 0xbb1c8 closure #1 in SerialDispatcher.dispatch(to:) + 46 (SerialDispatcher.swift:46) 10 Amplify 0x67440 thunk for @escaping @callee_guaranteed () -> () () 11 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release 12 libdispatch.dylib 0x3fdc _dispatch_client_callout 13 libdispatch.dylib 0x70c8 _dispatch_queue_override_invoke 14 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain 15 libdispatch.dylib 0x16284 _dispatch_worker_thread2 16 libsystem_pthread.dylib 0xdbc _pthread_wqthread 17 libsystem_pthread.dylib 0xb98 start_wqthread com.apple.main-thread 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f7768 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x3da0f0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 Flutter 0x14424 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 6 Flutter 0xff90 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 7 CoreFoundation 0x37404 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 8 CoreFoundation 0xde474 ___CFXRegistrationPost_block_invoke + 88 9 CoreFoundation 0xc1724 _CFXRegistrationPost + 440 10 CoreFoundation 0x4ba08 _CFXNotificationPost + 704 11 Foundation 0x5cffc -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 12 UIKitCore 0xd384fc -[UIApplication _terminateWithStatus:] + 232 13 UIKitCore 0x290bd0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 112 14 UIKitCore 0x6a80e8 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 164 15 UIKitCore 0xd34908 -[UIApplication workspaceShouldExit:withTransitionContext:] + 176 16 FrontBoardServices 0x41a98 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72 17 FrontBoardServices 0x7294 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 18 FrontBoardServices 0x41a38 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 128 19 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 20 libdispatch.dylib 0x7a5c _dispatch_block_invoke_direct + 264 21 FrontBoardServices 0x113b0 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52 22 FrontBoardServices 0x10f4c -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 23 FrontBoardServices 0x1372c -[FBSSerialQueue _performNextFromRunLoopSource] + 28 24 CoreFoundation 0xd5f54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 25 CoreFoundation 0xe232c __CFRunLoopDoSource0 + 176 26 CoreFoundation 0x66210 __CFRunLoopDoSources0 + 244 27 CoreFoundation 0x7bba8 __CFRunLoopRun + 836 28 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 29 GraphicsServices 0x1368 GSEventRunModal + 164 30 UIKitCore 0x3a23d0 -[UIApplication _run] + 888 31 UIKitCore 0x3a2034 UIApplicationMain + 340 32 Runner 0x52f4 main + 5 (AppDelegate.swift:5) 33 ??? 0x1b10d0960 (Missing) com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232 6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 7 Foundation 0x42334 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 8 Foundation 0x4221c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 9 UIKitCore 0x4d733c -[UIEventFetcher threadMain] + 436 10 Foundation 0x5b808 __NSThread__start__ + 716 11 libsystem_pthread.dylib 0x16cc _pthread_start + 148 12 libsystem_pthread.dylib 0xba4 thread_start + 8 io.flutter.1.ui 0 libsystem_kernel.dylib 0x293c __munmap + 8 1 ObjectBox 0x128018 (Missing UUID 4cfa97c7b5fc371a9a74278f843e1c7f) 2 ObjectBox 0x12815c (Missing UUID 4cfa97c7b5fc371a9a74278f843e1c7f) 3 ObjectBox 0x63c5c obx_dart_query_find_ptr + 32108 4 ObjectBox 0xf3d90 obx_dart_query_find_ptr + 622240 5 ObjectBox 0x66184 obx_dart_query_find_ptr + 41620 6 ObjectBox 0x5ab44 obx_store_close + 104 7 ObjectBox 0x5c4fc obx_dart_query_find_ptr + 1548 8 Flutter 0x5c7fa4 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 9 Flutter 0x5c7d18 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 10 Flutter 0x5c88dc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 11 Flutter 0x6aa658 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 12 Flutter 0x573890 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 13 Flutter 0x5732fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 14 Flutter 0x3cc4a4 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 15 Flutter 0x3da7a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 16 Flutter 0x3dafcc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 17 Flutter 0x2f5ec4 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 18 Flutter 0x2f91fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 19 CoreFoundation 0xce35c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32 20 CoreFoundation 0x8a9d8 __CFRunLoopDoTimer + 940 21 CoreFoundation 0x2e598 __CFRunLoopDoTimers + 288 22 CoreFoundation 0x7bfcc __CFRunLoopRun + 1896 23 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 24 Flutter 0x2f90cc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 25 Flutter 0x2f8acc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 26 libsystem_pthread.dylib 0x16cc _pthread_start + 148 27 libsystem_pthread.dylib 0xba4 thread_start + 8 io.flutter.1.raster 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232 6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 7 Flutter 0x2f90cc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 8 Flutter 0x2f8acc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 9 libsystem_pthread.dylib 0x16cc _pthread_start + 148 10 libsystem_pthread.dylib 0xba4 thread_start + 8 io.flutter.1.io 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232 6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 7 Flutter 0x2f90cc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 8 Flutter 0x2f8acc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 9 libsystem_pthread.dylib 0x16cc _pthread_start + 148 10 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.1 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.2 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.3 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.4 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.5 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.6 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 dart:io EventHandler 0 libsystem_kernel.dylib 0x2480 kevent + 8 1 Flutter 0x4e432c (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 2 Flutter 0x513414 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 libsystem_pthread.dylib 0x16cc _pthread_start + 148 4 libsystem_pthread.dylib 0xba4 thread_start + 8 com.google.firebase.crashlytics.MachExceptionServer 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 FirebaseCrashlytics 0x18a50 FIRCLSMachExceptionServer + 192 (FIRCLSMachException.c:192) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232 6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 7 CFNetwork 0x2565a8 _CFURLStorageSessionDisableCache + 61088 8 Foundation 0x5b808 __NSThread__start__ + 716 9 libsystem_pthread.dylib 0x16cc _pthread_start + 148 10 libsystem_pthread.dylib 0xba4 thread_start + 8 com.smartlook.sdk.LoggingQueue (QOS: UTILITY) 0 Foundation 0x48308c specialized Set._Variant.insert(_:) + 246 1 SmartlookAnalytics 0xf841c static DiskCache.folderUrl(for:withSubfolders:) + 142 (DiskCache.swift:142) 2 SmartlookAnalytics 0xf7fd8 static DiskCache.cache(for:subfolders:item:archive:) + 74 (DiskCache.swift:74) 3 SmartlookAnalytics 0x96718 LogsUploadOperation.perform() + 19 (LogsUploadOperation.swift:19) 4 SmartlookAnalytics 0x14a544 BaseOperation.start() + 161 (BaseOperation.swift:161) 5 SmartlookAnalytics 0x14a5e0 @objc BaseOperation.start() + 3760 (:3760) 6 Foundation 0x3c50c __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 16 7 Foundation 0x41c20 __NSOQSchedule_f + 172 8 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 9 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 10 libdispatch.dylib 0x746c _dispatch_continuation_pop + 504 11 libdispatch.dylib 0x6ad4 _dispatch_async_redirect_invoke + 584 12 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain + 396 13 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 14 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 15 libsystem_pthread.dylib 0xb98 start_wqthread + 8 com.apple.CFNetwork.LoaderQ 0 libsystem_kernel.dylib 0x54dc necp_client_action + 8 1 Network 0x906614 nw_path_evaluator_evaluate + 604 2 Network 0x905c48 nw_path_create_evaluator_for_endpoint + 104 3 SystemConfiguration 0x6b778 copy_path_for_app + 460 4 SystemConfiguration 0xb938 VPNAppLayerGetMatchingServiceIdentifier + 88 5 SystemConfiguration 0x16f0 _SCNetworkProxiesCopyMatchingInternal + 472 6 CFNetwork 0x45fc0 CFURLCacheRemoveAllCachedResponses + 4424 7 CFNetwork 0x58e20 CFURLCacheCopySharedURLCache + 9128 8 CFNetwork 0x43450 CFHTTPCookieStorageGetCookieAcceptPolicy + 2048 9 CFNetwork 0x4874 CFURLRequestSetHTTPRequestBody + 9188 10 CFNetwork 0x20f0c CFURLRequestSetMainDocumentURL + 6732 11 CFNetwork 0x17294 CFURLRequestSetURL + 8912 12 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 13 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 14 libdispatch.dylib 0xb694 _dispatch_lane_serial_drain + 672 15 libdispatch.dylib 0xc214 _dispatch_lane_invoke + 436 16 libdispatch.dylib 0xd4f8 _dispatch_workloop_invoke + 1780 17 libdispatch.dylib 0x16e10 _dispatch_workloop_worker_thread + 652 18 libsystem_pthread.dylib 0xdf8 _pthread_wqthread + 288 19 libsystem_pthread.dylib 0xb98 start_wqthread + 8 Crashed: DartWorker 0 FirebaseCrashlytics 0x1eea8 FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393) 1 FirebaseCrashlytics 0x1f288 FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424) 2 FirebaseCrashlytics 0x164d4 FIRCLSHandler + 34 (FIRCLSHandler.m:34) 3 FirebaseCrashlytics 0x111a8 __FIRCLSExceptionRecord_block_invoke + 232 (FIRCLSException.mm:232) 4 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 5 libdispatch.dylib 0x13574 _dispatch_lane_barrier_sync_invoke_and_complete + 56 6 FirebaseCrashlytics 0x101b4 FIRCLSExceptionRecord + 234 (FIRCLSException.mm:234) 7 FirebaseCrashlytics 0x10cc8 FIRCLSExceptionRecordNSException + 126 (FIRCLSException.mm:126) 8 FirebaseCrashlytics 0xfe0c FIRCLSTerminateHandler() + 398 (FIRCLSException.mm:398) 9 libc++abi.dylib 0x10f28 std::__terminate(void (*)()) + 20 10 libc++abi.dylib 0x10ec4 std::terminate() + 56 11 libobjc.A.dylib 0x33bec objc_terminate + 16 12 libdispatch.dylib 0x3ff0 _dispatch_client_callout + 40 13 libdispatch.dylib 0x70c8 _dispatch_queue_override_invoke + 788 14 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain + 396 15 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 16 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 17 libsystem_pthread.dylib 0xb98 start_wqthread + 8 com.amazonaws.AppSyncRealTimeConnectionProvider.serialQueue 0 libsystem_kernel.dylib 0xac4 semaphore_wait_trap + 8 1 libdispatch.dylib 0x4578 _dispatch_sema4_wait + 28 2 libdispatch.dylib 0x4c2c _dispatch_semaphore_wait_slow + 132 3 AWSPluginsCore 0x13e44 AWSAuthService.getToken() + 149 (AWSAuthService.swift:149) 4 AWSPluginsCore 0x14188 protocol witness for AWSAuthServiceBehavior.getToken() in conformance AWSAuthService + 28 (:28) 5 AmplifyPlugins 0x4b8d8 protocol witness for OIDCAuthProvider.getLatestAuthToken() in conformance AWSOIDCAuthProvider + 22 (AWSOIDCAuthProvider.swift:22) 6 AppSyncRealTimeClient 0x16bc8 OIDCAuthInterceptor.interceptMessage(_:for:) + 21 (OIDCAuthInterceptor.swift:21) 7 AppSyncRealTimeClient 0x17434 protocol witness for MessageInterceptor.interceptMessage(_:for:) in conformance OIDCAuthInterceptor + 32 (:32) 8 AppSyncRealTimeClient 0x1ccac RealtimeConnectionProvider.interceptMessage(_:for:) + 256 (:256) 9 AppSyncRealTimeClient 0x1a040 closure #1 in RealtimeConnectionProvider.write(_:) + 144 10 AppSyncRealTimeClient 0x19404 thunk for @escaping @callee_guaranteed () -> () + 28 (:28) 11 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 12 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 13 libdispatch.dylib 0xb694 _dispatch_lane_serial_drain + 672 14 libdispatch.dylib 0xc1e0 _dispatch_lane_invoke + 384 15 libdispatch.dylib 0x16e10 _dispatch_workloop_worker_thread + 652 16 libsystem_pthread.dylib 0xdf8 _pthread_wqthread + 288 17 libsystem_pthread.dylib 0xb98 start_wqthread + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 com.apple.root.default-qos 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 libdispatch.dylib 0x1f364 _dispatch_mach_send_and_wait_for_reply + 540 5 libdispatch.dylib 0x1f6ec dispatch_mach_send_with_result_and_wait_for_reply + 60 6 libxpc.dylib 0x102e4 xpc_connection_send_message_with_reply_sync + 240 7 Security 0x79b4 securityd_message_with_reply_sync + 124 8 Security 0x11aa4 securityd_send_sync_and_do + 88 9 Security 0xb8598 cftype_to_bool_cftype_error_request + 160 10 Security 0x1d4c __SecItemCopyMatching_block_invoke_2 + 200 11 Security 0x4dc4 __SecItemAuthDoQuery_block_invoke + 532 12 Security 0x3898 SecItemAuthDoQuery + 1236 13 Security 0x4a94 __SecItemCopyMatching_block_invoke + 140 14 Security 0xa99c SecOSStatusWith + 56 15 Security 0x495c SecItemCopyMatching + 400 16 AWSCore 0x51700 -[AWSUICKeyChainStore dataForKey:error:] + 457 (AWSUICKeyChainStore.m:457) 17 AWSCore 0x51348 -[AWSUICKeyChainStore stringForKey:error:] + 377 (AWSUICKeyChainStore.m:377) 18 AWSCognitoIdentityProvider 0x3f0d4 -[AWSCognitoIdentityUser refreshTokenFromKeyChain:] + 1477 (AWSCognitoIdentityUser.m:1477) 19 AWSCognitoIdentityProvider 0x34c8c -[AWSCognitoIdentityUser getSession] + 226 (AWSCognitoIdentityUser.m:226) 20 AWSMobileClient 0x398bc protocol witness for CognitoIdentityUserBehavior.getUserPoolToken(completion:) in conformance AWSCognitoIdentityUser + 26 (CognitoIdentityUserBehavior.swift:26) 21 AWSMobileClient 0x3ea04 FetchUserPoolTokensOperation.fetchToken() + 768 (:768) 22 AWSMobileClient 0x3f71c partial apply for closure #1 in closure #1 in FetchUserPoolTokensOperation.acceptEvent(_:) + 20 (:20) 23 AWSMobileClient 0x2a7bc thunk for @escaping @callee_guaranteed () -> () + 28 (:28) 24 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 25 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 26 libdispatch.dylib 0x70c8 _dispatch_queue_override_invoke + 788 27 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain + 396 28 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 29 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 30 libsystem_pthread.dylib 0xb98 start_wqthread + 8 com.apple.root.default-qos 0 libsystem_kernel.dylib 0x8cac __semwait_signal_nocancel + 8 1 libsystem_c.dylib 0x23ee4 nanosleep$NOCANCEL + 216 2 libsystem_c.dylib 0x4a960 usleep$NOCANCEL + 68 3 libsystem_c.dylib 0x20c94 abort + 188 4 FirebaseCrashlytics 0xfde8 FIRCLSTerminateHandler() + 455 (FIRCLSException.mm:455) 5 libc++abi.dylib 0x10f28 std::__terminate(void (*)()) + 20 6 libc++abi.dylib 0x10ec4 std::terminate() + 56 7 libobjc.A.dylib 0x33bec objc_terminate + 16 8 libdispatch.dylib 0x3ff0 _dispatch_client_callout + 40 9 libdispatch.dylib 0x70c8 _dispatch_queue_override_invoke + 788 10 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain + 396 11 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 12 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 13 libsystem_pthread.dylib 0xb98 start_wqthread + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 Thread 0 libsystem_kernel.dylib 0x1050 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xe44 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0xb98 start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1050 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xe44 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0xb98 start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1050 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xe44 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0xb98 start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1050 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xe44 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0xb98 start_wqthread + 8

Amplify Config

{ "UserAgent": "aws-amplify-cli/2.0", "Version": "1.0", "auth": { "plugins": { "awsCognitoAuthPlugin": { "UserAgent": "aws-amplify/cli", "Version": "0.1.0", "IdentityManager": { "Default": {} }, "CognitoUserPool": { "Default": { "PoolId": "xxxxx", "AppClientId": "xxxxx", "AppClientSecret": "xxxxx", "Region": "xxxx" } }, "Auth": { "Default": { "authenticationFlowType": "USER_SRP_AUTH" } } } } }, "api": { "plugins": { "awsAPIPlugin": { "xxx": { "endpointType": "GraphQL", "endpoint": "xxx", "region": "xxx", "authorizationType": "AMAZON_COGNITO_USER_POOLS" } } } } }''';

fjnoyp commented 1 year ago

Hi we'll need more information to know what is going on.

A NS internal consistency exception is a general exception thrown when an internal assertion fails.

Does this issue happen on the iOS simulator at all?

Does it happen on a test deploy to a iOS device from Xcode?

Does it affect all devices you run your app on?

Does your app crash on startup or when you click on a button, etc.

Full log of error message.

What code do you use for graphql?

raphire08 commented 1 year ago

@fjnoyp

This issue is currently coming in crashlytics console. It is currently faced by end users in their devices. We have not tried this in simulator yet. I am not sure if this is device specific issue. Seems like if certain conditions are met, it will happen in all the iOS devices.

The log messages are attached above in additional context. May be this can help

4 amplify_api_ios 0x15218 thunk for https://github.com/escaping @callee_unowned @convention(block) (https://github.com/unowned Swift.AnyObject?) -> () ()
5 amplify_api_ios 0x154b4 GraphQLSubscriptionsStreamHandler.sendEvent(payload🆔type:) ()
6 amplify_api_ios 0xe768 closure https://github.com/aws-amplify/amplify-flutter/pull/2 in static FlutterGraphQLApi.createOperation(bridge:flutterResult:graphQLSubscriptionsStreamHandler🆔request:) + 213 (FlutterGraphQLApi.swift:213)
7 Amplify 0x18d54 closure https://github.com/aws-amplify/amplify-flutter/pull/1 in AmplifyOperation.subscribe(resultListener:)
8 Amplify 0x196c4 partial apply for closure https://github.com/aws-amplify/amplify-flutter/pull/1 in AmplifyOperation.subscribe(resultListener:) ()
9 Amplify 0xbb1c8 closure https://github.com/aws-amplify/amplify-flutter/pull/1 in SerialDispatcher.dispatch(to:) + 46 (SerialDispatcher.swift:46)

Code at our end

 String subscriptionDocument = getSubscriptionModel();
        Map<String, dynamic> variables =
            getVariables(ids.userId, ids.tenantId);
  _stream = Amplify.API.subscribe(
          GraphQLRequest<String>(
              apiName: appSyncApiName,
              document: subscriptionDocument,
              variables: variables),
          onEstablished: () {
            Log.logInfo('AppSync connection established');
          },
        );

 _subscription = _stream?.listen((event) {
        onData(event, syncReading);
      }, onDone: () {
        Log.logInfo('AppSync connection closed');
      }, onError: (e, s) {
        Log.logError('Error in AppSync connection',
            exception: e, stackTrace: s);
      });

We have to close subscription and resubscribe on every app background/foreground operation and on network disconnection.

fjnoyp commented 1 year ago

Hi @raphire08

Can you please provide the entire exception stacktrace and more information on the exception. At this point all I know is it's an NSInternalInconsistencyException which doesn't give me much information on what was inconsistent.

The log messages provided also don't give much information. I don't see any crash information within them, they just seem to be normal running logs. Where did you get those logs from?

Also is this a fatal exception or just an exception being logged in Firebase Crashlytics?

Regarding your code, can you please provide the subscriptionDocument you generate and also the code that closes subscription/resubscribes.

Thanks!

raphire08 commented 1 year ago

@fjnoyp

In firebase crashlytics it is coming under crashes

I am submitting the entire stack trace from crashlytics here

LOGS Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x9e88 __exceptionPreprocess 1 libobjc.A.dylib 0x178d8 objc_exception_throw 2 Foundation 0x545b4c _userInfoForFileAndLine 3 Flutter 0x12bac (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 amplify_api_ios 0x15218 thunk for @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () () 5 amplify_api_ios 0x154b4 GraphQLSubscriptionsStreamHandler.sendEvent(payload:id:type:) () 6 amplify_api_ios 0xe768 closure #2 in static FlutterGraphQLApi.createOperation(bridge:flutterResult:graphQLSubscriptionsStreamHandler:id:request:) + 213 (FlutterGraphQLApi.swift:213) 7 Amplify 0x18d54 closure #1 in AmplifyOperation.subscribe(resultListener:) 8 Amplify 0x196c4 partial apply for closure #1 in AmplifyOperation.subscribe(resultListener:) () 9 Amplify 0xbb1c8 closure #1 in SerialDispatcher.dispatch(to:) + 46 (SerialDispatcher.swift:46) 10 Amplify 0x67440 thunk for @escaping @callee_guaranteed () -> () () 11 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release 12 libdispatch.dylib 0x3fdc _dispatch_client_callout 13 libdispatch.dylib 0x70c8 _dispatch_queue_override_invoke 14 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain 15 libdispatch.dylib 0x16284 _dispatch_worker_thread2 16 libsystem_pthread.dylib 0xdbc _pthread_wqthread 17 libsystem_pthread.dylib 0xb98 start_wqthread com.apple.main-thread 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f7768 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x3da0f0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 Flutter 0x14424 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 6 Flutter 0xff90 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 7 CoreFoundation 0x37404 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 8 CoreFoundation 0xde474 ___CFXRegistrationPost_block_invoke + 88 9 CoreFoundation 0xc1724 _CFXRegistrationPost + 440 10 CoreFoundation 0x4ba08 _CFXNotificationPost + 704 11 Foundation 0x5cffc -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 12 UIKitCore 0xd384fc -[UIApplication _terminateWithStatus:] + 232 13 UIKitCore 0x290bd0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 112 14 UIKitCore 0x6a80e8 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 164 15 UIKitCore 0xd34908 -[UIApplication workspaceShouldExit:withTransitionContext:] + 176 16 FrontBoardServices 0x41a98 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72 17 FrontBoardServices 0x7294 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 18 FrontBoardServices 0x41a38 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 128 19 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 20 libdispatch.dylib 0x7a5c _dispatch_block_invoke_direct + 264 21 FrontBoardServices 0x113b0 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52 22 FrontBoardServices 0x10f4c -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 23 FrontBoardServices 0x1372c -[FBSSerialQueue _performNextFromRunLoopSource] + 28 24 CoreFoundation 0xd5f54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 25 CoreFoundation 0xe232c __CFRunLoopDoSource0 + 176 26 CoreFoundation 0x66210 __CFRunLoopDoSources0 + 244 27 CoreFoundation 0x7bba8 __CFRunLoopRun + 836 28 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 29 GraphicsServices 0x1368 GSEventRunModal + 164 30 UIKitCore 0x3a23d0 -[UIApplication _run] + 888 31 UIKitCore 0x3a2034 UIApplicationMain + 340 32 Runner 0x52f4 main + 5 (AppDelegate.swift:5) 33 ??? 0x1b10d0960 (Missing) com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232 6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 7 Foundation 0x42334 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 8 Foundation 0x4221c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 9 UIKitCore 0x4d733c -[UIEventFetcher threadMain] + 436 10 Foundation 0x5b808 __NSThread__start__ + 716 11 libsystem_pthread.dylib 0x16cc _pthread_start + 148 12 libsystem_pthread.dylib 0xba4 thread_start + 8 io.flutter.1.ui 0 libsystem_kernel.dylib 0x293c __munmap + 8 1 ObjectBox 0x128018 (Missing UUID 4cfa97c7b5fc371a9a74278f843e1c7f) 2 ObjectBox 0x12815c (Missing UUID 4cfa97c7b5fc371a9a74278f843e1c7f) 3 ObjectBox 0x63c5c obx_dart_query_find_ptr + 32108 4 ObjectBox 0xf3d90 obx_dart_query_find_ptr + 622240 5 ObjectBox 0x66184 obx_dart_query_find_ptr + 41620 6 ObjectBox 0x5ab44 obx_store_close + 104 7 ObjectBox 0x5c4fc obx_dart_query_find_ptr + 1548 8 Flutter 0x5c7fa4 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 9 Flutter 0x5c7d18 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 10 Flutter 0x5c88dc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 11 Flutter 0x6aa658 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 12 Flutter 0x573890 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 13 Flutter 0x5732fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 14 Flutter 0x3cc4a4 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 15 Flutter 0x3da7a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 16 Flutter 0x3dafcc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 17 Flutter 0x2f5ec4 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 18 Flutter 0x2f91fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 19 CoreFoundation 0xce35c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32 20 CoreFoundation 0x8a9d8 __CFRunLoopDoTimer + 940 21 CoreFoundation 0x2e598 __CFRunLoopDoTimers + 288 22 CoreFoundation 0x7bfcc __CFRunLoopRun + 1896 23 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 24 Flutter 0x2f90cc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 25 Flutter 0x2f8acc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 26 libsystem_pthread.dylib 0x16cc _pthread_start + 148 27 libsystem_pthread.dylib 0xba4 thread_start + 8 io.flutter.1.raster 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232 6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 7 Flutter 0x2f90cc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 8 Flutter 0x2f8acc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 9 libsystem_pthread.dylib 0x16cc _pthread_start + 148 10 libsystem_pthread.dylib 0xba4 thread_start + 8 io.flutter.1.io 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232 6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 7 Flutter 0x2f90cc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 8 Flutter 0x2f8acc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 9 libsystem_pthread.dylib 0x16cc _pthread_start + 148 10 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.1 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.2 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.3 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.4 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.5 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 io.worker.6 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x806c _pthread_cond_wait + 1232 2 libc++.1.dylib 0xcacc std::__1::condition_variable::wait(std::__1::unique_lock&) + 28 3 Flutter 0x2f3840 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 libsystem_pthread.dylib 0x16cc _pthread_start + 148 5 libsystem_pthread.dylib 0xba4 thread_start + 8 dart:io EventHandler 0 libsystem_kernel.dylib 0x2480 kevent + 8 1 Flutter 0x4e432c (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 2 Flutter 0x513414 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 libsystem_pthread.dylib 0x16cc _pthread_start + 148 4 libsystem_pthread.dylib 0xba4 thread_start + 8 com.google.firebase.crashlytics.MachExceptionServer 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 FirebaseCrashlytics 0x18a50 FIRCLSMachExceptionServer + 192 (FIRCLSMachException.c:192) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 CoreFoundation 0x7aaf0 __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x7bd34 __CFRunLoopRun + 1232 6 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 7 CFNetwork 0x2565a8 _CFURLStorageSessionDisableCache + 61088 8 Foundation 0x5b808 __NSThread__start__ + 716 9 libsystem_pthread.dylib 0x16cc _pthread_start + 148 10 libsystem_pthread.dylib 0xba4 thread_start + 8 com.smartlook.sdk.LoggingQueue (QOS: UTILITY) 0 Foundation 0x48308c specialized Set._Variant.insert(_:) + 246 1 SmartlookAnalytics 0xf841c static DiskCache.folderUrl(for:withSubfolders:) + 142 (DiskCache.swift:142) 2 SmartlookAnalytics 0xf7fd8 static DiskCache.cache(for:subfolders:item:archive:) + 74 (DiskCache.swift:74) 3 SmartlookAnalytics 0x96718 LogsUploadOperation.perform() + 19 (LogsUploadOperation.swift:19) 4 SmartlookAnalytics 0x14a544 BaseOperation.start() + 161 (BaseOperation.swift:161) 5 SmartlookAnalytics 0x14a5e0 @objc BaseOperation.start() + 3760 (:3760) 6 Foundation 0x3c50c __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 16 7 Foundation 0x41c20 __NSOQSchedule_f + 172 8 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 9 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 10 libdispatch.dylib 0x746c _dispatch_continuation_pop + 504 11 libdispatch.dylib 0x6ad4 _dispatch_async_redirect_invoke + 584 12 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain + 396 13 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 14 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 15 libsystem_pthread.dylib 0xb98 start_wqthread + 8 com.apple.CFNetwork.LoaderQ 0 libsystem_kernel.dylib 0x54dc necp_client_action + 8 1 Network 0x906614 nw_path_evaluator_evaluate + 604 2 Network 0x905c48 nw_path_create_evaluator_for_endpoint + 104 3 SystemConfiguration 0x6b778 copy_path_for_app + 460 4 SystemConfiguration 0xb938 VPNAppLayerGetMatchingServiceIdentifier + 88 5 SystemConfiguration 0x16f0 _SCNetworkProxiesCopyMatchingInternal + 472 6 CFNetwork 0x45fc0 CFURLCacheRemoveAllCachedResponses + 4424 7 CFNetwork 0x58e20 CFURLCacheCopySharedURLCache + 9128 8 CFNetwork 0x43450 CFHTTPCookieStorageGetCookieAcceptPolicy + 2048 9 CFNetwork 0x4874 CFURLRequestSetHTTPRequestBody + 9188 10 CFNetwork 0x20f0c CFURLRequestSetMainDocumentURL + 6732 11 CFNetwork 0x17294 CFURLRequestSetURL + 8912 12 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 13 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 14 libdispatch.dylib 0xb694 _dispatch_lane_serial_drain + 672 15 libdispatch.dylib 0xc214 _dispatch_lane_invoke + 436 16 libdispatch.dylib 0xd4f8 _dispatch_workloop_invoke + 1780 17 libdispatch.dylib 0x16e10 _dispatch_workloop_worker_thread + 652 18 libsystem_pthread.dylib 0xdf8 _pthread_wqthread + 288 19 libsystem_pthread.dylib 0xb98 start_wqthread + 8 Crashed: DartWorker 0 FirebaseCrashlytics 0x1eea8 FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393) 1 FirebaseCrashlytics 0x1f288 FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424) 2 FirebaseCrashlytics 0x164d4 FIRCLSHandler + 34 (FIRCLSHandler.m:34) 3 FirebaseCrashlytics 0x111a8 __FIRCLSExceptionRecord_block_invoke + 232 (FIRCLSException.mm:232) 4 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 5 libdispatch.dylib 0x13574 _dispatch_lane_barrier_sync_invoke_and_complete + 56 6 FirebaseCrashlytics 0x101b4 FIRCLSExceptionRecord + 234 (FIRCLSException.mm:234) 7 FirebaseCrashlytics 0x10cc8 FIRCLSExceptionRecordNSException + 126 (FIRCLSException.mm:126) 8 FirebaseCrashlytics 0xfe0c FIRCLSTerminateHandler() + 398 (FIRCLSException.mm:398) 9 libc++abi.dylib 0x10f28 std::__terminate(void (*)()) + 20 10 libc++abi.dylib 0x10ec4 std::terminate() + 56 11 libobjc.A.dylib 0x33bec objc_terminate + 16 12 libdispatch.dylib 0x3ff0 _dispatch_client_callout + 40 13 libdispatch.dylib 0x70c8 _dispatch_queue_override_invoke + 788 14 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain + 396 15 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 16 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 17 libsystem_pthread.dylib 0xb98 start_wqthread + 8 com.amazonaws.AppSyncRealTimeConnectionProvider.serialQueue 0 libsystem_kernel.dylib 0xac4 semaphore_wait_trap + 8 1 libdispatch.dylib 0x4578 _dispatch_sema4_wait + 28 2 libdispatch.dylib 0x4c2c _dispatch_semaphore_wait_slow + 132 3 AWSPluginsCore 0x13e44 AWSAuthService.getToken() + 149 (AWSAuthService.swift:149) 4 AWSPluginsCore 0x14188 protocol witness for AWSAuthServiceBehavior.getToken() in conformance AWSAuthService + 28 (:28) 5 AmplifyPlugins 0x4b8d8 protocol witness for OIDCAuthProvider.getLatestAuthToken() in conformance AWSOIDCAuthProvider + 22 (AWSOIDCAuthProvider.swift:22) 6 AppSyncRealTimeClient 0x16bc8 OIDCAuthInterceptor.interceptMessage(_:for:) + 21 (OIDCAuthInterceptor.swift:21) 7 AppSyncRealTimeClient 0x17434 protocol witness for MessageInterceptor.interceptMessage(_:for:) in conformance OIDCAuthInterceptor + 32 (:32) 8 AppSyncRealTimeClient 0x1ccac RealtimeConnectionProvider.interceptMessage(_:for:) + 256 (:256) 9 AppSyncRealTimeClient 0x1a040 closure #1 in RealtimeConnectionProvider.write(_:) + 144 10 AppSyncRealTimeClient 0x19404 thunk for @escaping @callee_guaranteed () -> () + 28 (:28) 11 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 12 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 13 libdispatch.dylib 0xb694 _dispatch_lane_serial_drain + 672 14 libdispatch.dylib 0xc1e0 _dispatch_lane_invoke + 384 15 libdispatch.dylib 0x16e10 _dispatch_workloop_worker_thread + 652 16 libsystem_pthread.dylib 0xdf8 _pthread_wqthread + 288 17 libsystem_pthread.dylib 0xb98 start_wqthread + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 com.apple.root.default-qos 0 libsystem_kernel.dylib 0xb48 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x13008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x13248 mach_msg_overwrite + 388 3 libsystem_kernel.dylib 0x108c mach_msg + 24 4 libdispatch.dylib 0x1f364 _dispatch_mach_send_and_wait_for_reply + 540 5 libdispatch.dylib 0x1f6ec dispatch_mach_send_with_result_and_wait_for_reply + 60 6 libxpc.dylib 0x102e4 xpc_connection_send_message_with_reply_sync + 240 7 Security 0x79b4 securityd_message_with_reply_sync + 124 8 Security 0x11aa4 securityd_send_sync_and_do + 88 9 Security 0xb8598 cftype_to_bool_cftype_error_request + 160 10 Security 0x1d4c __SecItemCopyMatching_block_invoke_2 + 200 11 Security 0x4dc4 __SecItemAuthDoQuery_block_invoke + 532 12 Security 0x3898 SecItemAuthDoQuery + 1236 13 Security 0x4a94 __SecItemCopyMatching_block_invoke + 140 14 Security 0xa99c SecOSStatusWith + 56 15 Security 0x495c SecItemCopyMatching + 400 16 AWSCore 0x51700 -[AWSUICKeyChainStore dataForKey:error:] + 457 (AWSUICKeyChainStore.m:457) 17 AWSCore 0x51348 -[AWSUICKeyChainStore stringForKey:error:] + 377 (AWSUICKeyChainStore.m:377) 18 AWSCognitoIdentityProvider 0x3f0d4 -[AWSCognitoIdentityUser refreshTokenFromKeyChain:] + 1477 (AWSCognitoIdentityUser.m:1477) 19 AWSCognitoIdentityProvider 0x34c8c -[AWSCognitoIdentityUser getSession] + 226 (AWSCognitoIdentityUser.m:226) 20 AWSMobileClient 0x398bc protocol witness for CognitoIdentityUserBehavior.getUserPoolToken(completion:) in conformance AWSCognitoIdentityUser + 26 (CognitoIdentityUserBehavior.swift:26) 21 AWSMobileClient 0x3ea04 FetchUserPoolTokensOperation.fetchToken() + 768 (:768) 22 AWSMobileClient 0x3f71c partial apply for closure #1 in closure #1 in FetchUserPoolTokensOperation.acceptEvent(_:) + 20 (:20) 23 AWSMobileClient 0x2a7bc thunk for @escaping @callee_guaranteed () -> () + 28 (:28) 24 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32 25 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20 26 libdispatch.dylib 0x70c8 _dispatch_queue_override_invoke + 788 27 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain + 396 28 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 29 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 30 libsystem_pthread.dylib 0xb98 start_wqthread + 8 com.apple.root.default-qos 0 libsystem_kernel.dylib 0x8cac __semwait_signal_nocancel + 8 1 libsystem_c.dylib 0x23ee4 nanosleep$NOCANCEL + 216 2 libsystem_c.dylib 0x4a960 usleep$NOCANCEL + 68 3 libsystem_c.dylib 0x20c94 abort + 188 4 FirebaseCrashlytics 0xfde8 FIRCLSTerminateHandler() + 455 (FIRCLSException.mm:455) 5 libc++abi.dylib 0x10f28 std::__terminate(void (*)()) + 20 6 libc++abi.dylib 0x10ec4 std::terminate() + 56 7 libobjc.A.dylib 0x33bec objc_terminate + 16 8 libdispatch.dylib 0x3ff0 _dispatch_client_callout + 40 9 libdispatch.dylib 0x70c8 _dispatch_queue_override_invoke + 788 10 libdispatch.dylib 0x15a6c _dispatch_root_queue_drain + 396 11 libdispatch.dylib 0x16284 _dispatch_worker_thread2 + 164 12 libsystem_pthread.dylib 0xdbc _pthread_wqthread + 228 13 libsystem_pthread.dylib 0xb98 start_wqthread + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 DartWorker 0 libsystem_kernel.dylib 0x141c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x8098 _pthread_cond_wait + 1276 2 Flutter 0x62a8fc (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 3 Flutter 0x66b9a0 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 4 Flutter 0x62a224 (Missing UUID 4aeaca1fde2f3daeb5830cf99fcf86e3) 5 libsystem_pthread.dylib 0x16cc _pthread_start + 148 6 libsystem_pthread.dylib 0xba4 thread_start + 8 Thread 0 libsystem_kernel.dylib 0x1050 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xe44 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0xb98 start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1050 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xe44 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0xb98 start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1050 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xe44 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0xb98 start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1050 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xe44 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0xb98 start_wqthread + 8

Document

'''
subscription OnSubscriptionEvent(\$userId: String, \$tenantId: String) {
  onSubscriptionEvent(userId: \$userId, tenantId: \$tenantId) {
    eventData
    eventType
    tenantId
    userId
  }
}
''';

Cancel Call

if (_stream != null) {
      _subscription?.cancel().then((value) {
        Log.logInfo('app sync cancelled');
      });
      _stream = null;
}

Resubscription is same function as mentioned above

Thanks

fjnoyp commented 1 year ago

Thanks @raphire08 . Do you have any more information on how to reproduce this issue as well?

It seems like it's being registered in your Firebase Crashlytics. What % of unique users are affected by this crash?

raphire08 commented 1 year ago

@fjnoyp We are still trying to reproduce this at our end. If we found reproduction steps we will mention here. 10% of the users are getting effected. But Firebase is mentioning this as 100% background. I guess it means that device was in background state but I could not find firebase documentation mentioning this somewhere

Screenshot 2023-02-07 at 11 01 24 AM
ragingsquirrel3 commented 1 year ago

@raphire08 a few more questions/comments to help reproduce. I've been looking at some other issues with GraphQL subscriptions in background on iOS and have generally noticed they are more likely to repro on a physical device, not simulator. I still haven't reprod this one, but sharing in case that helps on your end.

Regarding your cancel call, could you share more info/code about how you are calling it? Are you using WidgetsBindingObserver to detect foreground/bacground events? Do you mind sharing the code that actually calls the cancel method so it can help us repro?

raphire08 commented 1 year ago

hi @ragingsquirrel3

Thanks for heads up we will try to reproduce in device only. Do you think it could depend on debug mode or release mode. For some instances of background / foreground operation I have seen different behaviour for different modes.

Please find the code for cancel. Thanks

SAMPLE CODE ```dart import 'dart:async'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/cupertino.dart'; class SplashScreen extends StatefulWidget { const SplashScreen({Key? key}) : super(key: key); @override SplashScreenState createState() => SplashScreenState(); } class SplashScreenState extends State { final _presenter = SplashScreenPresenter(); @override void initState() { super.initState(); init(); } void init() { WidgetsBinding.instance.addPostFrameCallback((_) => _presenter .handleAppStart(context) .whenComplete(() => WidgetsBinding.instance.addObserver(LifecycleEventHandler()))); } @override Widget build(BuildContext context) { return Container(); } } class LifecycleEventHandler extends WidgetsBindingObserver { @override Future didChangeAppLifecycleState(AppLifecycleState state) async { switch (state) { case AppLifecycleState.resumed: Log.logInfo('App on resume mode by user'); await onResume(); break; case AppLifecycleState.inactive: Log.logInfo('App on inactive mode by user'); cancelAppSyncSubscriptions(); break; case AppLifecycleState.paused: Log.logInfo('App on pause mode by user'); cancelAppSyncSubscriptions(); break; case AppLifecycleState.detached: Log.logInfo('App on detached mode by user'); break; } } Future onResume() async { bool isLoggedIn = await checkUserStatus(); if (isLoggedIn) { syncData().then((value) { startAppSyncSubscriptions(); }); } } Future syncData() async { // awaited API calls } void cancelAppSyncSubscriptions() { AppSync().cancel(); } void startAppSyncSubscriptions() async { AppSync().subscribe(() {}); } Future checkUserStatus() { // return true false actual return Future.delayed(const Duration(seconds: 1), () => true); } } class AppSync { // making class singleton static final AppSync _instance = AppSync.internal(); AppSync.internal(); factory AppSync() { return _instance; } Stream>? _stream; String appSyncApiName = ''; StreamSubscription>? _subscription; Future subscribe( void Function() sync, ) async { await subscribeToData(sync); } Future subscribeToData( void Function() sync, ) async { Log.logInfo('subscribing to app sync'); if (_stream == null) { try { String subscriptionDocument = getSubscriptionModel(); Map variables = {}; // user id _stream = Amplify.API.subscribe( GraphQLRequest( apiName: appSyncApiName, document: subscriptionDocument, variables: variables), onEstablished: () { Log.logInfo('AppSync connection established '); }, ); } on ApiException catch (e, s) { Log.logError('Error in establishing AppSync connection', exception: e, stackTrace: s); } _subscription = _stream?.listen((event) { onData(event, sync); }, onDone: () { Log.logInfo('AppSync connection closed'); }, onError: (e, s) { Log.logError('Error in AppSync connection', exception: e, stackTrace: s); }); } else { Log.logInfo('App sync is already subscribed'); } } void onData( GraphQLResponse event, void Function() syncData, ) { Log.logInfo('Subscription data received: ${event.data}'); if (event.data != null) { // json serialization // getting values from dart model syncData(); } else if (event.errors.isNotEmpty) { Log.logError( 'GraphQL response error, ${event.errors.toString()}'); } } void cancel() { if (_stream != null) { _subscription?.cancel().then((value) { Log.logInfo('app sync cancelled'); }); _stream = null; } } String getSubscriptionModel() { return ''' subscription OnSubscriptionEvent(\$userId: String, \$tenantId: String) { onSubscriptionEvent(userId: \$userId, tenantId: \$tenantId) { eventData eventType tenantId userId } } '''; } } ```
ragingsquirrel3 commented 1 year ago

Thanks for info. I still wasn't able to reproduce with this example in both debug mode and release mode (not sure if that would have any effect). Please update here if you find a good way to reproduce.

Jordan-Nelson commented 1 year ago

@raphire08 - If you are still facing this issue can you see if you are able to reproduce this with the latest version of Amplify Flutter? If you are using flutter 3.10 or higher you can use v1.1.0. If you are using Flutter 3.3 or 3.7 you can use v1.0.1

raphire08 commented 1 year ago

@Jordan-Nelson Thanks for the update. We will switch to Amplify 1.x.x libraries soon and then we can know if it is still coming or not.

Jordan-Nelson commented 1 year ago

@raphire08 - I am going to close this since I believe it will be resolved in v1. If you upgrade and are still facing an issue please let me know and we can reopen the issue.