microsoft / react-native-code-push

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

[CodePush] Error in getting binary resources modified time #2116

Closed duduccosta closed 2 years ago

duduccosta commented 3 years ago

Environment

I'm using the manual codepush feature. When I use codepish.sync and debug the update status, i'm getting, in this order:

5 - CHECKING_FOR_UPDATE 7 - DOWNLOADING_PACKAGE 3 - UNKNOWN_ERROR

And codepush write a log as: [CodePush] Error in getting binary resources modified time. I've done everything correctly. I already done: 'apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"'

My App function export is:

export default codePush({
  checkFrequency: codePush.CheckFrequency.MANUAL,
})(App);

The JSON return from codePush.checkForUpdate() is:

{"appVersion": "1.9.7", "deploymentKey": "kfdrypCpPM2Fwrxxxxxxxxxxxxxxxxxxx", "description": undefined, "download": [Function download], "downloadUrl": "https://codepushupdates.azureedge.net/storagev2/o18eq876vfGurGa9Cvw-y9UyJ63c16557b36-3083-4e3a-beb9-e72966af037a", "failedInstall": false, "isMandatory": false, "isPending": false, "label": "v1", "packageHash": "87275c31db786998be820b006acaadfae9ddb6ced6d4f14bab734c397295643a", "packageSize": 2945614}

Need help, please.

adsalihac commented 3 years ago

same issue existing my project

olbesp commented 3 years ago

@duduccosta, @adsalihac have you already fixed your issues?

I had the same issue. In my case, the reason was that the AppCenter somehow cached the wrong (outdated) config. I changed CodePush deployment keys and reuse the same public/private .pem code signing keys for a different project.

Then I checked both platforms and the Android issue was exactly this one: [CodePush] Error in getting binary resources modified time

But I had a different issue on iOS: [CodePush] The operation couldn’t be completed. (OSStatus error -67808 - RSA signature verification failed, no match)

Then I regenerate my .pem signing keys (in my case it's the new project, so I don't care about supporting some versions with existing keys and code signing) and "Save" branch configuration one more time and build it.

Now everything is OK with code signing, deployment keys, and CodePush bundles.

hiunguyn commented 3 years ago

@duduccosta add this under android -> defaultConfig resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis()) the issue resolved, but I don't wanna use this I need another way :(

ghost commented 2 years ago

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.

0x0a0d commented 2 years ago

bump. same here

gax97 commented 2 years ago

Experiencing this issue as well.

mattwoberts commented 2 years ago

I'm also seeing this... For me it's working in IOS but I'm seeing the exact same issue in Android, and the same sequence of logs as originally reported

ghost commented 2 years ago

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 commented 2 years ago

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.

Cado21 commented 2 years ago

where's the discussion on this problem?

lelukas commented 2 years ago

I'm getting the same error. @hiunguyn workaround worked for me.

lelukas commented 2 years ago

By the way @hiunguyn, why didn't you want to use this anyway? Is there a downside or limitation this resValue introduces?

mateusdegobi commented 1 year ago

@duduccosta adicione isso em android -> defaultConfig resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis()) o problema resolvido, mas não quero usar isso , preciso de outra maneira :(

That's soluction by PR #1961. Between, this is worked for me. 🚀

I got the error by creating "another" application and used the same CodePush key in the "new" application. (They have the same src/)

Old app: RN 0.66.1 New app: RN 0.70.5 On both: react-native-code-push@^7.0.4

I use CodePush CLI and it's at v3.0.0.

chamaldesilva commented 1 year ago

@duduccosta add this under android -> defaultConfig resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis()) the issue resolved, but I don't wanna use this I need another way :(

Thank you so much @hiunguyn !

EdgarJMesquita commented 10 months ago

well i got the same error and solved by commiting the string resources