Closed SolidTears closed 1 month ago
Hello @Solid-Metal thank you for reaching out. Could you please share codepush logs from logcat for further investigation, also could you briefly share the repro steps for this issue?
Hello @Solid-Metal thank you for reaching out. Could you please share codepush logs from logcat for further investigation, also could you briefly share the repro steps for this issue?
here snippet of the logcat
09-05 16:29:13.101 7788 8006 D EGL_emulation: app_time_stats: avg=126.84ms min=2.20ms max=316.45ms count=9 09-05 16:29:13.279 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 24764416, totalBytes: 25069834 } 09-05 16:29:13.307 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 24821760, totalBytes: 25069834 } 09-05 16:29:13.492 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 24870912, totalBytes: 25069834 } 09-05 16:29:13.555 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 24887296, totalBytes: 25069834 } 09-05 16:29:13.742 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 24920064, totalBytes: 25069834 } 09-05 16:29:13.860 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 24952832, totalBytes: 25069834 } 09-05 16:29:13.959 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 25001984, totalBytes: 25069834 } 09-05 16:29:14.155 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 25010176, totalBytes: 25069834 } 09-05 16:29:14.189 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 25034752, totalBytes: 25069834 } 09-05 16:29:14.197 7788 8405 I ReactNativeJS: 'codepush progress', { receivedBytes: 25069834, totalBytes: 25069834 } 09-05 16:29:14.251 7788 8006 D EGL_emulation: app_time_stats: avg=120.13ms min=1.51ms max=332.44ms count=9 09-05 16:29:15.187 7788 8689 E ReactNative: [CodePush] Exception 09-05 16:29:15.187 7788 8689 E ReactNative: com.microsoft.codepush.react.CodePushInvalidUpdateException: Update is invalid - A JS bundle file named "index.android.bundle" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary. 09-05 16:29:15.187 7788 8689 E ReactNative: at com.microsoft.codepush.react.CodePushUpdateManager.downloadPackage(CodePushUpdateManager.java:255) 09-05 16:29:15.187 7788 8689 E ReactNative: at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:290) 09-05 16:29:15.187 7788 8689 E ReactNative: at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:284) 09-05 16:29:15.187 7788 8689 E ReactNative: at android.os.AsyncTask$3.call(AsyncTask.java:394) 09-05 16:29:15.187 7788 8689 E ReactNative: at java.util.concurrent.FutureTask.run(FutureTask.java:264) 09-05 16:29:15.187 7788 8689 E ReactNative: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) 09-05 16:29:15.187 7788 8689 E ReactNative: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) 09-05 16:29:15.187 7788 8689 E ReactNative: at java.lang.Thread.run(Thread.java:1012) 09-05 16:29:15.279 7788 8405 I ReactNativeJS: 'codepush status', 'An unknown error occurred.' 09-05 16:29:15.281 7788 8405 I ReactNativeJS: 'codepush progress', false 09-05 16:29:15.282 7788 8405 I ReactNativeJS: [CodePush] Update is invalid - A JS bundle file named "index.android.bundle" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary. 09-05 16:29:15.350 7788 8006 D EGL_emulation: app_time_stats: avg=535.06ms min=6.16ms max=1063.96ms count=2 09-05 16:29:19.309 7788 8405 I ReactNativeJNI: Memory warning (pressure level: TRIM_MEMORY_RUNNING_LOW) received by JS VM, ignoring because it's non-severe
ok...now that i deep dive into it again, its kinda strange, a little bit explanation, we hit 2 platform for our app, iOS and Android, with 2 different appcenter, and different API key for each ENV
i try to check the android appcenter and check on the codepush to make sure, and appereantly my colleague disabled it 2 days ago
when i look into the log again, codepush said
[CodePush] Reporting binary update (1.12.0-SIT) [CodePush] Report status failed: {"appVersion":"1.12.0-SIT"}
ok...then i check the metadata with
CodePush.getUpdateMetadata().then((metadata) =>{ console.log('CODEPUSH METADATA', metadata); });
but it return null, which means theres no update ?, but the app still downloaded a package, what package ?
heres the part of log at the beginning
LOG CODEPUSH METADATA null LOG codepush status Checking for update. LOG [CodePush] Reporting binary update (1.12.0-SIT) LOG [CodePush] Report status failed: {"appVersion":"1.12.0-SIT"} LOG codepush status Downloading package. LOG codepush progress {"receivedBytes": 15947, "totalBytes": 25069834} LOG codepush progress {"receivedBytes": 32331, "totalBytes": 25069834} LOG codepush progress {"receivedBytes": 81483, "totalBytes": 25069834} LOG codepush progress {"receivedBytes": 97867, "totalBytes": 25069834} LOG codepush progress {"receivedBytes": 114251, "totalBytes": 25069834} LOG codepush progress {"receivedBytes": 163403, "totalBytes": 25069834}
thank you in advance @DordeDimitrijev
so i try to download the bundle manually from codepush, and it has index.android.bundle in it, so...not sure whats wrong, heres the screenshot
[CodePush] Update is invalid - A JS bundle file named "index.android.bundle" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary.
Based on this message it might be related to your configuration of codepush .Can you please confirm that you've set it up according to this guideline
Closing due to inactivity.
Steps to Reproduce
Expected Behavior
update installed successfully
Actual Behavior
file successfully downloaded but can't be installed since codepush seems can't find the file, happened on emulator and real device, can't find any similar problem here, help !
"react-native": "0.70.10", "react-native-code-push": "7.1.0",