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.31k stars 243 forks source link

iOS 15 : OperationsManager.removeOperation(cancelToken:) + 84 (OperationsManager.swift:43) #1574

Closed crawford-jake closed 2 years ago

crawford-jake commented 2 years ago

Description

We are getting reports of crashes from people using our app. The crash seems to occur when users have had the app open in the background for a very long time, but we also have reports of the app crashing after a short amount of time with the same error. From the log below, it appears amplify dereferences an invalid pointer. We have many other logs that all report the same crash in OperationsManager.swift. Additionally, this ONLY happens on devices running iOS 15. We have seen no issues on devices iOS 14 or lower, or on Android running the latest flutter amplify packages.

Incident Identifier: 54BF610D-79EF-43C0-BFC0-9CE85D1DCB77
Hardware Model:      iPhone12,1
Process:             Runner [386]
AppStoreTools:       13E500
AppVariant:          1:iPhone12,1:15
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]

Date/Time:           2022-05-03 22:00:48.3165 -0400
Launch Time:         2022-05-03 17:38:32.8365 -0400
OS Version:          iPhone OS 15.4.1 (19E258)
Release Type:        User
Baseband Version:    3.02.01
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x8000000000000010 -> 0x0000000000000010 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x8000000000000010
VM Region Info: 0x10 is not in any region.  Bytes before following region: 4338155504
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                   102930000-102934000 [   16K] r-x/r-x SM=COW  ...er.app/Runner
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [386]

Triggered by Thread:  17

Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib          0x00000001cbdca4e0 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001cbdcab24 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x00000001943cf820 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x00000001943d3cac __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                  0x00000001943e76b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   GraphicsServices                0x00000001b0481374 GSEventRunModal + 164 (GSEvent.c:2200)
6   UIKitCore                       0x0000000196d4ce88 -[UIApplication _run] + 1100 (UIApplication.m:3511)
7   UIKitCore                       0x0000000196ace5ec UIApplicationMain + 364 (UIApplication.m:5064)
8   Runner                          0x0000000102937ec0 main + 64 (AppDelegate.swift:5)
9   dyld                            0x0000000102c39ce4 start + 520 (dyldMain.cpp:879)

Thread 1 name:
Thread 1:
0   libsystem_kernel.dylib          0x00000001cbdcb178 __ulock_wait + 8
1   libdispatch.dylib               0x00000001940c941c _dlock_wait + 56 (lock.c:326)
2   libdispatch.dylib               0x00000001940c9118 _dispatch_wait_on_address + 140 (lock.c:366)
3   libdispatch.dylib               0x00000001940c97c0 _dispatch_group_wait_slow + 56 (semaphore.c:214)
4   OneSignal                       0x00000001041448e0 __69-[OneSignalClient executeSimultaneousRequests:withSuccess:onFailure:]_block_invoke + 592 (OneSignalClient.m:170)
5   libdispatch.dylib               0x00000001940c6e68 _dispatch_call_block_and_release + 32 (init.c:1517)
6   libdispatch.dylib               0x00000001940c8a2c _dispatch_client_callout + 20 (object.m:560)
7   libdispatch.dylib               0x00000001940cbb44 _dispatch_queue_override_invoke + 784 (inline_internal.h:2622)
8   libdispatch.dylib               0x00000001940da164 _dispatch_root_queue_drain + 396 (inline_internal.h:0)
9   libdispatch.dylib               0x00000001940da96c _dispatch_worker_thread2 + 164 (queue.c:6935)
10  libsystem_pthread.dylib         0x00000002053e6080 _pthread_wqthread + 228 (pthread.c:2612)
11  libsystem_pthread.dylib         0x00000002053e5e5c start_wqthread + 8

Thread 2 name:
Thread 2:
0   libsystem_kernel.dylib          0x00000001cbdca4e0 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001cbdcab24 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x00000001943cf820 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x00000001943d3cac __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                  0x00000001943e76b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Foundation                      0x0000000195bce414 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236 (NSRunLoop.m:373)
6   Foundation                      0x0000000195c0fcac -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:420)
7   UIKitCore                       0x0000000196cc6fb0 -[UIEventFetcher threadMain] + 524 (UIEventFetcher.m:1167)
8   Foundation                      0x0000000195c1e55c __NSThread__start__ + 808 (NSThread.m:972)
9   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
10  libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 3 name:
Thread 3:
0   dyld                            0x0000000102c32ac0 ___ZNK5dyld39MachOFile14forEachSegmentEU13block_pointerFvRKNS0_11SegmentInfoERbE_block_invoke + 236 (MachOFile.cpp:0)
1   dyld                            0x0000000102c256b8 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 168 (MachOFile.cpp:929)
2   dyld                            0x0000000102c29f4c dyld3::MachOFile::forEachSegment(void (dyld3::MachOFile::SegmentInfo const&, bool&) block_pointer) const + 172 (MachOFile.cpp:1240)
3   dyld                            0x0000000102c2284c dyld4::JustInTimeLoader::contains(dyld4::RuntimeState&, void const*, void const**, unsigned long long*, unsigned char*) const + 192 (JustInTimeLoader.cpp:63)
4   dyld                            0x0000000102c4e198 ___ZN5dyld44APIs17findImageMappedAtEPKvPPKN5dyld311MachOLoadedEPbPPKcPS2_PyPh_block_invoke.81 + 144 (DyldAPIs.cpp:934)
5   dyld                            0x0000000102c24704 dyld4::RuntimeState::withLoadersReadLock(void () block_pointer) + 92 (DyldRuntimeState.cpp:139)
6   dyld                            0x0000000102c29988 dyld4::APIs::findImageMappedAt(void const*, dyld3::MachOLoaded const**, bool*, char const**, void const**, unsigned long long*, unsigned char*) + 716 (DyldAPIs.cpp:926)
7   dyld                            0x0000000102c21e50 dyld4::APIs::dyld_image_header_containing_address(void const*) + 64 (DyldAPIs.cpp:959)
8   libsystem_trace.dylib           0x00000001af22c868 _os_log_impl_flatten_and_send + 1960 (macho_utils_internal.h:43)
9   libsystem_trace.dylib           0x00000001af233ec0 _os_log_with_args_impl + 404 (log.c:2645)
10  libsystem_asl.dylib             0x00000001b4738b1c _vsyslog + 264 (syslog.c:155)
11  libsystem_asl.dylib             0x00000001b47389a4 syslog + 40 (syslog.c:203)
12  Flutter                         0x0000000104cf8450 0x104cec000 + 50256
13  Flutter                         0x000000010518b9c4 0x104cec000 + 4848068
14  Flutter                         0x0000000105268328 0x104cec000 + 5751592
15  App                             0x00000001081192ec Precompiled_Stub_CallAutoScopeNative + 80
16  App                             0x00000001081cd1bc Precompiled__Logger_16065589__printString_16065589_3032 + 44
17  App                             0x00000001081d7d60 Precompiled_____print_16065589_3301 + 76
18  App                             0x00000001081d7cfc Precompiled_____print_16065589__print_16065589_3300 + 32
19  App                             0x00000001081ba37c Precompiled____printToConsole_2706 + 68
20  App                             0x000000010873a9ec Precompiled__RootZone_4048458_print_28498 + 32
21  App                             0x000000010812f1d0 Precompiled_____rootPrint_4048458__rootPrint_4048458_422 + 48
22  App                             0x000000010873a9b4 Precompiled__CustomZone_4048458_print_28497 + 108
23  App                             0x000000010812f14c Precompiled_____printToZone_4048458_420 + 76
24  App                             0x000000010812f188 Precompiled_____printToZone_4048458__printToZone_4048458_421 + 32
25  App                             0x00000001081ba31c Precompiled____print_2705 + 88
26  App                             0x000000010826f5e0 Precompiled_SocketClient_onConnectionLost_5724 + 284
27  App                             0x000000010826f4ac Precompiled_SocketClient_onConnectionLost_onConnectionLost_5723 + 100
28  App                             0x000000010812e124 Precompiled_____rootRun_4048458_388 + 92
29  App                             0x000000010812e27c Precompiled_____rootRun_4048458__rootRun_4048458_389 + 136
30  App                             0x00000001087434f4 Precompiled__CustomZone_4048458_run_28644 + 160
31  App                             0x00000001087488d0 Precompiled__CustomZone_4048458_runGuarded_28743 + 52
32  App                             0x0000000108719794 Precompiled__BufferingStreamSubscription_4048458__sendDone_4048458_sendDone_28020 + 144
33  App                             0x00000001087196e8 Precompiled__BufferingStreamSubscription_4048458__sendDone_4048458_28019 + 216
34  App                             0x000000010870b12c Precompiled__BufferingStreamSubscription_4048458__close_4048458_27752 + 92
35  App                             0x000000010813b984 Precompiled__ForwardingStream_4048458__handleDone_4048458_705 + 76
36  App                             0x00000001086ee4d0 Precompiled__ForwardingStreamSubscription_4048458__handleDone_4048458_27148 + 40
37  App                             0x00000001086ee51c Precompiled__ForwardingStreamSubscription_4048458__handleDone_4048458__handleDone_4048458_27149 + 48
38  App                             0x000000010812e124 Precompiled_____rootRun_4048458_388 + 92
39  App                             0x000000010812e27c Precompiled_____rootRun_4048458__rootRun_4048458_389 + 136
40  App                             0x00000001087434f4 Precompiled__CustomZone_4048458_run_28644 + 160
41  App                             0x00000001087488d0 Precompiled__CustomZone_4048458_runGuarded_28743 + 52
42  App                             0x0000000108719794 Precompiled__BufferingStreamSubscription_4048458__sendDone_4048458_sendDone_28020 + 144
43  App                             0x00000001087196e8 Precompiled__BufferingStreamSubscription_4048458__sendDone_4048458_28019 + 216
44  App                             0x000000010870b12c Precompiled__BufferingStreamSubscription_4048458__close_4048458_27752 + 92
45  App                             0x0000000108444968 Precompiled__SyncBroadcastStreamController_4048458__sendDone_4048458__anonymous_closure__13212 + 48
46  App                             0x0000000108135874 Precompiled__BroadcastStreamController_4048458__forEachListener_4048458_554 + 212
47  App                             0x0000000108444828 Precompiled__BroadcastStreamController_4048458_close_13211 + 400
48  App                             0x0000000108444680 Precompiled__AsBroadcastStreamController_4048458_close_13210 + 148
49  App                             0x0000000108135a78 Precompiled__AsBroadcastStreamController_4048458_close_close_556 + 48
50  App                             0x000000010812e124 Precompiled_____rootRun_4048458_388 + 92
51  App                             0x000000010812e27c Precompiled_____rootRun_4048458__rootRun_4048458_389 + 136
52  App                             0x00000001087434f4 Precompiled__CustomZone_4048458_run_28644 + 160
53  App                             0x00000001087488d0 Precompiled__CustomZone_4048458_runGuarded_28743 + 52
54  App                             0x0000000108719794 Precompiled__BufferingStreamSubscription_4048458__sendDone_4048458_sendDone_28020 + 144
55  App                             0x00000001087196e8 Precompiled__BufferingStreamSubscription_4048458__sendDone_4048458_28019 + 216
56  App                             0x000000010870b12c Precompiled__BufferingStreamSubscription_4048458__close_4048458_27752 + 92
57  App                             0x000000010813b984 Precompiled__ForwardingStream_4048458__handleDone_4048458_705 + 76
58  App                             0x00000001086ee4d0 Precompiled__ForwardingStreamSubscription_4048458__handleDone_4048458_27148 + 40
59  App                             0x00000001086ee51c Precompiled__ForwardingStreamSubscription_4048458__handleDone_4048458__handleDone_4048458_27149 + 48
60  App                             0x000000010812e124 Precompiled_____rootRun_4048458_388 + 92
61  App                             0x000000010812e27c Precompiled_____rootRun_4048458__rootRun_4048458_389 + 136
62  App                             0x00000001087434f4 Precompiled__CustomZone_4048458_run_28644 + 160
63  App                             0x00000001087488d0 Precompiled__CustomZone_4048458_runGuarded_28743 + 52
64  App                             0x0000000108719794 Precompiled__BufferingStreamSubscription_4048458__sendDone_4048458_sendDone_28020 + 144
65  App                             0x00000001087196e8 Precompiled__BufferingStreamSubscription_4048458__sendDone_4048458_28019 + 216
66  App                             0x000000010870b12c Precompiled__BufferingStreamSubscription_4048458__close_4048458_27752 + 92
67  App                             0x0000000108136e50 Precompiled__StreamController_4048458__closeUnchecked_4048458_586 + 100
68  App                             0x00000001084457e8 Precompiled__StreamController_4048458_close_13241 + 92
69  App                             0x0000000108136a38 Precompiled__StreamController_4048458_close_close_577 + 48
70  App                             0x000000010812e124 Precompiled_____rootRun_4048458_388 + 92
71  App                             0x000000010812e27c Precompiled_____rootRun_4048458__rootRun_4048458_389 + 136
72  App                             0x000000010813045c Precompiled__FutureListener_4048458_handleWhenComplete_446 + 296
73  App                             0x000000010819bad4 Precompiled__Future_4048458__propagateToListeners_4048458_handleWhenCompleteCallback_2247 + 56
74  App                             0x00000001081bbf78 Precompiled__Future_4048458__propagateToListeners_4048458_2738 + 1148
75  App                             0x000000010812e030 Precompiled__Future_4048458__completeWithValue_4048458_386 + 132
76  App                             0x00000001081bcdb0 Precompiled__Future_4048458__asyncCompleteWithValue_4048458__anonymous_closure__2749 + 56
77  App                             0x000000010812e184 Precompiled_____rootRun_4048458_388 + 188
78  App                             0x000000010812e27c Precompiled_____rootRun_4048458__rootRun_4048458_389 + 136
79  App                             0x00000001087434f4 Precompiled__CustomZone_4048458_run_28644 + 160
80  App                             0x00000001087488d0 Precompiled__CustomZone_4048458_runGuarded_28743 + 52
81  App                             0x0000000108743f74 Precompiled__CustomZone_4048458_bindCallbackGuarded__anonymous_closure__28652 + 56
82  App                             0x000000010812f56c Precompiled_____microtaskLoop_4048458_429 + 120
83  App                             0x000000010812f450 Precompiled_____startMicrotaskLoop_4048458_428 + 40
84  App                             0x000000010812f414 Precompiled_____startMicrotaskLoop_4048458__startMicrotaskLoop_4048458_427 + 24
85  App                             0x00000001081190e4 Precompiled_Stub_InvokeDartCode + 272
86  Flutter                         0x000000010523cf04 0x104cec000 + 5574404
87  Flutter                         0x000000010523db20 0x104cec000 + 5577504
88  Flutter                         0x0000000105341114 0x104cec000 + 6639892
89  Flutter                         0x00000001050d5b80 0x104cec000 + 4103040
90  Flutter                         0x0000000104fe7dc4 0x104cec000 + 3128772
91  Flutter                         0x0000000104feb1bc 0x104cec000 + 3142076
92  CoreFoundation                  0x0000000194477168 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1812)
93  CoreFoundation                  0x00000001943fb144 __CFRunLoopDoTimer + 1064 (CFRunLoop.c:2420)
94  CoreFoundation                  0x00000001943f58f0 __CFRunLoopDoTimers + 320 (CFRunLoop.c:2580)
95  CoreFoundation                  0x00000001943d3fa0 __CFRunLoopRun + 1936 (CFRunLoop.c:3116)
96  CoreFoundation                  0x00000001943e76b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
97  Flutter                         0x0000000104feb088 0x104cec000 + 3141768
98  Flutter                         0x0000000104fea848 0x104cec000 + 3139656
99  libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
100 libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 4 name:
Thread 4:
0   libsystem_kernel.dylib          0x00000001cbdca4e0 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001cbdcab24 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x00000001943cf820 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x00000001943d3cac __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                  0x00000001943e76b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Flutter                         0x0000000104feb088 0x104cec000 + 3141768
6   Flutter                         0x0000000104fea848 0x104cec000 + 3139656
7   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib          0x00000001cbdca4e0 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001cbdcab24 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x00000001943cf820 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x00000001943d3cac __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                  0x00000001943e76b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   Flutter                         0x0000000104feb088 0x104cec000 + 3141768
6   Flutter                         0x0000000104fea848 0x104cec000 + 3139656
7   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 6 name:
Thread 6:
0   libsystem_kernel.dylib          0x00000001cbdcaf64 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000002053ed298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001ad166238 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:380)
3   Flutter                         0x0000000104fe5440 0x104cec000 + 3118144
4   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib          0x00000001cbdcaf64 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000002053ed298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001ad166238 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:380)
3   Flutter                         0x0000000104fe5440 0x104cec000 + 3118144
4   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib          0x00000001cbdcaf64 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000002053ed298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001ad166238 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:380)
3   Flutter                         0x0000000104fe5440 0x104cec000 + 3118144
4   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 9 name:
Thread 9:
0   libsystem_kernel.dylib          0x00000001cbdcaf64 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000002053ed298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001ad166238 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:380)
3   Flutter                         0x0000000104fe5440 0x104cec000 + 3118144
4   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 10 name:
Thread 10:
0   libsystem_kernel.dylib          0x00000001cbdcaf64 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000002053ed298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001ad166238 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:380)
3   Flutter                         0x0000000104fe5440 0x104cec000 + 3118144
4   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 11 name:
Thread 11:
0   libsystem_kernel.dylib          0x00000001cbdcaf64 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000002053ed298 _pthread_cond_wait + 1236 (pthread_cond.c:636)
2   libc++.1.dylib                  0x00000001ad166238 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (__threading_support:380)
3   Flutter                         0x0000000104fe5440 0x104cec000 + 3118144
4   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 12 name:
Thread 12:
0   libsystem_kernel.dylib          0x00000001cbdcbe58 kevent + 8
1   Flutter                         0x00000001051ba7a4 0x104cec000 + 5040036
2   Flutter                         0x00000001051e9358 0x104cec000 + 5231448
3   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
4   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 13:
0   libsystem_pthread.dylib         0x00000002053e5e54 start_wqthread + 0

Thread 14:
0   libsystem_pthread.dylib         0x00000002053e5e54 start_wqthread + 0

Thread 15 name:
Thread 15:
0   libsystem_kernel.dylib          0x00000001cbdcbef4 write + 8
1   FirebaseCrashlytics             0x0000000103e196c8 FIRCLSSDKFileLog + 316 (FIRCLSInternalLogging.c:0)
2   FirebaseCrashlytics             0x0000000103e1b574 FIRCLSMachExceptionReply + 128 (FIRCLSMachException.c:265)
3   FirebaseCrashlytics             0x0000000103e1b574 FIRCLSMachExceptionServer + 968 (FIRCLSMachException.c:176)
4   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
5   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 16 name:
Thread 16:
0   libsystem_kernel.dylib          0x00000001cbdca4e0 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001cbdcab24 mach_msg + 76 (mach_msg.c:119)
2   CoreFoundation                  0x00000001943cf820 __CFRunLoopServiceMachPort + 372 (CFRunLoop.c:2646)
3   CoreFoundation                  0x00000001943d3cac __CFRunLoopRun + 1180 (CFRunLoop.c:3000)
4   CoreFoundation                  0x00000001943e76b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
5   CFNetwork                       0x0000000194e5d4d8 +[__CFN_CoreSchedulingSetRunnable _run:] + 472 (CoreSchedulingSet.mm:1372)
6   Foundation                      0x0000000195c1e55c __NSThread__start__ + 808 (NSThread.m:972)
7   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
8   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 17 name:
Thread 17 Crashed:
0   amplify_api                     0x0000000104052c68 $sSDyq_SgxcigSS_So11NSOperationCTg5 + 0 (<compiler-generated>:0)
1   amplify_api                     0x0000000104052c68 static OperationsManager.removeOperation(cancelToken:) + 84 (OperationsManager.swift:43)
2   amplify_api                     0x0000000104052c64 static OperationsManager.removeOperation(cancelToken:) + 80 (OperationsManager.swift:43)
3   amplify_api                     0x0000000104047ebc closure #2 in static FlutterGraphQLApi.createOperation(bridge:flutterResult:graphQLSubscriptionsStreamHandler:id:request:) + 312 (FlutterGraphQLApi.swift:220)
4   Amplify                         0x00000001039ed454 closure #1 in AmplifyOperation.subscribe(resultListener:) + 464 (AmplifyOperation.swift:131)
5   Amplify                         0x00000001039edfec partial apply for closure #1 in AmplifyOperation.subscribe(resultListener:) + 36 (<compiler-generated>:0)
6   Amplify                         0x0000000103a8a864 closure #1 in SerialDispatcher.dispatch(to:) + 96 (SerialDispatcher.swift:45)
7   Amplify                         0x0000000103a3eb00 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
8   libdispatch.dylib               0x00000001940c6e68 _dispatch_call_block_and_release + 32 (init.c:1517)
9   libdispatch.dylib               0x00000001940c8a2c _dispatch_client_callout + 20 (object.m:560)
10  libdispatch.dylib               0x00000001940cbb44 _dispatch_queue_override_invoke + 784 (inline_internal.h:2622)
11  libdispatch.dylib               0x00000001940da164 _dispatch_root_queue_drain + 396 (inline_internal.h:0)
12  libdispatch.dylib               0x00000001940da96c _dispatch_worker_thread2 + 164 (queue.c:6935)
13  libsystem_pthread.dylib         0x00000002053e6080 _pthread_wqthread + 228 (pthread.c:2612)
14  libsystem_pthread.dylib         0x00000002053e5e5c start_wqthread + 8

Thread 18:
0   libsystem_pthread.dylib         0x00000002053e5e54 start_wqthread + 0

Thread 19 name:
Thread 19:
0   libsystem_kernel.dylib          0x00000001cbdce0f0 __channel_sync + 8
1   libnetwork.dylib                0x00000001955bdccc nw_channel_add_input_frames + 10256 (channel.c:1382)
2   libnetwork.dylib                0x00000001955bb3d0 nw_channel_update_input_source + 328 (channel.c:1462)
3   libnetwork.dylib                0x00000001955ba5dc __nw_channel_create_block_invoke.29 + 72 (channel.c:2387)
4   libdispatch.dylib               0x00000001940c8a2c _dispatch_client_callout + 20 (object.m:560)
5   libdispatch.dylib               0x00000001940cbeec _dispatch_continuation_pop + 500 (inline_internal.h:2622)
6   libdispatch.dylib               0x00000001940df13c _dispatch_source_invoke + 1596 (source.c:596)
7   libdispatch.dylib               0x00000001940d1f80 _dispatch_workloop_invoke + 1784 (inline_internal.h:0)
8   libdispatch.dylib               0x00000001940db500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
9   libsystem_pthread.dylib         0x00000002053e60bc _pthread_wqthread + 288 (pthread.c:2599)
10  libsystem_pthread.dylib         0x00000002053e5e5c start_wqthread + 8

Thread 20 name:
Thread 20:
0   libsystem_kernel.dylib          0x00000001cbdcaf64 __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x00000002053ed2c4 _pthread_cond_wait + 1280 (pthread_cond.c:640)
2   Flutter                         0x00000001052b21d4 0x104cec000 + 6054356
3   Flutter                         0x00000001052f9874 0x104cec000 + 6346868
4   Flutter                         0x00000001052b1afc 0x104cec000 + 6052604
5   libsystem_pthread.dylib         0x00000002053e69ac _pthread_start + 148 (pthread.c:891)
6   libsystem_pthread.dylib         0x00000002053e5e68 thread_start + 8

Thread 21 name:
Thread 21:
0   libsystem_kernel.dylib          0x00000001cbdcb178 __ulock_wait + 8
1   libdispatch.dylib               0x00000001940c941c _dlock_wait + 56 (lock.c:326)
2   libdispatch.dylib               0x00000001940c9118 _dispatch_wait_on_address + 140 (lock.c:366)
3   libdispatch.dylib               0x00000001940c97c0 _dispatch_group_wait_slow + 56 (semaphore.c:214)
4   OneSignal                       0x00000001041448e0 __69-[OneSignalClient executeSimultaneousRequests:withSuccess:onFailure:]_block_invoke + 592 (OneSignalClient.m:170)
5   libdispatch.dylib               0x00000001940c6e68 _dispatch_call_block_and_release + 32 (init.c:1517)
6   libdispatch.dylib               0x00000001940c8a2c _dispatch_client_callout + 20 (object.m:560)
7   libdispatch.dylib               0x00000001940cbb44 _dispatch_queue_override_invoke + 784 (inline_internal.h:2622)
8   libdispatch.dylib               0x00000001940da164 _dispatch_root_queue_drain + 396 (inline_internal.h:0)
9   libdispatch.dylib               0x00000001940da96c _dispatch_worker_thread2 + 164 (queue.c:6935)
10  libsystem_pthread.dylib         0x00000002053e6080 _pthread_wqthread + 228 (pthread.c:2612)
11  libsystem_pthread.dylib         0x00000002053e5e5c start_wqthread + 8

Thread 22:
0   libsystem_pthread.dylib         0x00000002053e5e54 start_wqthread + 0

Thread 23 name:
Thread 23:
0   libsystem_kernel.dylib          0x00000001cbdca4e0 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001cbdcab24 mach_msg + 76 (mach_msg.c:119)
2   libsystem_notify.dylib          0x00000001b44905f8 notify_get_state + 788 (notify_ipcUser.c:2137)
3   AppSSOCore                      0x00000001bba00a74 -[SOConfigurationVersion _state] + 48 (SOConfigurationVersion.m:135)
4   AppSSOCore                      0x00000001bba00d24 -[SOConfigurationVersion checkVersion] + 68 (SOConfigurationVersion.m:54)
5   AppSSOCore                      0x00000001bb9ff674 -[SOConfigurationClient _checkNewVersion] + 36 (SOConfigurationClient.m:87)
6   AppSSOCore                      0x00000001bb9ff5e8 -[SOConfigurationClient willHandleURL:responseCode:callerBundleIdentifier:] + 88 (SOConfigurationClient.m:62)
7   AppSSOCore                      0x00000001bba00348 +[SOAuthorizationCore _canPerformAuthorizationWithURL:responseCode:callerBundleIdentifier:useInternalExtensions:] + 188 (SOAuthorizationCore.m:131)
8   CFNetwork                       0x0000000194c09cd4 AppSSO::shouldManageURL(__CFString const*, __CFURL const*, long, __CFData const*) + 300 (AppSSO.mm:10)
9   CFNetwork                       0x0000000194bffb8c AppSSOProtocol::_canHandleTask(NSURLSessionTask const*, void const*) + 232 (AppSSOProtocol.mm:62)
10  CFNetwork                       0x0000000194c10fc0 +[_NSCFURLProtocol canInitWithTask:] + 52 (NSURLProtocol.mm:328)
11  CFNetwork                       0x0000000194c08e7c -[__NSURLSessionLocal _protocolClassForTask:skipAppSSO:] + 344 (LocalSession.mm:0)
12  CFNetwork                       0x0000000194c0b330 -[__NSURLSessionLocal _createCanonicalRequestForTask:] + 92 (LocalSession.mm:1467)
13  CFNetwork                       0x0000000194c4f7b0 -[__NSURLSessionLocal _onqueue_canonicalizeTaskAndCreateConnection:] + 64 (LocalSession.mm:588)
14  CFNetwork                       0x0000000194c00918 -[__NSCFLocalSessionTask _onqueue_completeInitialization] + 88 (LocalSessionTask.mm:836)
15  CFNetwork                       0x0000000194c0268c __26-[NSURLSessionTask resume]_block_invoke + 64 (SessionTask.mm:802)
16  libdispatch.dylib               0x00000001940c6e68 _dispatch_call_block_and_release + 32 (init.c:1517)
17  libdispatch.dylib               0x00000001940c8a2c _dispatch_client_callout + 20 (object.m:560)
18  libdispatch.dylib               0x00000001940d0124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
19  libdispatch.dylib               0x00000001940d0cb4 _dispatch_lane_invoke + 444 (queue.c:3944)
20  libdispatch.dylib               0x00000001940db500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
21  libsystem_pthread.dylib         0x00000002053e60bc _pthread_wqthread + 288 (pthread.c:2599)
22  libsystem_pthread.dylib         0x00000002053e5e5c start_wqthread + 8

Thread 24 name:
Thread 24:
0   libsystem_kernel.dylib          0x00000001cbdca534 semaphore_timedwait_trap + 8
1   libdispatch.dylib               0x00000001940c9044 _dispatch_sema4_timedwait + 64 (lock.c:154)
2   libdispatch.dylib               0x00000001940c9638 _dispatch_semaphore_wait_slow + 76 (semaphore.c:116)
3   libswiftDispatch.dylib          0x00000001adf3d5f4 OS_dispatch_semaphore.wait(wallTimeout:) + 24 (Dispatch.swift:183)
4   amplify_api                     0x000000010404477c closure #1 in static FlutterAuthProviders.getToken(for:) + 824 (FlutterAuthProvider.swift:68)
5   amplify_api                     0x0000000104052be8 thunk for @callee_guaranteed () -> () + 20 (<compiler-generated>:0)
6   amplify_api                     0x0000000104052c08 thunk for @escaping @callee_guaranteed () -> () + 20 (<compiler-generated>:0)
7   libdispatch.dylib               0x00000001940c8a2c _dispatch_client_callout + 20 (object.m:560)
8   libdispatch.dylib               0x00000001940d7c90 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1028)
9   amplify_api                     0x0000000104046478 specialized static FlutterAuthProviders.getToken(for:) + 416 (FlutterAuthProvider.swift:43)
10  amplify_api                     0x0000000104045294 $s11amplify_api20FlutterAuthProvidersC8getToken3fors6ResultOySSs5Error_pG14AWSPluginsCore20AWSAuthorizationTypeO_tFZ + 8 (FlutterAuthProvider.swift:107)
11  amplify_api                     0x0000000104045294 $s11amplify_api19FlutterAuthProviderV09getLatestD5Tokens6ResultOySSs5Error_pGyF + 8 (<compiler-generated>:0)
12  amplify_api                     0x0000000104045294 protocol witness for AmplifyAuthTokenProvider.getLatestAuthToken() in conformance FlutterAuthProvider + 16
13  AmplifyPlugins                  0x000000010378f954 $s14AmplifyPlugins34AuthenticationTokenAuthInterceptorC03geteD033_8EC97ECCE2D6A15CEF76FD784A4F6CA3LLSSSgyF + 36 (AuthenticationTokenAuthInterceptor.swift:75)
14  AmplifyPlugins                  0x000000010378f954 AuthenticationTokenAuthInterceptor.interceptMessage(_:for:) + 100 (AuthenticationTokenAuthInterceptor.swift:24)
15  AmplifyPlugins                  0x00000001037902a4 protocol witness for MessageInterceptor.interceptMessage(_:for:) in conformance AuthenticationTokenAuthInterceptor + 32 (<compiler-generated>:0)
16  AppSyncRealTimeClient           0x00000001035d400c $s21AppSyncRealTimeClient26RealtimeConnectionProviderC16interceptMessage_3forAA0abJ0VAG_10Foundation3URLVtFA2G_AA0J11Interceptor_ptXEfU_ + 48 (RealtimeConnectionProvider+MessageInterceptable.swift:17)
17  AppSyncRealTimeClient           0x00000001035d400c $s21AppSyncRealTimeClient0aB7MessageVAA0F11Interceptor_pACs5Error_pIggnozo_AcaD_pACsAE_pIegnnrzo_TR + 48 (<compiler-generated>:0)
18  AppSyncRealTimeClient           0x00000001035d400c $sSTsE6reduceyqd__qd___qd__qd___7ElementQztKXEtKlFSay21AppSyncRealTimeClient18MessageInterceptor_pG_AD0cdH0VTg5 + 104 (<compiler-generated>:0)
19  AppSyncRealTimeClient           0x00000001035d400c RealtimeConnectionProvider.interceptMessage(_:for:) + 256 (RealtimeConnectionProvider+MessageInterceptable.swift:17)
20  AppSyncRealTimeClient           0x00000001035cf6dc closure #1 in RealtimeConnectionProvider.write(_:) + 160 (RealtimeConnectionProvider.swift:127)
21  AppSyncRealTimeClient           0x00000001035ce914 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
22  libdispatch.dylib               0x00000001940c6e68 _dispatch_call_block_and_release + 32 (init.c:1517)
23  libdispatch.dylib               0x00000001940c8a2c _dispatch_client_callout + 20 (object.m:560)
24  libdispatch.dylib               0x00000001940d0124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
25  libdispatch.dylib               0x00000001940d0c80 _dispatch_lane_invoke + 392 (queue.c:3944)
26  libdispatch.dylib               0x00000001940db500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
27  libsystem_pthread.dylib         0x00000002053e60bc _pthread_wqthread + 288 (pthread.c:2599)
28  libsystem_pthread.dylib         0x00000002053e5e5c start_wqthread + 8

Thread 25:
0   libsystem_pthread.dylib         0x00000002053e5e54 start_wqthread + 0

Thread 17 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000001   x1: 0x000000016d5e2b30   x2: 0x0000000104052c64   x3: 0x00000001040635c8
    x4: 0x0000000000000020   x5: 0x0000000000000012   x6: 0x000000000000000a   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x0000000000000000  x10: 0x00000000000007fb  x11: 0x00000000000007fd
   x12: 0x0000000000000089  x13: 0x00000000e785788b  x14: 0x00000000e7a58000  x15: 0x00000000000000b0
   x16: 0x000000019921dbf0  x17: 0x0000000067a00000  x18: 0x0000000000000000  x19: 0x40000002810420c0
   x20: 0x00000001040635c8  x21: 0xc000000000000024  x22: 0x8000000000000000  x23: 0x0000000281042c00
   x24: 0x0000000102e5a75c  x25: 0x00000002803cdc90  x26: 0x00000002810a6200  x27: 0x000000028301e420
   x28: 0x0000000280be00d0   fp: 0x000000016d5e2ba0   lr: 0x0c63800104052c64
    sp: 0x000000016d5e2b30   pc: 0x0000000104052c68 cpsr: 0x60000000
   esr: 0x92000006 (Data Abort) byte read Translation fault

Binary Images:
0x102930000 - 0x102a27fff Runner arm64  <811389102cad342c97f92cb98261d7c4> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Runner
0x102c20000 - 0x102c77fff dyld arm64e  <d16b72c0d6193e4892622c10a1d3066f> /usr/lib/dyld
0x1035b8000 - 0x1035e3fff AppSyncRealTimeClient arm64  <78b93d29040f39dca1d74f770953449a> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Frameworks/AppSyncRealTimeClient.framework/AppSyncRealTimeClient
0x103774000 - 0x1037e7fff AmplifyPlugins arm64  <99635dececd5339c89e096102accd113> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Frameworks/AmplifyPlugins.framework/AmplifyPlugins
0x1039d8000 - 0x103ad3fff Amplify arm64  <0ede9cd6d45135809ee37aaaabea575a> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Frameworks/Amplify.framework/Amplify
0x103e00000 - 0x103e43fff FirebaseCrashlytics arm64  <8f58e41538063d04b5f0b9adec68f990> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Frameworks/FirebaseCrashlytics.framework/FirebaseCrashlytics
0x104038000 - 0x10405bfff amplify_api arm64  <76054c3872cc30558af0d80823b484b1> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Frameworks/amplify_api.framework/amplify_api
0x104128000 - 0x1041a3fff OneSignal arm64  <fd9b5ff077fa36e380e285e5c9b51f19> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Frameworks/OneSignal.framework/OneSignal
0x104cec000 - 0x105467fff Flutter arm64  <d24b4305a5d8348c8a0909c859505f3a> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Frameworks/Flutter.framework/Flutter
0x108110000 - 0x108cb7fff App arm64  <7f5e24a17ea232f4ac8b650fd9054ea9> /private/var/containers/Bundle/Application/EA4F65FC-D405-4067-8A94-0FE4C179AF89/Runner.app/Frameworks/App.framework/App
0x1940c5000 - 0x19410afff libdispatch.dylib arm64e  <69dac9c7ddaf318eb068be596d142a2f> /usr/lib/system/libdispatch.dylib
0x1943c8000 - 0x19481dfff CoreFoundation arm64e  <d2716f2f688b3d51ba8b17e6553b209e> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x194be6000 - 0x1950a6fff CFNetwork arm64e  <eae64611a84036fea69d5658f1bcf4d0> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x1950a7000 - 0x195b37fff libnetwork.dylib arm64e  <aac4f3ce09c03f608b98aa2d0f5b5dde> /usr/lib/libnetwork.dylib
0x195bb6000 - 0x195ebefff Foundation arm64e  <feeef9b1b0e63561adfa3ef0302d23f8> /System/Library/Frameworks/Foundation.framework/Foundation
0x196839000 - 0x1980d3fff UIKitCore arm64e  <e6e89bb5b5863725bf8f4c85dcd443bd> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x1ad159000 - 0x1ad1bffff libc++.1.dylib arm64e  <157d84a7b8973c9bb31dcc81c2bf934f> /usr/lib/libc++.1.dylib
0x1adf3b000 - 0x1adf53fff libswiftDispatch.dylib arm64e  <c9d681c8c4cc387bb2f213171a3ad124> /usr/lib/swift/libswiftDispatch.dylib
0x1af228000 - 0x1af241fff libsystem_trace.dylib arm64e  <dd7de6751dcb3bb7a7d920cae6bfefdc> /usr/lib/system/libsystem_trace.dylib
0x1b0480000 - 0x1b0488fff GraphicsServices arm64e  <75a910dc87a43b3a8c0ea868b945f5d4> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1b448e000 - 0x1b4498fff libsystem_notify.dylib arm64e  <ba1329e4d990337592cf73b9a48307e0> /usr/lib/system/libsystem_notify.dylib
0x1b4737000 - 0x1b474efff libsystem_asl.dylib arm64e  <e6d51d4293063ebaa4082f4e11a1c32c> /usr/lib/system/libsystem_asl.dylib
0x1bb9fd000 - 0x1bba18fff AppSSOCore arm64e  <6303d1ef46ba32c58fc7dbde1f1dec4b> /System/Library/PrivateFrameworks/AppSSOCore.framework/AppSSOCore
0x1cbdc9000 - 0x1cbdfefff libsystem_kernel.dylib arm64e  <c2fcc05874803c14b4790064a3f843e3> /usr/lib/system/libsystem_kernel.dylib
0x2053e5000 - 0x2053f0fff libsystem_pthread.dylib arm64e  <b48efcbed4f7308ba3fa172e0ea78e33> /usr/lib/system/libsystem_pthread.dylib

EOF

Categories

Steps to Reproduce

We are still working on a way to reproduce this.

Screenshots

No response

Platforms

Android Device/Emulator API Level

No response

Environment

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.66.2)
[✓] Connected device (1 available)
[✓] HTTP Host Availability

Dependencies

Dart SDK 2.16.2
Flutter SDK 2.10.

dependencies:
- amplify_api 0.4.5 [amplify_api_plugin_interface amplify_core collection flutter meta plugin_platform_interface]
- amplify_flutter 0.4.5 [amplify_analytics_plugin_interface amplify_api_plugin_interface amplify_auth_plugin_interface amplify_core amplify_datastore_plugin_interface amplify_storage_plugin_interface collection flutter json_annotation meta plugin_platform_interface]
- app_settings 4.1.5 [flutter]
- appium_driver 0.5.2 [webdriver]
- auto_size_text 3.0.0 [flutter]
- charts_flutter 0.12.0 [charts_common collection flutter intl logging meta]
- collection 1.15.0
- crypto 3.0.2 [typed_data]
- csv 5.0.1
- device_info 2.0.3 [flutter device_info_platform_interface]
- dio 4.0.6 [http_parser path]
- firebase_analytics 8.3.4 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta]
- firebase_auth 3.3.16 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.15.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 2.6.3 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- fl_chart 0.50.1 [flutter equatable]
- flutter 0.0.0 [characters collection material_color_utilities meta typed_data vector_math sky_engine]
- flutter_barcode_scanner 2.0.0 [flutter flutter_plugin_android_lifecycle]
- flutter_blue 0.8.0 [flutter convert protobuf rxdart collection meta]
- flutter_hooks 0.18.3 [flutter]
- flutter_keyboard_visibility 5.2.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path typed_data vector_math]
- flutter_markdown 0.6.10 [flutter markdown meta path]
- flutter_native_timezone 2.0.0 [flutter_web_plugins flutter js]
- flutter_svg 0.22.0 [flutter meta path_drawing vector_math xml]
- flutter_switch 0.3.2 [flutter]
- font_awesome_flutter 9.2.0 [flutter]
- fraction 3.2.2
- graphql 5.0.0 [meta path gql gql_exec gql_link gql_http_link gql_transform_link gql_error_link gql_dedupe_link hive normalize http collection web_socket_channel stream_channel rxdart uuid]
- http 0.13.4 [async http_parser meta path]
- intl 0.17.0 [clock path]
- jovial_svg 1.1.4 [xml collection args vector_math jovial_misc http meta flutter]
- json_annotation 4.4.0 [meta]
- kiwi 3.0.0 [meta]
- logger 1.1.0
- mixpanel_analytics 2.1.1 [flutter http shared_preferences]
- onesignal_flutter 3.2.7 [flutter]
- package_info 2.0.2 [flutter]
- path_provider 2.0.9 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- percent_indicator 4.0.0 [flutter]
- protobuf 2.0.1 [fixnum collection]
- provider 5.0.0 [collection flutter nested]
- reorderables 0.4.4 [flutter]
- rxdart 0.26.0
- sembast 3.2.0 [meta path synchronized]
- share_plus 3.1.0 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web]
- shared_preferences 2.0.13 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- store_redirect 2.0.1 [flutter]
- timezone 0.7.0 [path]
- url_launcher 6.1.0 [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]
- video_player 2.4.0 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]
- webview_flutter 2.8.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]

transitive dependencies:
- amplify_analytics_plugin_interface 0.4.5 [amplify_core flutter meta]
- amplify_api_plugin_interface 0.4.5 [amplify_core collection flutter json_annotation meta]
- amplify_auth_plugin_interface 0.4.5 [flutter meta amplify_core]
- amplify_core 0.4.5 [flutter plugin_platform_interface collection date_time_format meta uuid]
- amplify_datastore_plugin_interface 0.4.5 [flutter meta collection amplify_core]
- amplify_storage_plugin_interface 0.4.5 [flutter meta amplify_core]
- archive 3.3.0 [crypto path]
- args 2.3.0
- async 2.8.2 [collection meta]
- characters 1.2.0
- charcode 1.3.1
- charts_common 0.12.0 [collection intl logging meta vector_math]
- clock 1.1.0
- convert 3.0.1 [typed_data]
- csslib 0.17.1 [source_span]
- date_time_format 2.0.1
- device_info_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- equatable 2.0.3 [collection meta]
- ffi 1.1.2
- file 6.1.2 [meta path]
- firebase 9.0.2 [http http_parser js]
- firebase_analytics_platform_interface 2.0.1 [flutter meta]
- firebase_analytics_web 0.3.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
- firebase_auth_platform_interface 6.2.4 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 3.3.13 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.2.5 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.6.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.2.4 [collection firebase_core flutter meta plugin_platform_interface]
- fixnum 1.0.0
- 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_plugin_android_lifecycle 2.0.5 [flutter]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta typed_data vector_math]
- gql 0.13.1 [collection meta source_span]
- gql_dedupe_link 2.0.0 [meta gql_exec gql_link async]
- gql_error_link 0.2.0 [async gql_exec gql_link meta]
- gql_exec 0.3.0 [collection meta gql]
- gql_http_link 0.4.0 [meta gql gql_exec gql_link http http_parser]
- gql_link 0.4.0 [meta gql gql_exec]
- gql_transform_link 0.2.0 [gql_exec gql_link]
- hive 2.1.0 [meta crypto]
- html 0.15.0 [csslib source_span]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- jovial_misc 0.8.4 [pointycastle intl async collection convert meta]
- js 0.6.3
- logging 1.0.2
- markdown 5.0.0 [args charcode meta]
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.3
- meta 1.7.0
- mime 1.0.1
- nested 1.0.0 [flutter]
- normalize 0.5.5 [gql collection]
- path 1.8.0
- path_drawing 0.5.1+1 [vector_math meta path_parsing flutter]
- path_parsing 0.2.1 [vector_math meta]
- path_provider_android 2.0.13 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.8 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.5 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.5 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.3 [flutter platform plugin_platform_interface]
- path_provider_windows 2.0.5 [ffi flutter path path_provider_platform_interface win32]
- petitparser 4.4.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- pointycastle 3.6.0 [collection convert js]
- process 4.2.4 [file path platform]
- share_plus_linux 2.0.4 [share_plus_platform_interface file flutter meta url_launcher]
- share_plus_macos 2.1.0 [share_plus_platform_interface flutter]
- share_plus_platform_interface 2.1.0 [flutter meta mime plugin_platform_interface]
- share_plus_web 2.0.4 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta]
- share_plus_windows 2.0.3 [share_plus_platform_interface flutter meta url_launcher]
- shared_preferences_android 2.0.11 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.0 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.0 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.3 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.3 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.0 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- sky_engine 0.0.99
- source_span 1.8.1 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- sync_http 0.3.0
- synchronized 3.0.0+2
- term_glyph 1.2.0
- typed_data 1.3.0 [collection]
- url_launcher_android 6.0.16 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.15 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.0 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.0 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.0.5 [flutter plugin_platform_interface]
- url_launcher_web 2.0.9 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.0 [flutter url_launcher_platform_interface]
- vector_math 2.1.1
- video_player_android 2.3.2 [flutter video_player_platform_interface]
- video_player_avfoundation 2.3.3 [flutter video_player_platform_interface]
- video_player_platform_interface 5.1.2 [flutter plugin_platform_interface]
- video_player_web 2.0.8 [flutter flutter_web_plugins video_player_platform_interface]
- web_socket_channel 2.2.0 [async crypto stream_channel]
- webdriver 3.0.0 [archive matcher path stack_trace sync_http]
- webview_flutter_android 2.8.5 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 1.8.1 [flutter plugin_platform_interface]
- webview_flutter_wkwebview 2.7.2 [flutter path webview_flutter_platform_interface]
- win32 2.5.2 [ffi]
- xdg_directories 0.2.0+1 [meta path process]
- xml 5.3.1 [collection meta petitparser]

Device

iPhone 12, iPhone 13

OS

iOS 15 ONLY

CLI Version

7.6.26

Additional Context

We are still attempting to create reproduction steps, however we are hoping the log above may help in determining a root cause.

fjnoyp commented 2 years ago

Hi @crawford-jake thanks for reaching out. The stacktrace information is helpful but seems to suggest the operationsMap field in OperationsManager.swift is null - which shouldn't be possible. However, the code is called due to a apiError from FlutterGraphQLApi.swift. Would be interesting to know what this apiError is.

Until you are able to reproduce, can you tell us what Rest API methods you are calling and where in the code you make those calls?

The iOS stacktrace shows the following lines are crashing:

FlutterGraphQLApi.swift -

 case .failure(let apiError):
      print("Subscription has terminated with \(apiError)")
      if !id.isEmpty {
          ==> OperationsManager.removeOperation(cancelToken: id)
      }

OperationsManager.swift -

public static func removeOperation(cancelToken: String) {
        ==> guard let operation = operationsMap[cancelToken] else {
            return
        }
crawford-jake commented 2 years ago

@fjnoyp thanks for the information, this helps a lot! We will be trying to recreate this error over the next few days. I will post here on what we find.

jamesblasco commented 2 years ago

We are also having this problem in our project with a different Stacktrace error. Currently this is happening for most of the users of our app using iPhone and iOS15 and it has become a very important blocker and priority internally

Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   amplify_api                     0x0000000102a36c8c $sSDyq_SgxcigSS_So11NSOperationCTg5 + 0 (<compiler-generated>:0)
1   amplify_api                     0x0000000102a36c8c static OperationsManager.removeOperation(cancelToken:) + 84 (OperationsManager.swift:43)
2   amplify_api                     0x0000000102a36c88 static OperationsManager.removeOperation(cancelToken:) + 80 (OperationsManager.swift:43)
3   amplify_api                     0x0000000102a39830 $s11amplify_api17OperationsManagerO15cancelOperation0E5TokenySS_tFZ + 20 (OperationsManager.swift:81)
4   amplify_api                     0x0000000102a39830 specialized SwiftAmplifyApiPlugin.onCancel(flutterResult:cancelToken:) + 696 (SwiftAmplifyApiPlugin.swift:149)
5   amplify_api                     0x0000000102a386e8 $s11amplify_api21SwiftAmplifyApiPluginC8onCancel13flutterResult11cancelTokenyyypSgc_SStF + 16 (<compiler-generated>:0)
6   amplify_api                     0x0000000102a386e8 SwiftAmplifyApiPlugin.innerHandle(method:callArgs:result:) + 180 (SwiftAmplifyApiPlugin.swift:59)
7   amplify_api                     0x0000000102a38560 SwiftAmplifyApiPlugin.handle(_:result:) + 300 (SwiftAmplifyApiPlugin.swift:51)
8   amplify_api                     0x0000000102a3860c @objc SwiftAmplifyApiPlugin.handle(_:result:) + 112 (<compiler-generated>:0)
9   Flutter                         0x00000001033ed028 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 116
10  Flutter                         0x0000000102f21a00 flutter::PlatformViewIOS::HandlePlatformMessage(std::__1::unique_ptr<flutter::PlatformMessage, std::__1::default_delete<flutter::PlatformMessage> >) + 516
11  Flutter                         0x00000001032b39a4 std::__1::__function::__func<fml::internal::CopyableLambda<flutter::Shell::OnEngineHandlePlatformMessage(std::__1::unique_ptr<flutter::PlatformMessage, std::__1::default_delete<flutter::PlatformMes... + 92
12  Flutter                         0x00000001031db908 fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 1668
13  Flutter                         0x00000001031deed4 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32
14  CoreFoundation                  0x0000000180e6a318 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1812)
15  CoreFoundation                  0x0000000180deecf0 __CFRunLoopDoTimer + 1076 (CFRunLoop.c:2420)
16  CoreFoundation                  0x0000000180de94ec __CFRunLoopDoTimers + 328 (CFRunLoop.c:2580)
17  CoreFoundation                  0x0000000180dc7d08 __CFRunLoopRun + 1944 (CFRunLoop.c:3116)
18  CoreFoundation                  0x0000000180ddb468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
19  GraphicsServices                0x000000019c97f38c GSEventRunModal + 164 (GSEvent.c:2200)
20  UIKitCore                       0x000000018377e5d0 -[UIApplication _run] + 1100 (UIApplication.m:3493)
21  UIKitCore                       0x00000001834fcf74 UIApplicationMain + 364 (UIApplication.m:5047)
22  Runner                          0x00000001008ff628 main + 64 (AppDelegate.swift:5)
23  dyld                            0x0000000100b55aa4 start + 520 (dyldMain.cpp:879)

----

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000001   x1: 0x000000016f5053b0   x2: 0x0000000102a36c88   x3: 0x0000000102a44708
    x4: 0x0000000000000020   x5: 0x000000016f504c08   x6: 0x000000016f504d20   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x0000000000000000  x10: 0x03000001040d7bb5  x11: 0x04000001040d7bb5
   x12: 0x000000000000014d  x13: 0x00000000b302d9ca  x14: 0x00000000b322e000  x15: 0x000000000002e000
   x16: 0x0000000185b913d4  x17: 0xbbbf000101ac1278  x18: 0x00000001073d61c8  x19: 0x40000002811e7240
   x20: 0x0000000102a44708  x21: 0xc000000000000024  x22: 0x8000000000000000  x23: 0xc000000000000024
   x24: 0x000000010713b8a0  x25: 0x000000010713b8a0  x26: 0x000000000000002e  x27: 0x00005f5d9eb119b9
   x28: 0x000000016f5057f8   fp: 0x000000016f505420   lr: 0xae598e0102a36c88
    sp: 0x000000016f5053b0   pc: 0x0000000102a36c8c cpsr: 0x60001000
   esr: 0x92000006 (Data Abort) byte read Translation fault
crawford-jake commented 2 years ago

We found in the CloudWatch logs that our subscriptions are passing an "Operation: null".

subscription mySub($userId: String!) {
    getUser(userId: $userId) {
      myStuff {
        name
       }
    }
  , Operation: null,  Variables: 
{
    "userId": "123456"
}
crawford-jake commented 2 years ago

@dnys1 Feedback from one of our cloud engineers: I started digging into amplify’s code, and since we get a null on removeOperation, that means that the operation is saved as a null when it is added. it gets added when we call Amplify.API.subscribe which executes this code and on line 161 its adding the operation (which is null) to a map.. so then on removeOperation when it gets the operation from the map, its getting a null value which means that createOperation on line 156 is returning null value.

We were able to crash the app by changing a lambda function to throw an error on a mutation. This crashed with the following:

Thread 16 name:
Thread 16 Crashed:
0   amplify_api                     0x000000010416ac68 $sSDyq_SgxcigSS_So11NSOperationCTg5 + 0 (<compiler-generated>:0)
1   amplify_api                     0x000000010416ac68 static OperationsManager.removeOperation(cancelToken:) + 84 (OperationsManager.swift:43)
2   amplify_api                     0x000000010416ac64 static OperationsManager.removeOperation(cancelToken:) + 80 (OperationsManager.swift:43)
3   amplify_api                     0x000000010415ff4c closure #2 in static FlutterGraphQLApi.createOperation(bridge:flutterResult:graphQLSubscriptionsStreamHandler:id:request:) + 456 (FlutterGraphQLApi.swift:210)
4   Amplify                         0x0000000103581454 closure #1 in AmplifyOperation.subscribe(resultListener:) + 464 (AmplifyOperation.swift:131)
5   Amplify                         0x0000000103581fec partial apply for closure #1 in AmplifyOperation.subscribe(resultListener:) + 36 (<compiler-generated>:0)
6   Amplify                         0x000000010361e864 closure #1 in SerialDispatcher.dispatch(to:) + 96 (SerialDispatcher.swift:45)
7   Amplify                         0x00000001035d2b00 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
8   libdispatch.dylib               0x00000001dd02ae68 _dispatch_call_block_and_release + 32 (init.c:1517)
9   libdispatch.dylib               0x00000001dd02ca2c _dispatch_client_callout + 20 (object.m:560)
10  libdispatch.dylib               0x00000001dd02fb44 _dispatch_queue_override_invoke + 784 (inline_internal.h:2622)
11  libdispatch.dylib               0x00000001dd03e164 _dispatch_root_queue_drain + 396 (inline_internal.h:0)
12  libdispatch.dylib               0x00000001dd03e96c _dispatch_worker_thread2 + 164 (queue.c:6935)
13  libsystem_pthread.dylib         0x000000024eaf6080 _pthread_wqthread + 228 (pthread.c:2612)
14  libsystem_pthread.dylib         0x000000024eaf5e5c start_wqthread + 8

Thread 16 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000001   x1: 0x000000016d6d6b30   x2: 0x000000010416ac64   x3: 0x000000010417b5c8
    x4: 0x0000000000000020   x5: 0x00000001041c275c   x6: 0x0000000283db7d00   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x0000000000000000  x10: 0x00000000fffffffe  x11: 0x0000000237cac958
   x12: 0x000000010366ab00  x13: 0x0000000000000000  x14: 0x000000010366aaf8  x15: 0x0000000236bb8450
   x16: 0x00000001e2181bf0  x17: 0xe3ba000237cac4d8  x18: 0x0000000000000000  x19: 0x4000000283db6a00
   x20: 0x000000010417b5c8  x21: 0xc000000000000024  x22: 0x8000000000000000  x23: 0x0000000283db7d00
   x24: 0x00000001041c275c  x25: 0x000000016d6d6cb0  x26: 0x000000010be24c80  x27: 0x0000000281d952e0
   x28: 0x0000000282638e80   fp: 0x000000016d6d6ba0   lr: 0x6037ce810416ac64
    sp: 0x000000016d6d6b30   pc: 0x000000010416ac68 cpsr: 0x60001000
   esr: 0x92000006 (Data Abort) byte read Translation fault
dnys1 commented 2 years ago

Thanks, @crawford-jake - sorry for the inconvenience. We should have a fix out soon.

crawford-jake commented 2 years ago

@dnys1 Was this fix released in 0.5.0?

dnys1 commented 2 years ago

Hi @crawford-jake - apologies for the delay on this. No, we have not released it yet. We are planning a release with this and a few other fixes either today or tomorrow. Thanks for your patience!

dnys1 commented 2 years ago

Sorry again for the delay getting this out. It's been released with v0.5.1

Ekoios-Teddy commented 1 year ago

@dnys1 I have gotten same error with Ios version 14.2 and 14.3, the screen is frozen. But I'm testing on real device ios 14.7, 15.7, simulator version 16.1 it work. Please help me to find what happened and how can fix it. Thanks

Screenshot 2023-03-21 at 15 53 15 Screenshot 2023-03-21 at 15 53 26
dnys1 commented 1 year ago

Hi @Ekoios-Teddy, this is a slightly different issue. Can you confirm you have updated your iOS target to 13.0 in your Xcode project? If so, can you create a new issue with the reproduction steps?

Screenshot 2023-03-13 at 8 41 14 AM Screenshot 2023-03-13 at 8 43 54 AM
Ekoios-Teddy commented 1 year ago

Yes, I have updated IOS target to 13.0 but it not work with any version Ios like 14.2 and 14.3 it not work.It work on 14.7 and 15.7 and 16.0.I guess maybe it will work with version greater than 14.5 or 14.7 but I can't check others version

dnys1 commented 1 year ago

Gotcha. Without more information, it's hard to say what the issue is. The stack trace shows the Hosted UI callbacks being triggered from a background thread. I'm not exactly sure how this would happen and haven't seen it myself. Would you be able to create a new issue with the steps to reproduce and a code sample which I can experiment with?

Ekoios-Teddy commented 1 year ago

Yes, i will create new issue about it. Humorously, it work with some version so i am not zoning this problem.