microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.95k stars 1.46k forks source link

Android app is crashing on taking mandatory codepush com.facebook.react.modules.core.ExceptionsManagerModule.reportException #2670

Closed vinayak-bm-ai closed 3 months ago

vinayak-bm-ai commented 7 months ago

Steps to Reproduce

  1. Distribute a code push from the app center as mandatory for Android
  2. Open the application on an Android device
  3. App crash triggered

Expected Behavior

App does not crash when we make code push mandatory.

Actual Behavior

The Android app crashes when attempting to take codepush, but only if it's set to be mandatory. This started to happen when we upgraded to react-native-code-push 8.1.0 previously there were no crashes related to this.

Crash Details

ExceptionsManagerModule.java line 72
com.facebook.react.modules.core.ExceptionsManagerModule.reportException

Fatal Exception: com.facebook.react.common.JavascriptException
Invariant Violation: This can happen if: * Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project. * A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes, stack: anonymous@29:290 runApplication@132:1613 value@36:3866 anonymous@36:675 value@36:2510 value@36:646
Screenshot 2024-02-27 at 2 31 17 PM

Environment

We tested this behavior, the release's crash-free rate suddenly drops when the code push is set to mandatory.

jibinbajuMTN commented 7 months ago

I am also facing the same issue with the version 8.1.1. app crashing after we download and install the latest air push updates.any updates on this?

pierroo commented 7 months ago

same here, if that matters

100sarthak100 commented 6 months ago

I'm getting same issue here, on "react native" : "^0.73.4" & "react-native-code-push": "^8.1.1"

crash -> null pointer dereference: SIGSEGV 0x00000000000000c0

maqeelqureshi commented 6 months ago

Same issue. Mandatory codepush is also not working.

react-native 0.73.4 react-native-code-push 8.2.1 node 21.6.2 appcenter-cli 3.0.0 eas-cli 7.3.0
expo-cli 6.3.10 npm 10.2.4 java 17.0.8

NxcomMobile commented 6 months ago

I also have this problem.

react-native: 0.73.1 react-native-code-push:8.2.1

Logcat shows error: TypeError: Cannot read property 'split' of undefined, js engine: hermes Invariant Violation: "App" has not been registered. This can happen if:

DmitriyKirakosyan commented 6 months ago

Thanks for bringing this to our attention. Unfortunately, I haven't been able to reproduce the issue on my end. Could you please provide a demo application that showcases the problem? This would greatly help in diagnosing and addressing the issue more effectively.

jsh7195 commented 4 months ago

I was fine with version 8.1.0 but after I recently upgraded to 8.2.2, I get an error when installing it and it becomes a rollback. "com.facebook.react.modules.core.ExceptionsManagerModule.reportException ExceptionsManagerModule.java, line 65 com.facebook.react.common.JavascriptException: Error: Exception in HostFunction: expected 0 arguments, got 1, js engine: hermes"

I changed it to 8.1.0 so it's okay, but it's an optional code push and as soon as I download it, I proceed with the installation...

DmitriyKirakosyan commented 4 months ago

@jsh7195, was the issue occurring only with mandatory updates, or could any update fail? Was it consistently crashing with every update, or was it happening only on specific Android devices?

DmitriyKirakosyan commented 3 months ago

Closing due to inactivity.

DhaivatKhanparaPanamax commented 1 month ago

i am facing the same issue.

DmitriyKirakosyan commented 1 month ago

@DhaivatKhanparaPanamax , thanks for reaching out! Please answer to these questions and provide more info about your project, including react-native and codepush versions you use. Also please attach your crash log.

DhaivatKhanparaPanamax commented 1 month ago

It is occurring with both the updates. no update fails. yes it consistently crashing with every update. In any android device it is crashing.

DmitriyKirakosyan commented 4 weeks ago

@DhaivatKhanparaPanamax , Thanks for your answers. Please share your crash log and codepush logs.

jsh7195 commented 1 week ago

@jsh7195, was the issue occurring only with mandatory updates, or could any update fail? Was it consistently crashing with every update, or was it happening only on specific Android devices?

I am so sorry for the late response. It was not a required update. (no mandatory) It only happens on Android( Galaxy flip, folder, etc.. and LG V40 model.).