Standalone Android app sometimes crashes on app load

#1

Hello all,

Once again, a huge thank you to the Expo team!

I sometimes experience a fatal crash on startup from background on my standalone Android app. Sometimes it fails with an Expo screen like this:

and on other occasions, it shows the dreaded " has stopped working". When refreshing/restarting the app, it works fine again.

I’ve hooked up my app to Sentry, but I don’t get any useful information on the crash, just a pointer to a linenumber in the minified app bundle.

I’ve tried doing adb logcat ASAP after a crash, and have tried to filter the output to what makes sense for React Native/Expo to the following output:

10-20 12:31:37.759 5719-5902/? D/ReactNative: ReactInstanceManager.createReactContext()
10-20 12:31:37.759 5719-5719/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class abi20_0_0.com.facebook.react.views.viewpager.ReactViewPagerManager
10-20 12:31:37.766 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupViewManager
10-20 12:31:37.766 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
10-20 12:31:37.767 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeViewManager
10-20 12:31:37.767 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
10-20 12:31:37.768 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextViewManager
10-20 12:31:37.768 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
10-20 12:31:37.768 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager
10-20 12:31:37.769 5719-5719/? D/AndroidRuntime: Shutting down VM
                                                 
                                                 
                                                 --------- beginning of crash
10-20 12:31:37.769 5719-5719/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: dk.mytrophy.android, PID: 5719
                                                 abi20_0_0.com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 48 could not be found
                                                     at abi20_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:131)
                                                     at abi20_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:294)
                                                     at abi20_0_0.com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:177)
                                                     at abi20_0_0.com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:776)
                                                     at abi20_0_0.com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:855)
                                                     at abi20_0_0.com.facebook.react.uimanager.UIViewOperationQueue.access$1600(UIViewOperationQueue.java:46)
                                                     at abi20_0_0.com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded(UIViewOperationQueue.java:813)
                                                     at abi20_0_0.com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:21)
                                                     at android.os.Handler.handleCallback(Handler.java:789)
                                                     at android.os.Handler.dispatchMessage(Handler.java:98)
                                                     at android.os.Looper.loop(Looper.java:164)
                                                     at android.app.ActivityThread.main(ActivityThread.java:6541)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
10-20 12:31:37.770 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
10-20 12:31:37.772 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
10-20 12:31:37.772 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager
10-20 12:31:37.773 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
10-20 12:31:37.774 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
10-20 12:31:37.774 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBarShadowNode
10-20 12:31:37.775 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager
10-20 12:31:37.776 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager
10-20 12:31:37.777 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode
10-20 12:31:37.777 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager
10-20 12:31:37.777 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$ReactSwitchShadowNode
10-20 12:31:37.778 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarManager
10-20 12:31:37.779 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager
10-20 12:31:37.780 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager
10-20 12:31:37.781 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManager
10-20 12:31:37.781 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewShadowNode
10-20 12:31:37.781 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager
10-20 12:31:37.781 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageShadowNode
10-20 12:31:37.782 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
10-20 12:31:37.783 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager
10-20 12:31:37.783 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ModalHostShadowNode
10-20 12:31:37.783 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
10-20 12:31:37.784 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode
10-20 12:31:37.785 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager
10-20 12:31:37.788 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputShadowNode
10-20 12:31:37.788 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager
10-20 12:31:37.788 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
10-20 12:31:37.789 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager
10-20 12:31:37.790 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
10-20 12:31:37.790 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.LinearGradientManager
10-20 12:31:37.790 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.av.video.VideoViewManager
10-20 12:31:37.792 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.barcodescanner.BarCodeScannerViewManager
10-20 12:31:37.792 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.camera.CameraViewManager
10-20 12:31:37.793 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.gl.GLViewManager
10-20 12:31:37.793 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.fbads.NativeAdViewManager
10-20 12:31:37.793 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.fbads.BannerViewManager
10-20 12:31:37.794 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.RenderableViewManager
10-20 12:31:37.794 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.GroupShadowNode
10-20 12:31:37.796 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.PathShadowNode
10-20 12:31:37.797 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.CircleShadowNode
10-20 12:31:37.797 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.EllipseShadowNode
10-20 12:31:37.797 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.LineShadowNode
10-20 12:31:37.798 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.RectShadowNode
10-20 12:31:37.798 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.TextShadowNode
10-20 12:31:37.799 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.TSpanShadowNode
10-20 12:31:37.799 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.TextPathShadowNode
10-20 12:31:37.799 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.ImageShadowNode
10-20 12:31:37.800 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.ClipPathShadowNode
10-20 12:31:37.800 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.DefsShadowNode
10-20 12:31:37.800 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.UseShadowNode
10-20 12:31:37.801 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.SymbolShadowNode
10-20 12:31:37.801 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.LinearGradientShadowNode
10-20 12:31:37.802 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.RadialGradientShadowNode
10-20 12:31:37.802 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.SvgViewManager
10-20 12:31:37.802 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.svg.SvgViewShadowNode
10-20 12:31:37.803 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.maps.AirMapCalloutManager
10-20 12:31:37.803 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.maps.AirMapMarkerManager
10-20 12:31:37.804 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.maps.AirMapPolylineManager
10-20 12:31:37.805 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.maps.AirMapPolygonManager
10-20 12:31:37.806 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.maps.AirMapCircleManager
10-20 12:31:37.806 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.maps.AirMapManager
10-20 12:31:37.807 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.maps.AirMapLiteManager
10-20 12:31:37.807 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.maps.AirMapUrlTileManager
10-20 12:31:37.808 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.lottie.LottieAnimationViewManager
10-20 12:31:37.808 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.gesturehandler.react.RNGestureHandlerButtonViewManager
10-20 12:31:37.809 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class versioned.host.exp.exponent.modules.api.components.gesturehandler.react.RNGestureHandlerPackage$DummyViewManager
10-20 12:31:37.809 5719-5902/? W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.ReactShadowNode

Once the app is running, it runs great and smooth, but this is a class A deterrent for new users. I’ve only experienced it on my own phone, a Nexus 6P running 8.0, and cannot replicate on my collegue’s Pixel (also 8.0), so it might be something related to hardware/memory.

Any pointers or help would be much appreciated :slight_smile: Thanks!

1 Like
#2

Maybe related Github issue?

Our app is running SDK20 (RN 0.47)

I will try to upgrade to SDK21 and see if it helps, but if it’s the same issue I might have to wait for SDK22 (which I’m hoping is based off 0.49?).

Any chance of an ETA for SDK22?

#3

Kept searching, tried random search for Expo SDK 22 - and apparently, the update was posted 16 hours before I wrote this :slight_smile:

I’ll try upgrading and see if it helps and get back with my results.

#4

We think this is fixed in SDK 22. Let us know if you run into it again!

#5

I have the same problem, even with SDK 22…

https://github.com/expo/expo/issues/779

#6

Ok we fixed another issue with this for the SDK 23 release. Sorry this took so long. Hopefully this time it will work in all cases.

#7

Thanks for getting back to this thread with an update. When can we expect SDK23? Because the app still crashes on startup sometimes on Android, with the following screen:

Other times it just crashes with “[App] has stopped” - I managed to get a adb logcat dump from one of these as well:

https://pastebin.com/eAP2aTrK

I don’t know what the problem is. It seems there’s trouble adding a view, and that another version of the native library was expected. Is this what you think will be fixed on SDK23, or am I facing a separate issue @jesse

#8

That specific issue probably won’t be fixed by SDK 23, which is coming soon (we release ~monthly, give or take a week). It looks like an issue with React Native.

#9

Which issue is the one that will be fixed in SDK23? :slight_smile:

#10

Anything to do with Views / tags is unchanged. The fix was for “EOFs” related to bundle loading.

#11

I misspoke - we also fixed a bug to do with View tags after resuming the app after some time. So the bug you encountered might be fixed – we just released SDK 23 today if you would like to try it out soon.

#12

Thanks again.

I’ve been doing some research, too, and have found clues pointing to the use of LayoutAnimation maybe being the culprit. I’m not using it in my own codebase, but was thinking you might in Expo, perhaps within the AppLoading/Splash API/components?

For example this: https://github.com/facebook/react-native/issues/13984

I’ll try upgrading to SDK23 as soon as I can, but can you confirm/deny the above in the meantime? Can you link me the PR with the fix you mention about view tags when resuming?

Thanks :slight_smile:

#13

I’ve been testing with SDK23 for a while, and it seems to have fixed the problems I had with startup on Android. Whether it’s Expo’s changes or the updates to RN is unknown.

Thanks for your hard work :slight_smile:

1 Like
#14

Good to hear that @jhalborg!