-
Notifications
You must be signed in to change notification settings - Fork 24k
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
ReactNative app craches on Android 11 device with targetSdkVersion 30 #30366
Comments
Make sure that you run ‘react-native start’ |
I did run ‘react-native start’, the issue is still there. |
Some dependencies, like OkHTTP3, crashing when targetSdkVersion is 29 or above, please don't change this. 0.63.4 and 0.64 bumped all dependencies to latest ones. |
Getting this issue on RN version 0.62.2 as well target version is 29 |
I have similar error for |
Why is it closed changing targetSdkVersion back to 29 is not a permanent fix, It is mandatory to update targetSdkVersion to 30 before November for existing apps and before August for new apps |
Any updates on that? As far as I know Google will require |
The crash fixed for me on updating sentry/react-native library, please check your dependencies support targetsdkversion 30 |
@manohar-octifi What version of sentry/react-native library you use now ? |
2.0 is the version worked for me |
@manohar-octifi buildToolsVersion compileSdkVersion targetSdkVersion all have 30 as value ? |
Yeah that's right |
🔥🔥🔥 |
It works for me 💯 💯 💯 💯 💯 |
@girish54321 where did you add the lines? implementation("com.squareup.okhttp3:okhttp:4.9.1") |
@carefreeav09
|
Did it work for you? |
It work's for me! My sentry package is now: And followed to migration guide from their docs. https://docs.sentry.io/platforms/react-native/migration/#from-1x-to-2x |
@ErickMaeda What version of react-native? |
@ashishprasad2163 |
@ErickMaeda Ok Thanks😊. I upgraded sentry to 2.0.0. Tried @carefreeav09's solution. Upgraded clever tap also. Still, the app is crashing on android 11 devices without any error and working fine on android 9 and below devices. I'm new to mobile development. Please suggest some way to debug it. I'm on "react-native": "^0.60.5" |
@ashishprasad2163 Try running the release build with
|
@manohar-octifi Thanks for sharing the steps. I did as you said and got this. Is this useful?
|
Description
ReactNative app crashes on Android 11 device with targetSdkVersion 30.
React Native version:
react-native info
output:System:
OS: macOS 10.15.7
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 209.25 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.0 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29, 30
Build Tools: 26.0.2, 27.0.3, 28.0.0, 28.0.3, 29.0.0, 29.0.2, 30.0.0, 30.0.1
System Images: android-26 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64
Android NDK: 21.3.6528147
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.6858069
Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_211 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
[Updated] Steps To Reproduce
Actual Results
Exception in native call
java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:234)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:29)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:258)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1293)
at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1016)
at java.lang.Thread.run(Thread.java:923)
Expected Results
App should build and run successfully on Android 11 device/emulator with targetSdkVersion 30
The text was updated successfully, but these errors were encountered: