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

Android crashes/rollback every time an update is applied #2615

Closed
zgordon02 opened this issue Nov 8, 2023 · 4 comments
Closed

Android crashes/rollback every time an update is applied #2615

zgordon02 opened this issue Nov 8, 2023 · 4 comments

Comments

@zgordon02
Copy link

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Steps to Reproduce

  1. I have an bare expo project, fully installed codepush and it is working fine in iOS
  2. I am using this in my index.js:
registerRootComponent(
  codePush({
    checkFrequency: codePush.CheckFrequency.ON_APP_START,
    installMode: codePush.InstallMode.IMMEDIATE,
  })(App)
);
  1. Every update attempt in Android fails, iOS has no issues.

Expected Behavior

What you expected to happen?
I expect the update to apply properly

Actual Behavior

What actually happens?
I get the following exception, the app crashes, and the update is rolled back

2023-11-08 07:41:15.055 27221-27295 ReactNative             pid-27221                            D  [CodePush] Loading JS bundle from "/data/user/0/my.app/files/CodePush/6c1f8393d90670dfdd1f924f6a413442dc672aa7cfd1c68b88a0180de478911b/CodePush/index.android.bundle"
2023-11-08 07:41:15.291  1157-2187  BiometricS...reAuthInfo pid-1157                             D  Package: my.app Sensor ID: 0 Modality: 2 Status: 1
2023-11-08 07:41:15.292  1157-2187  BiometricS...reAuthInfo pid-1157                             D  Package: my.app Sensor ID: 1 Modality: 8 Status: 4
2023-11-08 07:41:15.418 27221-27283 AndroidRuntime          pid-27221                            E  FATAL EXCEPTION: expo.modules.AsyncFunctionQueue
                                                                                                    Process: my.app, PID: 27221
                                                                                                    java.lang.NullPointerException: java.lang.NullPointerException
                                                                                                    	at expo.modules.kotlin.jni.JavaCallback.invoke(Native Method)
                                                                                                    	at expo.modules.kotlin.jni.JavaCallback.invoke(JavaCallback.kt:24)
                                                                                                    	at expo.modules.kotlin.jni.PromiseImpl.reject(PromiseImpl.kt:87)
                                                                                                    	at expo.modules.kotlin.Promise$DefaultImpls.reject(Promise.kt:15)
                                                                                                    	at expo.modules.kotlin.jni.PromiseImpl.reject(PromiseImpl.kt:26)
                                                                                                    	at expo.modules.kotlin.functions.AsyncFunction$attachToJSObject$2$functionBody$1.invoke(AsyncFunction.kt:74)
                                                                                                    	at expo.modules.kotlin.functions.AsyncFunction$attachToJSObject$2$functionBody$1.invoke(AsyncFunction.kt:66)
                                                                                                    	at expo.modules.kotlin.functions.AsyncFunction$attachToJSObject$2$3.invokeSuspend(AsyncFunction.kt:104)
                                                                                                    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                                                                                    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:226)
                                                                                                    	at android.os.Looper.loop(Looper.java:313)
                                                                                                    	at android.os.HandlerThread.run(HandlerThread.java:67)
                                                                                                    	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [CoroutineName(expo.modules.AsyncFunctionQueue), StandaloneCoroutine{Cancelling}@6e2d82, Handler (android.os.Handler) {5532c93}]
2023-11-08 07:41:15.421  1157-2187  ActivityManager         pid-1157                             D  TMO sendAppStateMsg package=my.app pid=27221
2023-11-08 07:41:15.424  1157-2187  ActivityManager         pid-1157                             W  crash : my.app,11171
2023-11-08 07:41:15.427  1157-2187  ActivityTaskManager     pid-1157                             W    Force finishing activity my.app/my.app.MainActivity

Reproducible Demo

Environment

  • react-native-code-push version: 8.1.0
  • react-native version: 0.72.1
  • iOS/Android/Windows version: Android 12
  • Does this reproduce on a debug build or release build? All
  • Does this reproduce on a simulator, or only on a physical device? Physical Device

(The more info the faster we will be able to address it!)

@Neeal20
Copy link

Neeal20 commented Nov 16, 2023

Did you find a solution for this ? I'm having the exact same issue, and can't find a way to resolve it.

Thanks.

@jhonliima
Copy link

me too exact same issue only in android, Ios works fine.

@zgordon02
Copy link
Author

I ended up abandoning code push and I implemented Expo EAS Updates. If you have expo in your app it appears there is a conflict with codepush. I wish you the best of luck!

I'm closing this issue because iit's an exception from expo's side

@Neeal20
Copy link

Neeal20 commented Nov 27, 2023

#2618 I founded the solution of the crash for my application. If you want to have a check on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants