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] Code push update, app shut down and rollback. #2148

Closed
dreamary-ydh opened this issue Sep 23, 2021 · 17 comments
Closed

[Android] Code push update, app shut down and rollback. #2148

dreamary-ydh opened this issue Sep 23, 2021 · 17 comments
Labels

Comments

@dreamary-ydh
Copy link

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

Steps to Reproduce

  1. Build apk and install it on physical device.
  2. Run code push. (no error.)
  3. Run the application.
  4. When application sync codepush, application crashes. (There is no any error log. just app shutdown and code-push rollbacks.)
  5. Even if restart app again, it has not been updated.
    +) This issue occurs ONLY android version 10. (version 8, 9 is no error.)

Below links are what we've tried, but they did not solve the issue.

Expected Behavior

What you expected to happen?

Code push update success.

Actual Behavior

What actually happens?

  No error logs were observed.

Reproducible Demo

  • Download https://github.com/microsoft/react-native-code-push/archive/master.zip and unzip. From Examples folder run node create-app.js appName react-native@0.61.5 react-native-code-push@6.0.0 command to generate plain CodePushified React Native app. Please see description on top of create-app.js file content if needed
  • If you can't reproduce the bug on it, provide us as much info as possible about your project

Environment

  • react-native-code-push version: 7.0.3
  • react-native version: 0.63.3
  • iOS/Android/Windows version: android 10
  • Does this reproduce on a debug build or release build? : release build
  • 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!)

@abiespinal04
Copy link

Same thing here, experiencing a similar issue.

react-native-code-push version: 7.0.2
react-native version: 0.65.1
iOS/Android/Windows version: android 10
Does this reproduce on a debug build or release build? : release build
Does this reproduce on a simulator, or only on a physical device? : physical device

@avishain
Copy link

Happens on android 11 as well

@stulip
Copy link

stulip commented Sep 26, 2021

After the update, the path file obtained by Image.resolveAssetSource does not exist, including images.

@daiquangduy
Copy link

same issue
react-native: 0.64.2
react-native-code-push: 7.0.0 || 7.0.1 || 7.0.2 || 7.0.3

@alexandergoncharov-zz
Copy link
Contributor

Hi there :)
We merged and published this PR: #2149

Could you please try to reproduce your issue with a new version and let us know if it was successful or not?

@dreamary-ydh
Copy link
Author

Hi there :) We merged and published this PR: #2149

Could you please try to reproduce your issue with a new version and let us know if it was successful or not?

Unfortunately, it still doesn't work.
Same as before...

@sunweiyang
Copy link

I'm also experiencing this issue (react-native-code-push 7.0.4, RN 0.66.0, Hermes enabled). This is the error I observe in logcat:

2021-10-12 22:02:35.211 2497-5134/? E/ReactNative: [CodePush] Exception
    com.microsoft.codepush.react.CodePushUnknownException: Error in getting binary resources modified time
        at com.microsoft.codepush.react.CodePush.getBinaryResourcesModifiedTime(CodePush.java:207)
        at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:289)
        at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:284)
        at android.os.AsyncTask$3.call(AsyncTask.java:394)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
        at android.content.res.Resources.getText(Resources.java:444)
        at android.content.res.Resources.getString(Resources.java:537)
        at com.microsoft.codepush.react.CodePush.getBinaryResourcesModifiedTime(CodePush.java:204)
        at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:289) 
        at com.microsoft.codepush.react.CodePushNativeModule$3.doInBackground(CodePushNativeModule.java:284) 
        at android.os.AsyncTask$3.call(AsyncTask.java:394) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:923) 

@gust42
Copy link

gust42 commented Oct 14, 2021

@sunweiyang You can add
resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
to defaultConfig in android/app/build.gradle to fix that issue

@ghost
Copy link

ghost commented Dec 13, 2021

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

@ghost
Copy link

ghost commented Dec 28, 2021

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

@ghost ghost closed this as completed Dec 28, 2021
@felipejh
Copy link

felipejh commented Sep 6, 2022

This #2148 (comment) didn't work for me

@harendrasaini01
Copy link

not work me also

@harendrasaini01
Copy link

I have used but not work for me.

my sdks..

"react": "18.1.0",
"react-native": "0.70.6",
"react-native-code-push": "^7.0.5",

@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

1 similar comment
@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

@microsoft-github-policy-service
Copy link
Contributor

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

@microsoft-github-policy-service
Copy link
Contributor

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

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

No branches or pull requests