expo: App crashes in expo-dev-client with while reloading with Reanimated installed

Summary

This error only happens when using expo-dev-client, that is why I am reporting it here alongside reporting it on the react-native-reanimated repo (https://github.com/software-mansion/react-native-reanimated/issues/3895). This error does not happen in Expo Go when using the exact same versions of everything, therefore it might be a bug in expo-dev-client.

The essential error is that the app crashes when using R to reload the app. It also crashes when doing CMD+CTRL+Z and reloading the app, but it seems like it is non-deterministic when using the longer reload process. However, when pressing R to reload the app, if you try it a few times, the app crashes pretty much every single time.

Here are the steps for reproduction:

  1. Use npx create-expo-app to create a new Expo app (or use the repo I linked below)
  2. Install reanimated + expo-dev-client
  3. Build using EAS or npx expo prebuild + npx expo run:ios
  4. Open the app
  5. Instantly, press the “R” key rapidly in quick succession on the keyboard a couple of times
  6. You will most definitely experience a crash
  7. Repeat this process a few times. Make sure to instantly press “R” the moment the app loads. You will most definitely face crashes most of the times.

Managed or bare workflow?

managed

What platform(s) does this occur on?

iOS

Package versions

  "dependencies": {
    "expo": "~47.0.9",
    "expo-dev-client": "~2.0.1",
    "expo-status-bar": "~1.4.2",
    "moti": "^0.21.0",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-native": "0.70.5",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-reanimated": "~2.12.0",
    "react-native-web": "~0.18.9",
    "expo-splash-screen": "~0.17.5"
  },

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.6
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.1/bin/yarn
      npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm
      Watchman: 2022.12.19.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    IDEs:
      Android Studio: 2021.3 AI-213.7172.25.2113.9123335
      Xcode: 14.1/14B47b - /usr/bin/xcodebuild
    npmPackages:
      expo: ~47.0.9 => 47.0.9 
      react: 18.1.0 => 18.1.0 
      react-dom: 18.1.0 => 18.1.0 
      react-native: 0.70.5 => 0.70.5 
      react-native-web: ~0.18.9 => 0.18.10 
    npmGlobalPackages:
      eas-cli: 3.1.1
      expo-cli: 6.0.8
    Expo Workflow: managed

Reproducible demo

https://github.com/ansh/reanimated-reload-crash

Stacktrace (if a crash is involved)

Cannot upload the whole stack trace as it is too long. Find it here: https://textbin.net/apakzpco91

However, here are the important bits:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 4563994E-C45F-433B-A828-C3FDB519EC57
CrashReporter Key:   1FE04BB6-1746-7E3E-0A6A-A3FDC06EB779
Hardware Model:      MacBookPro18,1
Process:             reanimatedreloadcrash [86199]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/9D801D5D-42CA-4797-9163-E0E151668178/data/Containers/Bundle/Application/6D3F6BF7-BB1C-4FB5-8A93-FB8EB26F2C55/reanimatedreloadcrash.app/reanimatedreloadcrash
Identifier:          com.anshnanda.reanimated-reload-crash
Version:             1.0.0 (1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [33707]
Coalition:           com.apple.CoreSimulator.SimDevice.9D801D5D-42CA-4797-9163-E0E151668178 [171540]
Responsible Process: SimulatorTrampoline [963]

Date/Time:           2022-12-31 14:23:26.4445 +0530
Launch Time:         2022-12-31 14:23:21.7718 +0530
OS Version:          macOS 12.6 (21G115)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  35

...



Thread 35 Crashed:: com.facebook.react.JavaScript
0   libsystem_kernel.dylib        	       0x1af205e60 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x1af2583c0 pthread_kill + 256
2   libsystem_c.dylib             	       0x180129e28 abort + 124
3   libsystem_c.dylib             	       0x180129298 __assert_rtn + 268
4   reanimatedreloadcrash         	       0x102b62cb8 reanimated::SingleInstanceChecker<REAModule>::assertWithMessage(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 112 (SingleInstanceChecker.h:26)
5   reanimatedreloadcrash         	       0x102b62b5c reanimated::SingleInstanceChecker<REAModule>::SingleInstanceChecker() + 180 (SingleInstanceChecker.h:43)
6   reanimatedreloadcrash         	       0x102b62a98 reanimated::SingleInstanceChecker<REAModule>::SingleInstanceChecker() + 28 (SingleInstanceChecker.h:36)
7   reanimatedreloadcrash         	       0x102b62a6c -[REAModule .cxx_construct] + 40 (REAModule.mm:11)
8   libobjc.A.dylib               	       0x180031cd4 object_cxxConstructFromClass + 120
9   libobjc.A.dylib               	       0x18004cfcc +[NSObject new] + 28
10  reanimatedreloadcrash         	       0x102c76ea4 __115-[RCTModuleData initWithModuleClass:bridge:moduleRegistry:viewRegistry_DEPRECATED:bundleManager:callableJSModules:]_block_invoke + 36 (RCTModuleData.mm:116)
11  reanimatedreloadcrash         	       0x102c7791c -[RCTModuleData setUpInstanceAndBridge:] + 1300 (RCTModuleData.mm:190)
12  reanimatedreloadcrash         	       0x102c79708 -[RCTModuleData instance] + 1168 (RCTModuleData.mm:405)
13  reanimatedreloadcrash         	       0x102c17f48 -[RCTCxxBridge moduleForName:lazilyLoadIfNecessary:] + 680 (RCTCxxBridge.mm:607)
14  reanimatedreloadcrash         	       0x102efc504 RCTCxxBridge.EXDevLauncher_module(forName:lazilyLoadIfNecessary:) + 188 (EXDevLauncherRedBoxInterceptor.swift:48)
15  reanimatedreloadcrash         	       0x102efc7f4 @objc RCTCxxBridge.EXDevLauncher_module(forName:lazilyLoadIfNecessary:) + 108
16  reanimatedreloadcrash         	       0x102c183d8 -[RCTCxxBridge moduleForClass:] + 76 (RCTCxxBridge.mm:651)
17  reanimatedreloadcrash         	       0x102efc9d8 RCTCxxBridge.EXDevLauncher_module(forClass:) + 264 (EXDevLauncherRedBoxInterceptor.swift:54)
18  reanimatedreloadcrash         	       0x102efccbc @objc RCTCxxBridge.EXDevLauncher_module(forClass:) + 80
19  reanimatedreloadcrash         	       0x102afe29c reanimated::createReanimatedModule(RCTBridge*, std::__1::shared_ptr<facebook::react::CallInvoker>) + 128 (NativeProxy.mm:144)
20  reanimatedreloadcrash         	       0x102b5b2fc reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0::operator()(facebook::jsi::Runtime&) const + 152 (REAInitializer.mm:43)
21  reanimatedreloadcrash         	       0x102b5b244 decltype(static_cast<reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&>(fp)(static_cast<facebook::jsi::Runtime&>(fp0))) std::__1::__invoke<reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&, facebook::jsi::Runtime&>(reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&, facebook::jsi::Runtime&) + 32 (type_traits:3918)
22  reanimatedreloadcrash         	       0x102b5b1f4 void std::__1::__invoke_void_return_wrapper<void, true>::__call<reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&, facebook::jsi::Runtime&>(reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&, facebook::jsi::Runtime&) + 52 (invoke.h:61)
23  reanimatedreloadcrash         	       0x102b5b1a0 std::__1::__function::__alloc_func<reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0, std::__1::allocator<reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0>, void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) + 52 (function.h:178)
24  reanimatedreloadcrash         	       0x102b59cfc std::__1::__function::__func<reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0, std::__1::allocator<reanimated::REAJSIExecutorRuntimeInstaller(RCTBridge*, std::__1::function<void (facebook::jsi::Runtime&)>)::$_0>, void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) + 52 (function.h:352)
25  reanimatedreloadcrash         	       0x102b5bfbc std::__1::__function::__value_func<void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) const + 84 (function.h:505)
26  reanimatedreloadcrash         	       0x102b5bb94 std::__1::function<void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) const + 48 (function.h:1182)
27  reanimatedreloadcrash         	       0x102c5d74c facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0::operator()(facebook::jsi::Runtime&) const + 192 (RCTJSIExecutorRuntimeInstaller.mm:36)
28  reanimatedreloadcrash         	       0x102c5d66c decltype(static_cast<facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&>(fp)(static_cast<facebook::jsi::Runtime&>(fp0))) std::__1::__invoke<facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&, facebook::jsi::Runtime&>(facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&, facebook::jsi::Runtime&) + 32 (type_traits:3918)
29  reanimatedreloadcrash         	       0x102c5d61c void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&, facebook::jsi::Runtime&>(facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0&, facebook::jsi::Runtime&) + 52 (invoke.h:61)
30  reanimatedreloadcrash         	       0x102c5d5c8 std::__1::__function::__alloc_func<facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0, std::__1::allocator<facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0>, void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) + 52 (function.h:178)
31  reanimatedreloadcrash         	       0x102c5c048 std::__1::__function::__func<facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0, std::__1::allocator<facebook::react::RCTJSIExecutorRuntimeInstaller(std::__1::function<void (facebook::jsi::Runtime&)>)::$_0>, void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) + 52 (function.h:352)
32  reanimatedreloadcrash         	       0x102b5bfbc std::__1::__function::__value_func<void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) const + 84 (function.h:505)
33  reanimatedreloadcrash         	       0x102b5bb94 std::__1::function<void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) const + 48 (function.h:1182)
34  reanimatedreloadcrash         	       0x102e4dbac facebook::react::JSIExecutor::initializeRuntime() + 920 (JSIExecutor.cpp:140)
35  reanimatedreloadcrash         	       0x102e16f1c facebook::react::NativeToJsBridge::initializeRuntime()::$_0::operator()(facebook::react::JSExecutor*) + 36 (NativeToJsBridge.cpp:128)
36  reanimatedreloadcrash         	       0x102e16ed8 decltype(static_cast<facebook::react::NativeToJsBridge::initializeRuntime()::$_0&>(fp)(static_cast<facebook::react::JSExecutor*>(fp0))) std::__1::__invoke<facebook::react::NativeToJsBridge::initializeRuntime()::$_0&, facebook::react::JSExecutor*>(facebook::react::NativeToJsBridge::initializeRuntime()::$_0&, facebook::react::JSExecutor*&&) + 36 (type_traits:3918)
37  reanimatedreloadcrash         	       0x102e16e84 void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::NativeToJsBridge::initializeRuntime()::$_0&, facebook::react::JSExecutor*>(facebook::react::NativeToJsBridge::initializeRuntime()::$_0&, facebook::react::JSExecutor*&&) + 52 (invoke.h:61)
38  reanimatedreloadcrash         	       0x102e16e30 std::__1::__function::__alloc_func<facebook::react::NativeToJsBridge::initializeRuntime()::$_0, std::__1::allocator<facebook::react::NativeToJsBridge::initializeRuntime()::$_0>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) + 52 (function.h:178)
39  reanimatedreloadcrash         	       0x102e159dc std::__1::__function::__func<facebook::react::NativeToJsBridge::initializeRuntime()::$_0, std::__1::allocator<facebook::react::NativeToJsBridge::initializeRuntime()::$_0>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) + 52 (function.h:352)
40  reanimatedreloadcrash         	       0x102e28230 std::__1::__function::__value_func<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) const + 84 (function.h:505)
41  reanimatedreloadcrash         	       0x102e281a8 std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const + 48 (function.h:1182)
42  reanimatedreloadcrash         	       0x102e28168 facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8::operator()() const + 92 (NativeToJsBridge.cpp:310)
43  reanimatedreloadcrash         	       0x102e280ec decltype(static_cast<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(fp)()) std::__1::__invoke<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&) + 24 (type_traits:3918)
44  reanimatedreloadcrash         	       0x102e280a4 void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&) + 28 (invoke.h:61)
45  reanimatedreloadcrash         	       0x102e2807c std::__1::__function::__alloc_func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8>, void ()>::operator()() + 28 (function.h:178)
46  reanimatedreloadcrash         	       0x102e269e0 std::__1::__function::__func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8>, void ()>::operator()() + 28 (function.h:352)
47  reanimatedreloadcrash         	       0x102e979e8 std::__1::__function::__value_func<void ()>::operator()() const + 60 (function.h:505)
48  reanimatedreloadcrash         	       0x102e978f8 std::__1::function<void ()>::operator()() const + 24 (function.h:1182)
49  reanimatedreloadcrash         	       0x102c42440 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 24 (RCTCxxUtils.mm:74)
50  reanimatedreloadcrash         	       0x102c69a90 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) + 36 (RCTMessageThread.mm:69)
51  reanimatedreloadcrash         	       0x102c6f598 facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1::operator()() const + 80 (RCTMessageThread.mm:82)
52  reanimatedreloadcrash         	       0x102c6f528 decltype(static_cast<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(fp)()) std::__1::__invoke<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&) + 24 (type_traits:3918)
53  reanimatedreloadcrash         	       0x102c6f4e0 void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&) + 28 (invoke.h:61)
54  reanimatedreloadcrash         	       0x102c6f4b8 std::__1::__function::__alloc_func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1>, void ()>::operator()() + 28 (function.h:178)
55  reanimatedreloadcrash         	       0x102c6df20 std::__1::__function::__func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1>, void ()>::operator()() + 28 (function.h:352)
56  reanimatedreloadcrash         	       0x102e979e8 std::__1::__function::__value_func<void ()>::operator()() const + 60 (function.h:505)
57  reanimatedreloadcrash         	       0x102e978f8 std::__1::function<void ()>::operator()() const + 24 (function.h:1182)
58  reanimatedreloadcrash         	       0x102c697ec invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) + 48 (RCTMessageThread.mm:45)
59  CoreFoundation                	       0x180372fa4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
60  CoreFoundation                	       0x1803726ec __CFRunLoopDoBlocks + 364
61  CoreFoundation                	       0x18036cf14 __CFRunLoopRun + 776
62  CoreFoundation                	       0x18036c7f4 CFRunLoopRunSpecific + 584
63  reanimatedreloadcrash         	       0x102c14ce8 +[RCTCxxBridge runRunLoop] + 736 (RCTCxxBridge.mm:335)
64  Foundation                    	       0x180bf4aac __NSThread__start__ + 704
65  libsystem_pthread.dylib       	       0x1af2586c8 _pthread_start + 116
66  libsystem_pthread.dylib       	       0x1af253910 thread_start + 8

Thread 36:: com.facebook.react.JavaScript
0   libsystem_kernel.dylib        	       0x1af1fdfcc mach_msg_trap + 8
1   libsystem_kernel.dylib        	       0x1af1fe430 mach_msg + 72
2   CoreFoundation                	       0x180372a18 __CFRunLoopServiceMachPort + 156
3   CoreFoundation                	       0x18036d08c __CFRunLoopRun + 1152
4   CoreFoundation                	       0x18036c7f4 CFRunLoopRunSpecific + 584
5   reanimatedreloadcrash         	       0x102c14ce8 +[RCTCxxBridge runRunLoop] + 736 (RCTCxxBridge.mm:335)
6   Foundation                    	       0x180bf4aac __NSThread__start__ + 704
7   libsystem_pthread.dylib       	       0x1af2586c8 _pthread_start + 116
8   libsystem_pthread.dylib       	       0x1af253910 thread_start + 8


Thread 35 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000000   x5: 0x0000000000000020   x6: 0x0000000000000065   x7: 0x0000000103104ebc
    x8: 0x000000016ec4b000   x9: 0x4391cbacc73e39b9  x10: 0xcccccccccccccccd  x11: 0x000000000000000a
   x12: 0x0000000000000000  x13: 0x0000000000000032  x14: 0x0000000000000000  x15: 0x0000000000000000
   x16: 0x0000000000000148  x17: 0x0000000000000002  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x000000016ec4b000  x21: 0x000000000000b907  x22: 0x000000016ec4b0e0  x23: 0x0000000103104efd
   x24: 0x00000001b7914000  x25: 0x0000000000000000  x26: 0x00000001230d8040  x27: 0x00006000022b9840
   x28: 0x0000000000000000   fp: 0x000000016ec48000   lr: 0x00000001af2583c0
    sp: 0x000000016ec47fe0   pc: 0x00000001af205e60 cpsr: 0x40001000
   far: 0x00000001223f8000  esr: 0x56000080  Address size fault

Binary Images:
       0x1802ed000 -        0x180699fff com.apple.CoreFoundation (6.9) <b02805dc-7bce-3571-8eb6-ff671506488b> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
       0x102960000 -        0x10319ffff com.anshnanda.reanimated-reload-crash (1.0.0) <57cd24d8-34c3-379e-b74b-6dbdf744a38a> /Users/USER/Library/Developer/CoreSimulator/Devices/9D801D5D-42CA-4797-9163-E0E151668178/data/Containers/Bundle/Application/6D3F6BF7-BB1C-4FB5-8A93-FB8EB26F2C55/reanimatedreloadcrash.app/reanimatedreloadcrash
       0x180710000 -        0x180fc4fff com.apple.Foundation (6.9) <532aae62-f6cf-3de2-8988-170389a83ad5> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation
       0x180132000 -        0x180178fff libdispatch.dylib (*) <2cd267ae-adf6-3f56-897a-04baff62b34f> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib
       0x188fab000 -        0x188fb3fff com.apple.GraphicsServices (1.0) <66f66f45-e32d-348b-9833-1f04b12a4703> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
       0x112294000 -        0x11393ffff com.apple.UIKitCore (1.0) <e9f0192a-4554-3c71-b825-c7a78cfdf7d4> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
       0x10537c000 -        0x1053cbfff dyld_sim (*) <1772df31-9df3-36cc-a3c6-b34fd26bffe5> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
       0x105458000 -        0x1054b7fff dyld (*) <38ee9fe9-b66d-3066-8c5c-6ddf0d6944c6> /usr/lib/dyld
       0x1af251000 -        0x1af25dffb libsystem_pthread.dylib (*) <6de4a53b-8d96-3c92-b3c9-4a5ed84776fb> /usr/lib/system/libsystem_pthread.dylib
       0x1af1fd000 -        0x1af232ffb libsystem_kernel.dylib (*) <3f1dda9e-9999-35d8-9886-03267422f518> /usr/lib/system/libsystem_kernel.dylib
       0x184f66000 -        0x1859f9fff com.apple.Network (1.0) <f34f4f0e-1ed5-3db3-bb1d-8503919c67cb> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Network.framework/Network
       0x183df2000 -        0x184175fff com.apple.CFNetwork (1399) <edb4f97c-7130-3593-916f-73559d4e0f7f> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework/CFNetwork
       0x1087f4000 -        0x109b4bfff com.apple.JavaScriptCore (8614) <21d148db-d8df-3c62-8623-bf3318b3c4b3> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Cryptexes/OS/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
       0x1a1348000 -        0x1a1351fff libunwind.dylib (*) <4d5a5775-db25-3155-a36d-4adefe251260> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libunwind.dylib
       0x180228000 -        0x180241ffb libc++abi.dylib (*) <0910da7d-c457-3815-b689-1b1134e1f888> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++abi.dylib
       0x18002c000 -        0x180060d9f libobjc.A.dylib (*) <ebfccc66-96d4-34d3-86b4-a0b3937a18ac> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libobjc.A.dylib
       0x1800b5000 -        0x180131ff3 libsystem_c.dylib (*) <bb937670-480a-35f7-8422-2cb8216b06d7> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 25
  • Comments: 34 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@stevenpal Unfortunately the issue is not resolved for us with Expo 48.

I was experiencing this as well with Expo 47 (Expo Go without using expo-dev-client). Just upgraded to Expo 48 and the problem seems resolved. Able to hit R and the app reloads as expected.

npx expo start --clear

I am having same problem however Expo Go crashes every time i reload. (by pressing R). I do NOT have expo-dev-client installed, however reanimated is installed.

we removed react-native-reanimated and it fixed the issue for us.

it was added to our package.json because @react-navigation v5 needed it, but since then we are now using v6 and this package is not needed anymore.

I did find expo-skeleton-loader using it, but I replaced it with my own Skeleton Animation that uses import { Animated } from 'react-native'

App.tsx

import 'react-native-gesture-handler';

babel.config.js

    plugins: ['react-native-reanimated/plugin'],

android/gradle/wrapper/gradle-wrapper.properties

---: distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
+++: distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip

Fixes the problem.

expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 19.6.0 - /usr/local/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 9.6.1 - /usr/local/bin/npm
      Watchman: 2023.02.06.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - ~/.gem/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
      Android SDK:
        API Levels: 22, 26, 27, 28, 29, 30, 31, 32, 33
        Build Tools: 19.1.0, 20.0.0, 21.1.2, 22.0.1, 23.0.3, 24.0.3, 25.0.3, 26.0.0, 26.0.3, 27.0.3, 28.0.3, 29.0.2, 30.0.0, 30.0.1, 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.1, 33.0.2, 34.0.0, 34.0.0
        System Images: android-19 | Google APIs Intel x86 Atom, android-22 | ARM 64 v8a, android-22 | Google APIs ARM 64 v8a, android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | ARM 64 v8a, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs ATD ARM 64 v8a, android-32 | Google APIs ARM 64 v8a, android-32 | Google Play ARM 64 v8a, android-33 | Google APIs ARM 64 v8a, android-33 | Google Play ARM 64 v8a, android-TiramisuPrivacySandbox | Google Play ARM 64 v8a, android-TiramisuPrivacySandbox | Google Play Intel x86 Atom_64, android-UpsideDownCake-ext5 | Google APIs ARM 64 v8a, android-UpsideDownCake-ext5 | Google APIs Intel x86_64 Atom, android-UpsideDownCake-ext5 | Google Play ARM 64 v8a, android-UpsideDownCake-ext5 | Google Play Intel x86_64 Atom
    IDEs:
      Android Studio: 2022.1 AI-221.6008.13.2211.9619390
      Xcode: 14.2/14C18 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~48.0.6 => 48.0.7 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.71.3 => 0.71.3 
      react-native-web: ~0.18.11 => 0.18.12 
    npmGlobalPackages:
      eas-cli: 3.8.0
      expo-cli: 6.3.2
    Expo Workflow: bare

I’m also getting this error. When running on expo SDK 47, the reload works, but after I updated it to SDK 48, the reload closes the apps automatically. From the logs I saw that it seems to be the problem of the more than one instance of REAModule. This issue happens on both Expo GO and running with expo prebuild.

Any ideas on how to workaround? I saw that we can comment these lines on the development build, but I want to run it on Expo Go too Switching back to jsc as the engine fixed the issue for me.

With upgrading to Expo 49 and react-native-reanimated v3 issue is gone for us.

We are seeing this issue as well. So far, I see it’s crashing in the SingleInstanceChecker which is only being called in Debug Mode.

Commenting out any of these lines stops the crash. Apparently, there may be multiple instances of NativeReanimatedModule being instantiated.

I have same issue with sdk 48, reanimated 2.14.4 and rn 0.71.3

Still no fix on sdk 47 and reanimated v3

Any updates?