You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] Update with InstallMode.IMMEDIATE not applied until manual app restart #31
on update it doesnot reflect the change code in the immediate boot, if i rebooot it manually it works, this issue is seen only in android
Environment
@code-push-next/react-native-code-push version: 1.2.0
Android issue gets fixed when we use another package like react native restart, to force restart after update, codepush.restart() doesnt restart the android app
I can confirm that even with 10.3.0 version this issue is not resolved on react native 0.80.2.
here is the patch that i applied on CodePushNativeModule.java.
replace getReactHostDelegate method at bottom of the file with below
public ReactHostDelegate getReactHostDelegate(ReactHostImpl reactHostImpl) {
Class<?> currentClass = reactHostImpl.getClass();
// Traverse up the class hierarchy in case it's defined in a parent class
while (currentClass != null) {
// Get ALL fields in this class (public, private, protected)
Field[] fields = currentClass.getDeclaredFields();
for (Field field : fields) {
try {
field.setAccessible(true);
Object value = field.get(reactHostImpl);
// Check if this field holds the object we are looking for
if (value instanceof ReactHostDelegate) {
return (ReactHostDelegate) value;
}
} catch (Exception e) {
// Ignore access errors and keep looking
}
}
// Move to the parent class
currentClass = currentClass.getSuperclass();
}
CodePushUtils.log("Reflection failed: Could not find any field of type ReactHostDelegate in ReactHostImpl.");
return null;
}
Activity
Abhishek-Appstn commentedon Sep 24, 2025
Android issue gets fixed when we use another package like react native restart, to force restart after update, codepush.restart() doesnt restart the android app
CHOIMINSEOK commentedon Oct 26, 2025
Hi @Abhishek-Appstn sorry for late response
We are working on adding support for rn 0.81, 0.82 :
#32
#33
It will be fixed on next version!
CHOIMINSEOK commentedon Nov 1, 2025
resolved at 10.3.0
codeRa1n commentedon Dec 8, 2025
I can confirm that even with 10.3.0 version this issue is not resolved on react native 0.80.2.
here is the patch that i applied on CodePushNativeModule.java.
replace getReactHostDelegate method at bottom of the file with below
public ReactHostDelegate getReactHostDelegate(ReactHostImpl reactHostImpl) {
Class<?> currentClass = reactHostImpl.getClass();