[expo-updates] Disable expo-updates in app.json make iOS app crash at launch.
Patafix opened this issue · comments
Summary
If we disabled expo-updates in app.json, iOS app crash at launch.
Some native relevant crash log :
Thread 0 name:
Thread 0 Crashed:
0 XXX 0x000000010431b3a4 Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value + 0 (ExpoUpdatesReactDelegateHandler.swift:0)
1 XXX 0x000000010431b3a4 specialized ExpoUpdatesReactDelegateHandler.appController(:didStartWithSuccess:) + 980 (ExpoUpdatesReactDelegateHandler.swift:80)
2 XXX 0x000000010431b0bc specialized ExpoUpdatesReactDelegateHandler.appController(:didStartWithSuccess:) + 236 (ExpoUpdatesReactDelegateHandler.swift:78)
3 XXX 0x000000010431a9e4 appController + 4 (:0)
4 XXX 0x000000010431a9e4 @objc ExpoUpdatesReactDelegateHandler.appController(_:didStartWithSuccess:) + 48
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
44
Environment
Expo CLI 5.0.3 environment info:
System:
OS: Linux 5.13 Freedesktop.org 20.08.14 (Flatpak runtime) 20.08.14 (Flatpak runtime)
Shell: 5.1.8 - /bin/sh
Binaries:
Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node
npm: 8.3.0 - ~/.nvm/versions/node/v16.10.0/bin/npm
npmPackages:
@expo/metro-config: ^0.1.49 => 0.1.84
expo: ^44.0.0 => 44.0.1
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-web: 0.17.1 => 0.17.1
npmGlobalPackages:
eas-cli: 0.43.0
Expo Workflow: managed
Reproducible demo
In app.json:
updates: {
enabled: false,
fallbackToCacheTimeout: 0,
},
The app work fine with :
updates: {
fallbackToCacheTimeout: 0,
},
if you're reading this and want to disable expo-updates but this is blocking you, you can just uninstall expo-updates. this also works fine in managed apps in sdk 44+, where expo-updates is not installed automatically as part of the build process anymore.
if you're reading this and want to disable expo-updates but this is blocking you, you can just uninstall expo-updates. this also works fine in managed apps in sdk 44+, where expo-updates is not installed automatically as part of the build process anymore.
besides that, we may release new expo-updates with the fix next week. in case someone wants to have expo-updates installed but disable it, waiting the new release is also an alternative. i'll update here once we release new expo-updates.
Hey,
I have the same issue, but expo-updates
is enabled and I need it because I am using sentry. It was working locally on the simulator and I have this error when I submit my app on TestFlight...
Here is the log I have, does someone can help me please ? Thank youuu
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000104c6a94c
Exception Note: EXC_CORPSE_NOTIFY
Terminating Process: exc handler [5966]
Triggered by Thread: 0
Kernel Triage:
VM - pmap_enter failed with resource shortage
Thread 0 name:
Thread 0 Crashed:
0 TrainityMobileReactNative 0x0000000104c6a94c Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value + 0 (ExpoUpdatesReactDelegateHandler.swift:0)
1 TrainityMobileReactNative 0x0000000104c6a94c specialized ExpoUpdatesReactDelegateHandler.appController(_:didStartWithSuccess:) + 980 (ExpoUpdatesReactDelegateHandler.swift:80)
2 TrainityMobileReactNative 0x0000000104c6a664 specialized ExpoUpdatesReactDelegateHandler.appController(_:didStartWithSuccess:) + 236 (ExpoUpdatesReactDelegateHandler.swift:78)
3 TrainityMobileReactNative 0x0000000104c69f8c appController + 4 (<compiler-generated>:0)
4 TrainityMobileReactNative 0x0000000104c69f8c @objc ExpoUpdatesReactDelegateHandler.appController(_:didStartWithSuccess:) + 48
5 TrainityMobileReactNative 0x0000000104c4876c __73-[EXUpdatesAppController appLoaderTask:didFinishWithLauncher:isUpToDate:]_block_invoke + 52 (EXUpdatesAppController.m:252)
6 libdispatch.dylib 0x000000018090d924 _dispatch_call_block_and_release + 32 (init.c:1517)
7 libdispatch.dylib 0x000000018090f670 _dispatch_client_callout + 20 (object.m:560)
8 libdispatch.dylib 0x000000018091db70 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
9 CoreFoundation 0x0000000180c55d84 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
10 CoreFoundation 0x0000000180c0ff5c __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
11 CoreFoundation 0x0000000180c23468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
12 GraphicsServices 0x000000019c7ae38c GSEventRunModal + 164 (GSEvent.c:2200)
13 UIKitCore 0x00000001835c5088 -[UIApplication _run] + 1100 (UIApplication.m:3493)
14 UIKitCore 0x0000000183343958 UIApplicationMain + 2092 (UIApplication.m:5046)
15 TrainityMobileReactNative 0x0000000104c2fa0c main + 88 (main.m:7)
16 dyld 0x0000000105139aa4 start + 520 (dyldMain.cpp:879)
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
Bare
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
44
@Lauwed could you share your AppDelegate.m for troubleshooting?
@Kudo I managed to resolve my problem. I don't think it's gonna help a lot of people, but I share it anyway if it can help.
Basically, I had a problem with bridges and this error appeared while running on iOS
RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks
I was able to resolve this by using the solution of this guy on Stack Overflow. The thing is, I override this line
RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
by the one, Hussain Pettiwala was given in his solution
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"Test" initialProperties:nil];
I only had to put back the original line and everything is working fine now.
Have a great dayyy
this is released in expo-updates@0.11.6