wix / react-native-notifications

React Native Notifications
MIT License
3.25k stars 764 forks source link

EXC_BREAKPOINT crash with silent notifications #895

Closed nicolas6422 closed 2 years ago

nicolas6422 commented 2 years ago

We've been seeing a huge number of these crashes since support for silent notifications was added (back?) in this PR https://github.com/wix/react-native-notifications/pull/587

From some research it seems like this is a common crash when the callback handler is called multiple times. After some debugging I found that I can repro when the client code takes longer than 25 seconds to complete and call the completion handler.

In that case this code will execute, calling the completion handler for me https://github.com/wix/react-native-notifications/blob/master/lib/ios/RNNotificationEventHandler.m#L53

But then sometime later it is called again here https://github.com/wix/react-native-notifications/blob/master/lib/ios/RNNotificationEventHandler.m#L43

Our current mitigation is to patch that function by first checking if the completion handler has been called. Here's the patch for reference.

diff --git a/node_modules/react-native-notifications/lib/ios/RNNotificationEventHandler.m b/node_modules/react-native-notifications/lib/ios/RNNotificationEventHandler.m
index 5c8dd0b..9b8f44a 100644
--- a/node_modules/react-native-notifications/lib/ios/RNNotificationEventHandler.m
+++ b/node_modules/react-native-notifications/lib/ios/RNNotificationEventHandler.m
@@ -39,16 +39,19 @@ - (void)didReceiveBackgroundNotification:(NSDictionary *)userInfo withCompletion
         __block BOOL completionHandlerCalled = NO;
         dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
         [_store setBackgroundActionCompletionHandler:^(UIBackgroundFetchResult result) {
-            dispatch_async(dispatch_get_main_queue(), ^{
-                completionHandler(result);
-            });
-            completionHandlerCalled = YES;
+            if (!completionHandlerCalled) {
+                completionHandlerCalled = YES;
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    completionHandler(result);
+                });
+            }
             dispatch_semaphore_signal(semaphore);
         } withCompletionKey:uuid];
         [RNEventEmitter sendEvent:RNNotificationReceivedBackground body:[RNNotificationParser parseNotificationUserInfo:userInfo withIdentifier:uuid]];
         // Allow 25 seconds for this to process. If not finished call the callback with failed.
         dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, 25 * NSEC_PER_SEC));
         if (!completionHandlerCalled) {
+            completionHandlerCalled = YES;
             dispatch_async(dispatch_get_main_queue(), ^{
                 completionHandler(UIBackgroundFetchResultFailed);
             });

Obviously, our code should not be taking more than 25 seconds, but until we can figure that out, this patch seems to work.

Full trace

OS Version: iOS 15.4.1 (19E258)
Report Version: 104

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Crashed Thread: 0

Application Specific Information:
Exception 6, Code 2766350976, Subcode 8

Thread 0 Crashed:
0   libdispatch.dylib               0x324e83a80         dispatch_group_leave.cold.1
1   libdispatch.dylib               0x324e4e870         dispatch_group_leave
2   libdispatch.dylib               0x324e4be64         _dispatch_call_block_and_release
3   libdispatch.dylib               0x324e4da28         _dispatch_client_callout
4   libdispatch.dylib               0x324e5bf44         _dispatch_main_queue_drain
5   libdispatch.dylib               0x324e5bb94         _dispatch_main_queue_callback_4CF
6   CoreFoundation                  0x3254a22ec         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
7   CoreFoundation                  0x32545c1f0         __CFRunLoopRun
8   CoreFoundation                  0x32546f6b4         CFRunLoopRunSpecific
9   GraphicsServices                0x35d5c1370         GSEventRunModal
10  UIKitCore                       0x32a245e84         -[UIApplication _run]
11  UIKitCore                       0x329fc75e8         UIApplicationMain
12  Driver                          0x2047cb1b8         main (main.m:7)
13  <unknown>                       0x10546dce4         <redacted>

Thread 0 Crashed:
0   libdispatch.dylib               0x324e83a80         dispatch_group_leave.cold.1
1   libdispatch.dylib               0x324e4e870         dispatch_group_leave
2   libdispatch.dylib               0x324e4be64         _dispatch_call_block_and_release
3   libdispatch.dylib               0x324e4da28         _dispatch_client_callout
4   libdispatch.dylib               0x324e5bf44         _dispatch_main_queue_drain
5   libdispatch.dylib               0x324e5bb94         _dispatch_main_queue_callback_4CF
6   CoreFoundation                  0x3254a22ec         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
7   CoreFoundation                  0x32545c1f0         __CFRunLoopRun
8   CoreFoundation                  0x32546f6b4         CFRunLoopRunSpecific
9   GraphicsServices                0x35d5c1370         GSEventRunModal
10  UIKitCore                       0x32a245e84         -[UIApplication _run]
11  UIKitCore                       0x329fc75e8         UIApplicationMain
12  Driver                          0x2047cb1b8         main (main.m:7)
13  <unknown>                       0x10546dce4         <redacted>

Thread 1
0   libsystem_kernel.dylib          0x394853ab4         __workq_kernreturn
1   libsystem_pthread.dylib         0x40748b104         _pthread_wqthread

Thread 2 name: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib          0x3948534e0         mach_msg_trap
1   libsystem_kernel.dylib          0x394853b20         mach_msg
2   CoreFoundation                  0x32545781c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32545bca8         __CFRunLoopRun
4   CoreFoundation                  0x32546f6b4         CFRunLoopRunSpecific
5   Foundation                      0x328444410         -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
6   Foundation                      0x328485ca8         -[NSRunLoop(NSRunLoop) runUntilDate:]
7   UIKitCore                       0x32a1bffac         -[UIEventFetcher threadMain]
8   Foundation                      0x328494558         __NSThread__start__
9   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 3
0   libsystem_kernel.dylib          0x394853a6c         __semwait_signal
1   libsystem_c.dylib               0x33b70d0d8         nanosleep
2   libsystem_c.dylib               0x33b72137c         sleep
3   Driver                          0x204ba3f24         monitorCachedData (SentryCrashCachedData.c:139)
4   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 4 name: SentryCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib          0x3948534e0         mach_msg_trap
1   libsystem_kernel.dylib          0x394853b20         mach_msg
2   Driver                          0x204bb0ae0         handleExceptions (SentryCrashMonitor_MachException.c:266)
3   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 6
0   libsystem_kernel.dylib          0x394853ab4         __workq_kernreturn
1   libsystem_pthread.dylib         0x40748b104         _pthread_wqthread

Thread 7 name: com.facebook.react.JavaScript
0   JavaScriptCore                  0x33c652264         JSC::JSLock::willReleaseLock
1   JavaScriptCore                  0x33c652204         JSC::JSLock::willReleaseLock
2   JavaScriptCore                  0x33c651be8         JSC::JSLockHolder::~JSLockHolder
3   JavaScriptCore                  0x33bc2e43c         JSValueUnprotect
4   Driver                          0x204b7b248         facebook::jsc::JSCRuntime::JSCObjectValue::invalidate (JSCRuntime.cpp:580)
5   Driver                          0x204b821d0         [inlined] facebook::jsi::Pointer::~Pointer (jsi.h:337)
6   Driver                          0x204b821d0         [inlined] facebook::jsi::Object::~Object (jsi.h:507)
7   Driver                          0x204b821d0         [inlined] facebook::jsi::Object::~Object (jsi.h:507)
8   Driver                          0x204b821d0         facebook::jsi::dynamicFromValue (JSIDynamic.cpp:183)
9   Driver                          0x204b849a4         facebook::react::JSIExecutor::callNativeModules (JSIExecutor.cpp:391)
10  Driver                          0x204b84b5c         facebook::react::JSIExecutor::invokeCallback (JSIExecutor.cpp:262)
11  Driver                          0x204b78ed0         [inlined] std::__1::__function::__value_func<T>::operator() (functional:1885)
12  Driver                          0x204b78ed0         [inlined] std::__1::function<T>::operator() (functional:2560)
13  Driver                          0x204b78ed0         [inlined] facebook::react::NativeToJsBridge::runOnExecutorQueue::lambda::operator() (NativeToJsBridge.cpp:310)
14  Driver                          0x204b78ed0         [inlined] std::__1::__invoke<T> (type_traits:3694)
15  Driver                          0x204b78ed0         [inlined] std::__1::__invoke_void_return_wrapper<T>::__call<T> (__functional_base:348)
16  Driver                          0x204b78ed0         [inlined] std::__1::__function::__alloc_func<T>::operator() (functional:1558)
17  Driver                          0x204b78ed0         std::__1::__function::__func<T>::operator() (functional:1732)
18  Driver                          0x204ac3540         [inlined] std::__1::__function::__value_func<T>::operator() (functional:1885)
19  Driver                          0x204ac3540         [inlined] std::__1::function<T>::operator() (functional:2560)
20  Driver                          0x204ac3540         facebook::react::tryAndReturnError (RCTCxxUtils.mm:74)
21  Driver                          0x204acf640         facebook::react::RCTMessageThread::tryFunc (RCTMessageThread.mm:69)
22  Driver                          0x204acf3f4         [inlined] std::__1::__function::__value_func<T>::operator() (functional:1885)
23  Driver                          0x204acf3f4         [inlined] std::__1::function<T>::operator() (functional:2560)
24  Driver                          0x204acf3f4         facebook::react::RCTMessageThread::runAsync (RCTMessageThread.mm:45)
25  CoreFoundation                  0x3254c30e0         __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
26  CoreFoundation                  0x3254c403c         __CFRunLoopDoBlocks
27  CoreFoundation                  0x32545bec4         __CFRunLoopRun
28  CoreFoundation                  0x32546f6b4         CFRunLoopRunSpecific
29  Driver                          0x204ab85d4         +[RCTCxxBridge runRunLoop] (RCTCxxBridge.mm:308)
30  Foundation                      0x328494558         __NSThread__start__
31  libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 8
0   libsystem_kernel.dylib          0x394853ab4         __workq_kernreturn
1   libsystem_pthread.dylib         0x40748b104         _pthread_wqthread

Thread 9 name: AVAudioSession Notify Thread
0   libsystem_kernel.dylib          0x3948534e0         mach_msg_trap
1   libsystem_kernel.dylib          0x394853b20         mach_msg
2   CoreFoundation                  0x32545781c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32545bca8         __CFRunLoopRun
4   CoreFoundation                  0x32546f6b4         CFRunLoopRunSpecific
5   AudioSession                    0x33805af00         CADeprecated::GenericRunLoopThread::Entry
6   AudioSession                    0x3380648ec         CADeprecated::CAPThread::Entry
7   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 10 name: com.apple.CoreMotion.MotionThread
0   libsystem_kernel.dylib          0x3948534e0         mach_msg_trap
1   libsystem_kernel.dylib          0x394853b20         mach_msg
2   CoreFoundation                  0x32545781c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32545bca8         __CFRunLoopRun
4   CoreFoundation                  0x32546f6b4         CFRunLoopRunSpecific
5   CoreFoundation                  0x3254f0894         CFRunLoopRun
6   CoreMotion                      0x33fb33750         CLMotionActivity::isTypeInVehicle
7   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 11 name: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib          0x3948534e0         mach_msg_trap
1   libsystem_kernel.dylib          0x394853b20         mach_msg
2   CoreFoundation                  0x32545781c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32545bca8         __CFRunLoopRun
4   CoreFoundation                  0x32546f6b4         CFRunLoopRunSpecific
5   CFNetwork                       0x3267034d4         _CFURLStorageSessionDisableCache
6   Foundation                      0x328494558         __NSThread__start__
7   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 12 name: com.apple.coreaudio.AQClient
0   libsystem_kernel.dylib          0x3948534e0         mach_msg_trap
1   libsystem_kernel.dylib          0x394853b20         mach_msg
2   CoreFoundation                  0x32545781c         __CFRunLoopServiceMachPort
3   CoreFoundation                  0x32545bca8         __CFRunLoopRun
4   CoreFoundation                  0x32546f6b4         CFRunLoopRunSpecific
5   AudioToolbox                    0x33af86810         CADeprecated::GenericRunLoopThread::Entry
6   libAudioToolboxUtility.dylib    0x3581b6044         CADeprecated::CAPThread::Entry
7   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 13 name: fs-default-0
0   libsystem_kernel.dylib          0x394854640         __psynch_mutexwait
1   libsystem_pthread.dylib         0x40748c3d8         _pthread_mutex_firstfit_lock_wait
2   libsystem_pthread.dylib         0x407493528         _pthread_mutex_firstfit_lock_slow
3   FullStory                       0x1057fff4c         __fs_log_impl
4   FullStory                       0x105803860         __fs_log_impl
5   FullStory                       0x105859358         rust_eh_personality
6   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 14 name: fs-default-1
0   libsystem_kernel.dylib          0x394854640         __psynch_mutexwait
1   libsystem_pthread.dylib         0x40748c3d8         _pthread_mutex_firstfit_lock_wait
2   libsystem_pthread.dylib         0x407493528         _pthread_mutex_firstfit_lock_slow
3   FullStory                       0x1057fff4c         __fs_log_impl
4   FullStory                       0x105803860         __fs_log_impl
5   FullStory                       0x105859358         rust_eh_personality
6   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 15 name: fs-default-2
0   libsystem_kernel.dylib          0x394853f64         __psynch_cvwait
1   libsystem_pthread.dylib         0x407492294         _pthread_cond_wait
2   FullStory                       0x10585246c         rust_eh_personality
3   FullStory                       0x105869fd8         rust_eh_personality
4   FullStory                       0x105800744         __fs_log_impl
5   FullStory                       0x105803860         __fs_log_impl
6   FullStory                       0x105859358         rust_eh_personality
7   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 16 name: fs-default-3
0   libsystem_kernel.dylib          0x394854640         __psynch_mutexwait
1   libsystem_pthread.dylib         0x40748c3d8         _pthread_mutex_firstfit_lock_wait
2   libsystem_pthread.dylib         0x407493528         _pthread_mutex_firstfit_lock_slow
3   FullStory                       0x1057fff4c         __fs_log_impl
4   FullStory                       0x105803860         __fs_log_impl
5   FullStory                       0x105859358         rust_eh_personality
6   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 17 name: fs-default-4
0   libsystem_kernel.dylib          0x394854640         __psynch_mutexwait
1   libsystem_pthread.dylib         0x40748c3d8         _pthread_mutex_firstfit_lock_wait
2   libsystem_pthread.dylib         0x407493528         _pthread_mutex_firstfit_lock_slow
3   FullStory                       0x1057fff4c         __fs_log_impl
4   FullStory                       0x105803860         __fs_log_impl
5   FullStory                       0x105859358         rust_eh_personality
6   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 18 name: fs-default-5
0   libsystem_kernel.dylib          0x394854640         __psynch_mutexwait
1   libsystem_pthread.dylib         0x40748c3d8         _pthread_mutex_firstfit_lock_wait
2   libsystem_pthread.dylib         0x407493528         _pthread_mutex_firstfit_lock_slow
3   FullStory                       0x1057fff4c         __fs_log_impl
4   FullStory                       0x105803860         __fs_log_impl
5   FullStory                       0x105859358         rust_eh_personality
6   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 19 name: futures-timer
0   libsystem_kernel.dylib          0x394853f64         __psynch_cvwait
1   libsystem_pthread.dylib         0x407492294         _pthread_cond_wait
2   FullStory                       0x105857338         rust_eh_personality
3   FullStory                       0x10585364c         rust_eh_personality
4   FullStory                       0x105804018         __fs_log_impl
5   FullStory                       0x1058054ec         __fs_log_impl
6   FullStory                       0x105859358         rust_eh_personality
7   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 20
0   libsystem_kernel.dylib          0x394853ab4         __workq_kernreturn
1   libsystem_pthread.dylib         0x40748b104         _pthread_wqthread

Thread 21
0   libsystem_kernel.dylib          0x394853f64         __psynch_cvwait
1   libsystem_pthread.dylib         0x407492294         _pthread_cond_wait
2   JavaScriptCore                  0x33cb064d0         scavenger_thread_main
3   libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 22
0   libsystem_kernel.dylib          0x394853ab4         __workq_kernreturn
1   libsystem_pthread.dylib         0x40748b104         _pthread_wqthread

Thread 23
0   libsystem_kernel.dylib          0x394853ab4         __workq_kernreturn
1   libsystem_pthread.dylib         0x40748b104         _pthread_wqthread

Thread 24
0   JavaScriptCore                  0x33bc0dd08         JSC::JSCell::visitChildren
1   JavaScriptCore                  0x33c662ca4         [inlined] JSC::JSObject::visitChildren
2   JavaScriptCore                  0x33c662ca4         JSC::JSObject::visitChildren
3   JavaScriptCore                  0x33c1d8ca4         JSC::SlotVisitor::drain::lambda::operator()
4   JavaScriptCore                  0x33c1d5d78         JSC::SlotVisitor::drain
5   JavaScriptCore                  0x33c1d6740         JSC::SlotVisitor::drainFromShared
6   JavaScriptCore                  0x33c1ae7c8         WTF::SharedTaskFunctor<T>::run
7   JavaScriptCore                  0x33ca66f98         WTF::ParallelHelperClient::runTask
8   JavaScriptCore                  0x33ca67cf4         WTF::ParallelHelperPool::Thread::work
9   JavaScriptCore                  0x33ca2f660         WTF::Detail::CallableWrapper<T>::call
10  JavaScriptCore                  0x33ca88f64         WTF::Thread::entryPoint
11  JavaScriptCore                  0x33ca8b270         WTF::wtfThreadEntryPoint
12  libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 25
0   libsystem_kernel.dylib          0x394853600         syscall_thread_switch
1   JavaScriptCore                  0x33ca59344         WTF::LockAlgorithm<T>::lockSlow
2   JavaScriptCore                  0x33c1cb48c         JSC::MarkedBlock::aboutToMarkSlow
3   JavaScriptCore                  0x33c59f61c         JSC::HashMapBucket<T>::visitChildren
4   JavaScriptCore                  0x33c1d8cf8         JSC::SlotVisitor::drain::lambda::operator()
5   JavaScriptCore                  0x33c1d5d78         JSC::SlotVisitor::drain
6   JavaScriptCore                  0x33c1d6740         JSC::SlotVisitor::drainFromShared
7   JavaScriptCore                  0x33c1ae7c8         WTF::SharedTaskFunctor<T>::run
8   JavaScriptCore                  0x33ca66f98         WTF::ParallelHelperClient::runTask
9   JavaScriptCore                  0x33ca67cf4         WTF::ParallelHelperPool::Thread::work
10  JavaScriptCore                  0x33ca2f660         WTF::Detail::CallableWrapper<T>::call
11  JavaScriptCore                  0x33ca88f64         WTF::Thread::entryPoint
12  JavaScriptCore                  0x33ca8b270         WTF::wtfThreadEntryPoint
13  libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 26
0   JavaScriptCore                  0x33c1d57fc         JSC::SlotVisitor::markAuxiliary
1   JavaScriptCore                  0x33c662f68         [inlined] JSC::JSObject::visitChildren
2   JavaScriptCore                  0x33c662f68         JSC::JSObject::visitChildren
3   JavaScriptCore                  0x33c1d8ca4         JSC::SlotVisitor::drain::lambda::operator()
4   JavaScriptCore                  0x33c1d5d78         JSC::SlotVisitor::drain
5   JavaScriptCore                  0x33c1d6740         JSC::SlotVisitor::drainFromShared
6   JavaScriptCore                  0x33c1ae7c8         WTF::SharedTaskFunctor<T>::run
7   JavaScriptCore                  0x33ca66f98         WTF::ParallelHelperClient::runTask
8   JavaScriptCore                  0x33ca67cf4         WTF::ParallelHelperPool::Thread::work
9   JavaScriptCore                  0x33ca2f660         WTF::Detail::CallableWrapper<T>::call
10  JavaScriptCore                  0x33ca88f64         WTF::Thread::entryPoint
11  JavaScriptCore                  0x33ca8b270         WTF::wtfThreadEntryPoint
12  libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 27
0   JavaScriptCore                  0x33c1d8cb8         JSC::SlotVisitor::drain::lambda::operator()
1   JavaScriptCore                  0x33c1d8cb4         JSC::SlotVisitor::drain::lambda::operator()
2   JavaScriptCore                  0x33c1d5d78         JSC::SlotVisitor::drain
3   JavaScriptCore                  0x33c1d6740         JSC::SlotVisitor::drainFromShared
4   JavaScriptCore                  0x33c1ae7c8         WTF::SharedTaskFunctor<T>::run
5   JavaScriptCore                  0x33ca66f98         WTF::ParallelHelperClient::runTask
6   JavaScriptCore                  0x33ca67cf4         WTF::ParallelHelperPool::Thread::work
7   JavaScriptCore                  0x33ca2f660         WTF::Detail::CallableWrapper<T>::call
8   JavaScriptCore                  0x33ca88f64         WTF::Thread::entryPoint
9   JavaScriptCore                  0x33ca8b270         WTF::wtfThreadEntryPoint
10  libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 28
0   libsystem_kernel.dylib          0x394853f64         __psynch_cvwait
1   libsystem_pthread.dylib         0x407492294         _pthread_cond_wait
2   JavaScriptCore                  0x33ca686d8         WTF::ParkingLot::parkConditionallyImpl
3   JavaScriptCore                  0x33c90bccc         WTF::Condition::waitUntilUnchecked<T>
4   JavaScriptCore                  0x33c1d6598         JSC::SlotVisitor::drainFromShared
5   JavaScriptCore                  0x33c1ae7c8         WTF::SharedTaskFunctor<T>::run
6   JavaScriptCore                  0x33ca66f98         WTF::ParallelHelperClient::runTask
7   JavaScriptCore                  0x33ca67cf4         WTF::ParallelHelperPool::Thread::work
8   JavaScriptCore                  0x33ca2f660         WTF::Detail::CallableWrapper<T>::call
9   JavaScriptCore                  0x33ca88f64         WTF::Thread::entryPoint
10  JavaScriptCore                  0x33ca8b270         WTF::wtfThreadEntryPoint
11  libsystem_pthread.dylib         0x40748b9a8         _pthread_start

Thread 29
0   JavaScriptCore                  0x33c1c9f54         JSC::MarkedBlock::Handle::stopAllocating
1   JavaScriptCore                  0x33c1c4914         [inlined] JSC::LocalAllocator::stopAllocating
2   JavaScriptCore                  0x33c1c4914         JSC::LocalAllocator::stopAllocating
3   JavaScriptCore                  0x33c1907c0         JSC::BlockDirectory::stopAllocating
4   JavaScriptCore                  0x33c1ccb24         JSC::MarkedSpace::stopAllocating
5   JavaScriptCore                  0x33c1a1548         JSC::Heap::stopThePeriphery
6   JavaScriptCore                  0x33c19e2b4         JSC::Heap::finishChangingPhase
7   JavaScriptCore                  0x33c19e004         JSC::Heap::runCurrentPhase
8   JavaScriptCore                  0x33c1a9850         JSC::Heap::HeapThread::work
9   JavaScriptCore                  0x33ca2f660         WTF::Detail::CallableWrapper<T>::call
10  JavaScriptCore                  0x33ca88f64         WTF::Thread::entryPoint
11  JavaScriptCore                  0x33ca8b270         WTF::wtfThreadEntryPoint
12  libsystem_pthread.dylib         0x40748b9a8         _pthread_start

EOF
Anzormumladze commented 2 years ago

how you solved this issue ? can you comment there steps for patching package ?

nicolas6422 commented 2 years ago

I just made the changes in node_modules directly then ran patch-package https://www.npmjs.com/package/patch-package

Anzormumladze commented 2 years ago

patch isn't working for me :/

nicolas6422 commented 2 years ago

You still get the crash? Is the completion handler still getting called twice?

Anzormumladze commented 2 years ago

Yes, it's called twice and crashing again

nicolas6422 commented 2 years ago

Do you have repro steps? I am not able to repro after this patch

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 2 years ago

The issue has been closed for inactivity.