react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

An unknown error occurred on checking for update

Open alisn72 opened this issue 7 years ago • 12 comments

Hi I'm trying to update my android application but i get this:

[06:20:26] Network request failed [06:20:26] Report status failed: {"appVersion":"1.2"} [06:20:26] Reporting binary update (1.2) [06:20:26] Report status failed: {"appVersion":"1.2"} [06:20:39] Loading JS bundle from "assets://index.android.bundle" [06:20:40] Checking for update. [06:20:40] Reporting binary update (1.2) [06:20:42] Report status failed: {"appVersion":"1.2"} [06:20:42] An unknown error occurred. [06:20:42] Network request failed

i have correct access to https://codepush.azurewebsites.net , https://codepush.blob.core.windows.net and https://codepushupdates.azureedge.net . i used code-push deployment ls MY-APP -k and put Staging Deployment Key to my android buid.gradle file. also i used code-push release-react MY-APP android --deploymentName Staging to release app bundle. here is my project configuration:

"react-native": "^0.55.4", "react-native-code-push": "^5.5.2", "code-push-cli": "2.1.9",

Any help will be appreciated.

alisn72 avatar Feb 02 '19 15:02 alisn72

Hi @alisn72, Thanks for reporting!

Yeah, it is looks like internet request issue. Could you please check that app has all necessary permissions? If it was not helpful could you please provide dummy project with reproducing issue and reprosteps?

alexandergoncharov-zz avatar Feb 05 '19 06:02 alexandergoncharov-zz

@alexandergoncharov Thanx for your reply. I was checked everything and finally, i turned my laptop off! it workes correctly after two days without any changes! maybe my problem caused by any server downtime or anything like this. anyway, Thanks for your great and useful library :-)

alisn72 avatar Feb 06 '19 08:02 alisn72

@alisn72, That's great! Thanks for keeping us in touch and feel free to ping us on any issues!

alexandergoncharov-zz avatar Feb 06 '19 14:02 alexandergoncharov-zz

I'm having a similar issue, not sure what I did wrong but codepush doesn't work, it just logs this:

I/ReactNativeJS: [CodePush] Checking for update.
I/ReactNativeJS: [CodePush] Reporting binary update (1.0)
I/ReactNativeJS: [CodePush] An unknown error occurred.
I/ReactNativeJS: [CodePush] 404: {}
I/ReactNativeJS: [CodePush] Report status failed: {"appVersion":"1.0"}

Which doesn't really help

Grohden avatar May 17 '19 18:05 Grohden

Hello, someone have found a solution? Thanks.

vdesdoigts avatar May 23 '19 16:05 vdesdoigts

Experiencing similar intermittent issues which also seem to interfere with axios requests causing timeouts.

marioot avatar Jul 11 '19 08:07 marioot

I just installed code-push , and i see the same log as @Grohden Any update on this? RN : 0.59.9 RNCP : 5.6.1

billel-boudchicha avatar Jul 20 '19 14:07 billel-boudchicha

@billel-boudchicha double check your keys, if I remember correctly I used the wrong keys on my project...

I might be wrong, but there are two keys to use in the project and I was using only one..

Grohden avatar Jul 20 '19 14:07 Grohden

thank you @Grohden , yes it was the keys

billel-boudchicha avatar Jul 23 '19 14:07 billel-boudchicha

could you please tell where to use both keys as I used "react-native link" . command for codepush.

prataprish007 avatar Nov 07 '19 10:11 prataprish007

i have this problem when i want to add public key and public key for code sign feature , regular code pushify works just fine

 "react": "16.8.3",
 "react-native": "0.59.10",
 "react-native-code-push": "^5.7.0",

i am sure that i pass public key to CodePush constructor in last parameter and placed correct public key in res/strings.xml releasing updates with appcenter codepush release-react -a xxx/xxx_android_test -d Staging -k private.pem

update :

with change in BuildConfig.DEBUG,getResources().getString(R.string.CodePushPublicKey) to BuildConfig.DEBUG,R.string.CodePushPublicKey in new CodePush and copy pasting public.pem in res/strings.xml without indentation worked.

h2soheili avatar Jan 14 '20 12:01 h2soheili

This has happened to me as well because I was using app secret as a deployment key.

App secret and a deployment key are different.

deployment key you can get by the following command

appcenter codepush deployment list --app Owner/Appname -k

│ Name │ Key │ ├────────────┼───────────────────────────────────────┤ │ Production │ I6rJbnQdfdfdfdfdDgjJ0zqrAn6rNE7Q0JTF │ ├────────────┼───────────────────────────────────────┤ │ Staging │ kbwhyeLlEhR4XRxXjFOi_h5lBNXuiRtdffdf │ └────────────┴───────────────────────────────────────┘

appcenter codepush release-react -a Owner/Appname -d Production or Staging

whatever key you have used

rajscet avatar Aug 17 '22 04:08 rajscet