Android: Crash on app launch (0.59.0-rc.0)
See original GitHub issue🐛 Bug Report
New react-native init hooks --version 0.59.0-rc.0
application crashes on every react-native run-android
launch. Stack starts with:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hooks/com.hooks.MainActivity}: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
To Reproduce
W/ genymotion emulator running on OSX:
react-native init hooks --version 0.59.0-rc.0
cd hooks
react-native run-android
Expected Behavior
Would expect standard “Hello World, welcome to React Native” app to launch.
Code Example
Have Android emulator or device running (known to adb), then:
git clone git@github.com:FLGMwt/rn-hooks-rc-android-crash.git
cd rn-hooks-rc-android-crash
yarn install
react-native run-android
Environment
info
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 279.27 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.0.0 - /usr/local/bin/node
Yarn: 1.13.0 - ~/.yarn/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Watchman: 4.5.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 21, 23, 24, 25, 26, 27, 28
Build Tools: 21.1.2, 23.0.1, 24.0.0, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.3
System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-24 | Intel x86 Atom, android-24 | Intel x86 Atom_64, android-24 | Google APIs Intel x86 Atom_64
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.1 => 16.8.1
react-native: 0.59.0-rc.0 => 0.59.0-rc.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
EDIT: forgot to supply full crash log from adb logcat
:
02-13 20:09:35.250 1490 1757 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.hooks/.MainActivity bnds=[644,373][851,651] (has extras)} from uid 10049 on display 0
02-13 20:09:35.271 3528 3528 I art : Late-enabling -Xcheck:jni
02-13 20:09:35.272 3528 3528 W art : Unexpected CPU variant for X86 using defaults: x86
02-13 20:09:35.274 1490 1759 I ActivityManager: Start proc 3528:com.hooks/u0a80 for activity com.hooks/.MainActivity
02-13 20:09:35.331 1467 1471 D gralloc_vbox86: gralloc_alloc: format 1 and usage 0x933 imply creation of host color buffer
02-13 20:09:35.386 3528 3528 D SoLoader: init start
02-13 20:09:35.391 3528 3528 D SoLoader: adding system library source: /vendor/lib
02-13 20:09:35.391 3528 3528 D SoLoader: adding system library source: /system/lib
02-13 20:09:35.391 3528 3528 D SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.hooks-2/lib/x86 flags = 0]
02-13 20:09:35.392 3528 3528 D SoLoader: adding backup source from : com.facebook.soloader.ApkSoSource[root = /data/data/com.hooks/lib-main flags = 1]
02-13 20:09:35.392 3528 3528 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
02-13 20:09:35.392 3528 3528 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib flags = 2]
02-13 20:09:35.392 3528 3528 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.hooks-2/lib/x86 flags = 0]
02-13 20:09:35.392 3528 3528 D SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.hooks/lib-main flags = 1]
02-13 20:09:35.395 3528 3528 V fb-UnpackingSoSource: locked dso store /data/user/0/com.hooks/lib-main
02-13 20:09:35.397 3528 3528 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.hooks/lib-main
02-13 20:09:35.398 3528 3528 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.hooks/lib-main
02-13 20:09:35.398 3528 3528 D SoLoader: init finish: 4 SO sources prepared
02-13 20:09:35.398 3528 3528 D SoLoader: init exiting
02-13 20:09:35.409 1224 1239 D genymotion_audio: out_write: pcm_write() with out_frames=557 frame_size=4 returned -EPIPE
02-13 20:09:35.560 3528 3528 W art : Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
02-13 20:09:35.596 1224 1239 D genymotion_audio: out_write: pcm_write() with out_frames=557 frame_size=4 returned -EPIPE
02-13 20:09:35.694 3528 3528 D ReactNative: ReactInstanceManager.ctor()
02-13 20:09:35.709 3528 3528 D SoLoader: init exiting
02-13 20:09:35.763 1224 1239 D genymotion_audio: out_write: pcm_write() with out_frames=558 frame_size=4 returned -EPIPE
02-13 20:09:35.789 3528 3528 D NetworkSecurityConfig: Using Network Security Config from resource react_native_config debugBuild: true
02-13 20:09:35.796 3528 3528 W ResourceType: Failure getting entry for 0x7f0e0000 (t=13 e=0) (error -75)
02-13 20:09:35.797 3528 3528 D AndroidRuntime: Shutting down VM
02-13 20:09:35.800 3528 3528 E AndroidRuntime: FATAL EXCEPTION: main
02-13 20:09:35.800 3528 3528 E AndroidRuntime: Process: com.hooks, PID: 3528
02-13 20:09:35.800 3528 3528 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hooks/com.hooks.MainActivity}: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6119)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: Caused by: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:93)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.<init>(ReactInstanceManager.java:234)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:281)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:88)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:86)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:75)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:52)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6679)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: ... 9 more
02-13 20:09:35.800 3528 3528 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at java.lang.reflect.Constructor.newInstance0(Native Method)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:83)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: ... 19 more
02-13 20:09:35.800 3528 3528 E AndroidRuntime: Caused by: java.lang.RuntimeException: Failed to parse XML configuration from react_native_config
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.security.net.config.XmlConfigSource.ensureInitialized(XmlConfigSource.java:98)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.security.net.config.XmlConfigSource.getPerDomainConfigs(XmlConfigSource.java:65)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.security.net.config.ManifestConfigSource.getPerDomainConfigs(ManifestConfigSource.java:49)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.security.net.config.ApplicationConfig.ensureInitialized(ApplicationConfig.java:169)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.security.net.config.ApplicationConfig.getTrustManager(ApplicationConfig.java:120)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.security.net.config.RootTrustManagerFactorySpi.engineGetTrustManagers(RootTrustManagerFactorySpi.java:65)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at javax.net.ssl.TrustManagerFactory.getTrustManagers(TrustManagerFactory.java:285)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at okhttp3.internal.Util.platformTrustManager(Util.java:667)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at okhttp3.OkHttpClient.<init>(OkHttpClient.java:257)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1040)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.devsupport.DevServerHelper.<init>(DevServerHelper.java:138)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at com.facebook.react.devsupport.DevSupportManagerImpl.<init>(DevSupportManagerImpl.java:219)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: ... 22 more
02-13 20:09:35.800 3528 3528 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f0e0000
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:190)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.content.res.Resources.loadXmlResourceParser(Resources.java:2101)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.content.res.Resources.getXml(Resources.java:1164)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: at android.security.net.config.XmlConfigSource.ensureInitialized(XmlConfigSource.java:92)
02-13 20:09:35.800 3528 3528 E AndroidRuntime: ... 33 more
02-13 20:09:35.805 1490 2103 W ActivityManager: Force finishing activity com.hooks/.MainActivity
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >React native 0.59.9 app crashing in android - Stack Overflow
On your android/app/build.gradle try this settings and build you release app to test whether this is the case
Read more >App crashes after using useQuery or Realm.objects()
Hello friends I come to ask for help because I'm developing an application using React Native, Expo and Realm and I got stuck...
Read more >Why Do My Apps Keep Crashing on Android? - Avast
Do your Android apps keep crashing? Discover why and learn how to prevent Android apps crashing and freezing by following these methods.
Read more >Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
who is experiencing the same issue can do this workaround, just rename android/app/src/debug/res/xml-v28 to android/app/src/debug/res/xml.
@FLGMwt thank you for using RC version and filing the issue against it. I just submitted a PR, and we’ll include it in the next RC release.
@hey99xx thank you