Skip to content

App Crash on Reload with expo reloadAppAsync #2966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
Hikkikomori72 opened this issue Feb 17, 2025 · 11 comments
Open
1 task done

App Crash on Reload with expo reloadAppAsync #2966

Hikkikomori72 opened this issue Feb 17, 2025 · 11 comments
Labels
bug Something isn't working

Comments

@Hikkikomori72
Copy link

Hikkikomori72 commented Feb 17, 2025

Description

reopened issue #2834

Description
I used a basic example from the documentation to draw a line using the Points component. The app crashes upon attempting to reload using the reloadAppAsync() function from expo. I have not tested other examples. Note that the application may not crash on the first attempt; sometimes, it requires multiple reloads to reproduce the issue. The crash occurs both in Expo Go and in the release build (tested on iOS)

In my real project, where I render many elements using the skia library, the crash happens consistently on every reload attempt.

In the video, you can see the app flickering — this happens when I press the "Reload app" text. On one of the reloads, the app crashes.

398208739-87b4f4c3-f40e-4ef8-bcb7-3d6f932d8024.mp4

React Native Skia Version

1.11.3

React Native Version

0.76.6

Using New Architecture

  • Enabled

Steps to Reproduce

I updated my example project here to upgrade the Skia version to 1.11.3, but I am still encountering errors.

  1. install packages with yarn install
  2. then yarn start
  3. for testing scan qr code in console

The only version that works without issues in a pure Expo project is 1.5.

Snack, Code Example, Screenshot, or Link to Repository

https://github.com/Hikkikomori72/reloadAppAsyncTest

@Hikkikomori72 Hikkikomori72 added the bug Something isn't working label Feb 17, 2025
@Hikkikomori72
Copy link
Author

@wcandillon Could you help me figure out the problem?

@imcquee
Copy link

imcquee commented May 15, 2025

Experienced this with both reloadAsync and reloadAppAsync

RN Version:

0.79.2

Expo Version:

53.0.8

Skia Version:

2.0.0

@AlirezaHadjar
Copy link

We're also facing the same issue, whenever installing expo-update and reloading the app using reloadAsync.
Here is the sentry stacks trace. Though it only happens for us on Android

Image

cc @wcandillon

@AlirezaHadjar
Copy link

AlirezaHadjar commented May 16, 2025

here is also the logcat:

2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A  Cmdline: com.renegades.contentroyale
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A  pid: 17254, tid: 17254, name: s.contentroyale  >>> com.renegades.contentroyale <<<
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #00 pc 000000000021789c  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/base.apk!librnskia.so (offset 0x6bc0000) (RNSkia::RNSkManager::setSkiaView(unsigned long, std::__ndk1::shared_ptr<RNSkia::RNSkView>)+32) (BuildId: 01c73b5c7be9473c42ee2d14c88104baac3e8127)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #01 pc 00000000001f6be8  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/base.apk!librnskia.so (offset 0x6bc0000) (RNSkia::JniSkiaBaseView::unregisterView()+104) (BuildId: 01c73b5c7be9473c42ee2d14c88104baac3e8127)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #02 pc 00000000001f78fc  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/base.apk!librnskia.so (offset 0x6bc0000) (facebook::jni::detail::MethodWrapper<void (RNSkia::JniSkiaPictureView::*)(), &RNSkia::JniSkiaPictureView::unregisterView(), RNSkia::JniSkiaPictureView, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<RNSkia::JniSkiaPictureView, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>)+64) (BuildId: 01c73b5c7be9473c42ee2d14c88104baac3e8127)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #03 pc 00000000001f719c  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/base.apk!librnskia.so (offset 0x6bc0000) (facebook::jni::detail::FunctionWrapper<void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<RNSkia::JniSkiaPictureView, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<RNSkia::JniSkiaPictureView, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*, void>::call(_JNIEnv*, _jobject*, void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<RNSkia::JniSkiaPictureView, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>))+60) (BuildId: 01c73b5c7be9473c42ee2d14c88104baac3e8127)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #06 pc 00000000014ef478  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.shopify.reactnative.skia.SkiaBaseView.dropInstance+0)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #08 pc 00000000014ef3aa  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.shopify.reactnative.skia.SkiaBaseViewManager.onDropViewInstance+10)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #10 pc 00000000014ef388  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.shopify.reactnative.skia.SkiaBaseViewManager.onDropViewInstance+4)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #13 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #16 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.664 17561-17561 DEBUG                   crash_dump64                         A        #19 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #22 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #25 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #28 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #31 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #34 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #37 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #40 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #43 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #46 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #49 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #52 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #55 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #58 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #61 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #64 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #67 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #70 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #73 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #76 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #79 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #82 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #85 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #88 pc 0000000001506a9e  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.dropView+14)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #90 pc 0000000000bc8dda  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.facebook.react.uimanager.NativeViewHierarchyManager.removeRootView+118)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #92 pc 0000000000bd5098  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.facebook.react.uimanager.UIViewOperationQueue$RemoveRootViewOperation.execute+16)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #96 pc 0000000000bd5784  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.facebook.react.uimanager.UIViewOperationQueue.-$$Nest$mflushPendingBatches+0)
2025-05-16 08:38:12.665 17561-17561 DEBUG                   crash_dump64                         A        #98 pc 0000000000bd466c  /data/app/~~zsZDA2pfsxzyrl2W2IWVnw==/com.renegades.contentroyale-pfeNPQKAVTuekstqNP2hYw==/oat/arm64/base.vdex (com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded+4)

@AlirezaHadjar
Copy link

@wcandillon could you take a look at this crash. it's crashing our app at an alarming rate. happy to provide a repro if that helps!

@wcandillon
Copy link
Contributor

wcandillon commented Jun 6, 2025

I've been looking into this (see #3178) and cc'ing @terrysahaidak who is affected by the issue as well.
I was able to reproduce the crash you are mentioning on oldArch and Android. Can you confirm as well that this is on oldArch only?
I spent a bit of time debugging it without getting to anything sensible yet. My original hunch was to not invest too much time on it since the future is newArch. But I forgot that this also affects over the air updates.

@AlirezaHadjar
Copy link

thank you for putting time debugging it. and yes we're on old arch

@terrysahaidak
Copy link
Contributor

are you still on 76? for me 76 worked fine, but I had crashes on 77 when metro reloads the app in debug.

@AlirezaHadjar
Copy link

We're on RN 0.79.2 and skia 2.0.1

@terrysahaidak
Copy link
Contributor

I found this issue in react native 77+. It's possible that skia is actually the first to crash and get the stack trace.

facebook/react-native#50274

@AlirezaHadjar
Copy link

it could be but isn't this issue related to debug mode and not the release mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants