Skip to content
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

App Crashes - On upgrading to Android 14(SDK 34) #46087

Closed
preetamra opened this issue Aug 18, 2024 · 2 comments
Closed

App Crashes - On upgrading to Android 14(SDK 34) #46087

preetamra opened this issue Aug 18, 2024 · 2 comments
Labels
Needs: Author Feedback Platform: Android Android applications. Type: Unsupported Version Issues reported to a version of React Native that is no longer supported

Comments

@preetamra
Copy link

Description

Currently, my codebase supports Android 13 (SDK version: 33). I wanted to upgrade to SDK 33(Android 14)

On Android 14 updates, the following changes have been made:

minSdkVersion = 24
compileSdkVersion = 34
targetSdkVersion = 34

My current React Native version is 0.71.8.

However, upon launching the application, I encountered an issue where the App Crashes immediately on the launch.

Steps to reproduce

Update Build.gradle's version to support SDK version 34.

React Native Version

0.71.8

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
    OS: macOS 14.5
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
    Memory: 341.92 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.13.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.5.2 - /usr/local/bin/npm
    Watchman: 2024.07.15.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.15.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2023.3 AI-233.14808.21.2331.11709847
    Xcode: 15.4/15F31d - /usr/bin/xcodebuild
  Languages:
    Java: 18.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.8 => 0.71.8 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Stacktrace or Logs

FATAL EXCEPTION: main
                                                                                                    Process: com.blockerplus.blockerplus, PID: 5634
                                                                                                    java.lang.RuntimeException: Unable to create application com.blockerplus.blockerplus.MainApplication: java.lang.RuntimeException: Requested enabled DevSupportManager, but BridgeDevSupportManager class was not found or could not be created
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7610)
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:257)
                                                                                                    	at android.os.Looper.loop(Looper.java:368)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8848)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
                                                                                                    Caused by: java.lang.RuntimeException: Requested enabled DevSupportManager, but BridgeDevSupportManager class was not found or could not be created
                                                                                                    	at com.facebook.react.devsupport.DefaultDevSupportManagerFactory.create(DefaultDevSupportManagerFactory.java:97)
                                                                                                    	at com.facebook.react.ReactInstanceManager.<init>(ReactInstanceManager.java:255)
                                                                                                    	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:330)
                                                                                                    	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:94)
                                                                                                    	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41)
                                                                                                    	at com.blockerplus.blockerplus.MainApplication.onCreate(MainApplication.java:136)
                                                                                                    	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1335)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7603)
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:257) 
                                                                                                    	at android.os.Looper.loop(Looper.java:368) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8848) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049) 
                                                                                                    Caused by: java.lang.reflect.InvocationTargetException
                                                                                                    	at java.lang.reflect.Constructor.newInstance0(Native Method)
                                                                                                    	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
                                                                                                    	at com.facebook.react.devsupport.DefaultDevSupportManagerFactory.create(DefaultDevSupportManagerFactory.java:86)
                                                                                                    	at com.facebook.react.ReactInstanceManager.<init>(ReactInstanceManager.java:255) 
                                                                                                    	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:330) 
                                                                                                    	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:94) 
                                                                                                    	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41) 
                                                                                                    	at com.blockerplus.blockerplus.MainApplication.onCreate(MainApplication.java:136) 
                                                                                                    	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1335) 
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7603) 
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:257) 
                                                                                                    	at android.os.Looper.loop(Looper.java:368) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8848) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049) 
                                                                                                    Caused by: java.lang.SecurityException: com.blockerplus.blockerplus: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
                                                                                                    	at android.os.Parcel.createExceptionOrNull(Parcel.java:3087)
                                                                                                    	at android.os.Parcel.createException(Parcel.java:3071)
                                                                                                    	at android.os.Parcel.readException(Parcel.java:3054)
                                                                                                    	at android.os.Parcel.readException(Parcel.java:2996)
                                                                                                    	at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684)
                                                                                                    	at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1868)
                                                                                                    	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1804)
                                                                                                    	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792)
                                                                                                    	at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:765)
                                                                                                    	at com.facebook.react.devsupport.DevSupportManagerBase.reload(DevSupportManagerBase.java:1101)
                                                                                                    	at com.facebook.react.devsupport.DevSupportManagerBase.reloadSettings(DevSupportManagerBase.java:721)
                                                                                                    	at com.facebook.react.devsupport.DevSupportManagerBase.setDevSupportEnabled(DevSupportManagerBase.java:593)
                                                                                                    	at com.facebook.react.devsupport.DevSupportManagerBase.<init>(DevSupportManagerBase.java:206)
                                                                                                    	at com.facebook.react.devsupport.BridgeDevSupportManager.<init>(BridgeDevSupportManager.java:78)
                                                                                                    	at java.lang.reflect.Constructor.newInstance0(Native Method) 
                                                                                                    	at java.lang.reflect.Constructor.newInstance(Constructor.java:343) 
                                                                                                    	at com.facebook.react.devsupport.DefaultDevSupportManagerFactory.create(DefaultDevSupportManagerFactory.java:86) 
                                                                                                    	at com.facebook.react.ReactInstanceManager.<init>(ReactInstanceManager.java:255) 
                                                                                                    	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:330) 
                                                                                                    	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:94) 
                                                                                                    	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41) 
                                                                                                    	at com.blockerplus.blockerplus.MainApplication.onCreate(MainApplication.java:136) 
                                                                                                    	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1335) 
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7603) 
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:257) 
                                                                                                    	at android.os.Looper.loop(Looper.java:368) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8848) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049) 
                                                                                                    Caused by: android.os.RemoteException: Remote stack trace:
                                                                                                    	at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14959)
                                                                                                    	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2570)
                                                                                                    	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3033)
                                                                                                    	at android.os.Binder.execTransactInternal(Binder.java:1387)
                                                                                                    	at android.os.Binder.execTransact(Binder.java:1299)

Reproducer

https://github.com/preetamra/ReactNativeReproducer

Screenshots and Videos

No response

@react-native-bot
Copy link
Collaborator

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@react-native-bot react-native-bot added Type: Unsupported Version Issues reported to a version of React Native that is no longer supported Needs: Author Feedback Platform: Android Android applications. and removed Needs: Triage 🔍 labels Aug 18, 2024
@react-native-bot
Copy link
Collaborator

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Platform: Android Android applications. Type: Unsupported Version Issues reported to a version of React Native that is no longer supported
Projects
None yet
Development

No branches or pull requests

2 participants