I have an android/ios app which was working exceptional with Codepush.
But since the last deploy it's not installing nothing in production.
Whit this I mean that code-push deployment ls my-app is returning the table with all the data ok but the install metrics are always: No install recorded
When I tried in debug simulator mode I actually make one install. So the table changes to: Active: [...] Total: 1
It works in debug mode (simulators and so on)
It has the mandatory flag set on
It worked in the past
The code version matches both for codepush and native bundle. It's 6.2
The only native-land thing that we change is the Facebook SDK installation. Tho, we review 3 times the codepush installation guide and eveything seems to be ok (it's working on debug mode after all).
It looks like codepush is not being initialized when in production mode.
I don't know what else can I do?
Is there something else I can check?
Hi @sospedra and thanks for asking.
Just to clarify:
1) Your app worked perfectly with code-push before (so this means that code-push is initialized correctly)
2) You have updated Facebook SDK, increment the app version to 6.2, released this to AppStore
3) After that you have released new code-push update without any issues
4) Code-push is unable to detect new updates now when running in release-mode on device?
BTW you know that in general you should not test code-push updates in debug mode (or probably some kind of tweaks needed to force react-native bundle js/assets explicitly).
Have you tried it in release mode? Do you still see this behavior?
Also can you verify what is the code-push status of the update using syncStatusChangeCallback callback?
Is SyncStatus equal to UpToDate value or is it different?
@sospedra - just a friendly ping on this.
Thanks for the quick reply and sorry for the delay; these past days were national holidays in Spain and I was out of town.
The steps you clarified are absolutely correct ;)
With trying in release mode you mean react-native run-android --variant=release (and equivalent for ios: react-native run-ios --configuration Release)?
Using syncStatusChangeCallback gives me an all-good value. Everything is up to date. Tho, as I tried to explain, it's always up-to-date in react-native development environment (where I can see the logs).
@sospedra - thanks for update!
So it looks like you should run react-native run-ios --configuration Release as it is described in docs here.
Can you please provide us with the output of the code-push deployment history <appName> <deploymentName> command for your app and also what is the CFBundleShortVersionString value for your app in info.plist file?
Deployment history
```json
[
{
"appVersion": "5.0",
"blobUrl": "https://codepush.blob.core.windows.net/storagev2/b4fQ81DoErUnDMmwIbxgpEV4k6GQ85521bdf-b210-4d1c-8c5e-492d7df9723c",
"description": "",
"isDisabled": false,
"isMandatory": false,
"manifestBlobUrl": "https://codepush.blob.core.windows.net/storagev2/NlQKqslUiknvtdoSHWKDhnHDopLX85521bdf-b210-4d1c-8c5e-492d7df9723c",
"packageHash": "e510688212b10117ff669ae5cb0f9cc4aa7c7f79cf991c139a73049e888321da",
"rollout": null,
"size": 4710374,
"uploadTime": 1496928730036,
"releaseMethod": "Promote",
"originalLabel": "v1",
"originalDeployment": "Staging",
"label": "v1",
"releasedBy": "sospedra.[email protected]",
"metrics": {
"active": 4,
"downloaded": 66,
"failed": 0,
"installed": 48,
"totalActive": 2559
}
},
{
"appVersion": "5.0",
"blobUrl": "https://codepush.blob.core.windows.net/storagev2/C1J0sdE5DtmRG0tMzNp4bfgznInj85521bdf-b210-4d1c-8c5e-492d7df9723c",
"description": "",
"isDisabled": false,
"isMandatory": false,
"manifestBlobUrl": "https://codepush.blob.core.windows.net/storagev2/gOmxCRGUITGkbFcUnckmaIL1oye685521bdf-b210-4d1c-8c5e-492d7df9723c",
"packageHash": "09c9e5a57e241dafb281574ce63c5f7e1e46a93799628632f82d37429c5eb0ab",
"rollout": null,
"size": 4711045,
"uploadTime": 1496991726017,
"releaseMethod": "Promote",
"originalLabel": "v2",
"originalDeployment": "Staging",
"label": "v2",
"releasedBy": "sospedra.[email protected]",
"metrics": {
"active": 104,
"downloaded": 425,
"failed": 0,
"installed": 309,
"totalActive": 2559
}
},
{
"appVersion": "5.0",
"blobUrl": "https://codepush.blob.core.windows.net/storagev2/JSW9MN6ZphAgd_2Ub0f-M0JsfPbV85521bdf-b210-4d1c-8c5e-492d7df9723c",
"description": "",
"isDisabled": false,
"isMandatory": false,
"manifestBlobUrl": "https://codepush.blob.core.windows.net/storagev2/2o3UoiiPTNN2jTy4g15BqjBf5HjE85521bdf-b210-4d1c-8c5e-492d7df9723c",
"packageHash": "353e68142bea666dd54f4a7548731bce969aec287afe32b319122c07c1483b44",
"rollout": null,
"size": 4713215,
"uploadTime": 1497543733801,
"releaseMethod": "Promote",
"originalLabel": "v3",
"originalDeployment": "Staging",
"label": "v3",
"releasedBy": "sospedra.[email protected]",
"metrics": {
"active": 270,
"downloaded": 924,
"failed": 1,
"installed": 582,
"totalActive": 2559
}
},
{
"appVersion": "5.0",
"blobUrl": "https://codepush.blob.core.windows.net/storagev2/JMVpVs9VJMBdOqJaE-1beFDTIpqQ85521bdf-b210-4d1c-8c5e-492d7df9723c",
"description": "",
"isDisabled": false,
"isMandatory": false,
"manifestBlobUrl": "https://codepush.blob.core.windows.net/storagev2/L7wpQDqDg1MY-9KHRrDXNoh_hZMh85521bdf-b210-4d1c-8c5e-492d7df9723c",
"packageHash": "a8da2a639c81f9aa460901c54f70915c5b5a1b5535a0a87b62364a8a57a2ecdb",
"rollout": null,
"size": 4715130,
"uploadTime": 1499098771636,
"releaseMethod": "Promote",
"originalLabel": "v4",
"originalDeployment": "Staging",
"label": "v4",
"releasedBy": "sospedra.[email protected]",
"diffPackageMap": {
"e510688212b10117ff669ae5cb0f9cc4aa7c7f79cf991c139a73049e888321da": {
"size": 580976,
"url": "https://codepush.blob.core.windows.net/storagev2/gNjkaLSrNgMatQ0RtpLXMiMHhoPg85521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"09c9e5a57e241dafb281574ce63c5f7e1e46a93799628632f82d37429c5eb0ab": {
"size": 580976,
"url": "https://codepush.blob.core.windows.net/storagev2/jcQnCyF_hngy6jhjZAmKEWPfUiGr85521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"353e68142bea666dd54f4a7548731bce969aec287afe32b319122c07c1483b44": {
"size": 580976,
"url": "https://codepush.blob.core.windows.net/storagev2/VystaZusrDoYupd_EcYeTECl6joD85521bdf-b210-4d1c-8c5e-492d7df9723c"
}
},
"metrics": {
"active": 287,
"downloaded": 895,
"failed": 1,
"installed": 527,
"totalActive": 2559
}
},
{
"appVersion": "5.0",
"blobUrl": "https://codepush.blob.core.windows.net/storagev2/UibBNxyF0BrOti3SceP2srZla40m85521bdf-b210-4d1c-8c5e-492d7df9723c",
"description": "",
"isDisabled": false,
"isMandatory": false,
"manifestBlobUrl": "https://codepush.blob.core.windows.net/storagev2/VoPA_KwPw7TtON1crvKXZWtPKIce85521bdf-b210-4d1c-8c5e-492d7df9723c",
"packageHash": "cec75d2a8f768003197a2a283b94d5cf1fb1547eea17b0dd4c7727ff0586fdfd",
"rollout": null,
"size": 4717295,
"uploadTime": 1500568132869,
"releaseMethod": "Promote",
"originalLabel": "v5",
"originalDeployment": "Staging",
"label": "v5",
"releasedBy": "sospedra.[email protected]",
"diffPackageMap": {
"e510688212b10117ff669ae5cb0f9cc4aa7c7f79cf991c139a73049e888321da": {
"size": 583141,
"url": "https://codepush.blob.core.windows.net/storagev2/NnwG86bJb-BLivk_QBsxcSs-1OnK85521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"09c9e5a57e241dafb281574ce63c5f7e1e46a93799628632f82d37429c5eb0ab": {
"size": 583141,
"url": "https://codepush.blob.core.windows.net/storagev2/u3Z2lDtuS8AkUbTNZEkzbbz9fvuL85521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"353e68142bea666dd54f4a7548731bce969aec287afe32b319122c07c1483b44": {
"size": 583141,
"url": "https://codepush.blob.core.windows.net/storagev2/k-mowKAkWhFuO05X3oaHCDSGk4Q985521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"a8da2a639c81f9aa460901c54f70915c5b5a1b5535a0a87b62364a8a57a2ecdb": {
"size": 583141,
"url": "https://codepush.blob.core.windows.net/storagev2/3pgF0Sc7c04e9a04G4PZIKxNKaR485521bdf-b210-4d1c-8c5e-492d7df9723c"
}
},
"metrics": {
"active": 1,
"downloaded": 6,
"failed": 1,
"installed": 4,
"totalActive": 2559
}
},
{
"appVersion": "5.0",
"blobUrl": "https://codepush.blob.core.windows.net/storagev2/x4H8eV8dyboQoJRdMS2DzmLRceVm85521bdf-b210-4d1c-8c5e-492d7df9723c",
"description": "",
"isDisabled": false,
"isMandatory": false,
"manifestBlobUrl": "https://codepush.blob.core.windows.net/storagev2/h_jOyNQ4nnRciEmw8iLgrw6CbU5585521bdf-b210-4d1c-8c5e-492d7df9723c",
"packageHash": "b1e31b6db49504a78eed3293225c9a2b9f2f0c534b14fae372ee9004b84cd1b9",
"rollout": null,
"size": 4717490,
"uploadTime": 1500571155377,
"releaseMethod": "Promote",
"originalLabel": "v6",
"originalDeployment": "Staging",
"label": "v6",
"releasedBy": "sospedra.[email protected]",
"diffPackageMap": {
"e510688212b10117ff669ae5cb0f9cc4aa7c7f79cf991c139a73049e888321da": {
"size": 583336,
"url": "https://codepush.blob.core.windows.net/storagev2/YXUtoYJeeHROA4iJRofwqMkYt7Kh85521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"09c9e5a57e241dafb281574ce63c5f7e1e46a93799628632f82d37429c5eb0ab": {
"size": 583336,
"url": "https://codepush.blob.core.windows.net/storagev2/HLYFKelivsieIS9uWrCrJfrhKld185521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"353e68142bea666dd54f4a7548731bce969aec287afe32b319122c07c1483b44": {
"size": 583336,
"url": "https://codepush.blob.core.windows.net/storagev2/uRtCOAKriB54HTzbvsrzcvnmNJte85521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"a8da2a639c81f9aa460901c54f70915c5b5a1b5535a0a87b62364a8a57a2ecdb": {
"size": 583336,
"url": "https://codepush.blob.core.windows.net/storagev2/H3o900rT2bgtHD3gfyrWHEn5J9sv85521bdf-b210-4d1c-8c5e-492d7df9723c"
},
"cec75d2a8f768003197a2a283b94d5cf1fb1547eea17b0dd4c7727ff0586fdfd": {
"size": 583336,
"url": "https://codepush.blob.core.windows.net/storagev2/7PIHQ0swfnZW7tswVcISbb3DVld285521bdf-b210-4d1c-8c5e-492d7df9723c"
}
},
"metrics": {
"active": 246,
"downloaded": 788,
"failed": 1,
"installed": 366,
"totalActive": 2559
}
},
{
"appVersion": "6.2",
"blobUrl": "https://codepush.blob.core.windows.net/storagev2/k2CQMkSiLKxf2tiKS0Ijb5smKLTH85521bdf-b210-4d1c-8c5e-492d7df9723c",
"description": "",
"isDisabled": false,
"isMandatory": true,
"manifestBlobUrl": "https://codepush.blob.core.windows.net/storagev2/3h_hn0lnsmxADH7bOr6G-ZlCyJ7D85521bdf-b210-4d1c-8c5e-492d7df9723c",
"packageHash": "944f455683007c7e9ee2c0947116dab43c537e14d7acb00590be1497586de370",
"rollout": 100,
"size": 4769763,
"uploadTime": 1501608019170,
"releaseMethod": "Promote",
"originalLabel": "v7",
"originalDeployment": "Staging",
"label": "v7",
"releasedBy": "sospedra.[email protected]",
"metrics": {
"active": 1,
"downloaded": 1,
"failed": 0,
"installed": 1,
"totalActive": 2559
}
}
]
</details>
<br/>
You'll see that the last one `6.2` has one active and installed. It's the one I test on development mode. But it's not triggering from production/release as stated before.
<br/>
And the short version string is:
```xml
<key>CFBundleShortVersionString</key>
<string>6.2</string>
If I'm not wrong, versions match.
@sospedra
Well, that looks weird. You know that without any debug output from your side its really hard to say whats going wrong here (especially taken into account that it is working in simulator). As I can see at that moment that we do not get any complaints yet of such kind, so seems that your app is the only one.
Things that can probably help:
1) Why don't you release one more code-push update and see if it doesn't work also? (as I can see from deployment history you have tried only once)
2) If it doesn't help is it possible to bump AppVersion to see if the problem constantly occurs with different target binary versions?
3) Probably you can try to reinstall code-push plugin from the scratch (rm -rf node_modules && npm i)
3) If it is possible you can try to update react-native and react-native-code-push plugin to the latest versions and verify if it helps
In general we require additional information from your side to identify whats going wrong (as we assume that code-push init logic is good so far we need some kind of logging here to see what requests code-push sends to the service).
If you were able to reproduce it in Release mode on your side than probably you could add some output logging and provide us with it.
The main point of interest for us here at that moment is what is the result of theupdate variable in this method:
const update = await sdk.queryUpdateWithCurrentPackage(queryPackage)
and what is the value of queryPackage variable.
I'm looking forward for your reply to get out what is the reason of the issue.
I've also looked for service logs related to your requests and saw that it didn't return any relevant update data. So is it possible for you to release new code-push update for your app and see the result?
So my guess here - is it possible that your currently running binary version package hash is identical to the released code-push update package hash? Thus service states that there is no updates available at that moment. To verify this assumption we should release new code-push update with modified hash.
Hey @sospedra, do you have a chance to look at the information from above?
I'm currently changing both the React Native version (for other reasons) and code-push (bumping to latest). I then will push a new version into the markets. With its own code-push version.
I expect to invest one week with this. I'll keep you posted 100% ;)
@sospedra - thanks for quick turnaround. Looking forward for the results :)
@sospedra - hi! No pressure from our side but if you get a chance to look at this - please let us know.
Hi @sospedra, thanks for reaching us. Do you have any updates on this? I'm closing this for now, please feel free to reopen if you have a chance to return to this issue again.
Follow up. Nothing that we tried worked. We're finishing a new release; as we commented in this thread it looks like the last chance to fix the issue. It'll published next week. We'll keep you in touch. I'll reopen when I've got any change on the status or new data.
@sospedra, got it, thank you.
Hello again @max-mironov @sergey-akhalkov
We released on Friday the new application. As I told you we're doing.
So far, looks like everything works as expected now.
With our our last tests we saw some weird things. Like codepush triggering a rollback when everything was ok (in theory). Hence, our conclusion is that, somehow, the previous codepush bundle became corrupted at some point.
With the new market release and a new codepush bundle everything works fine.
We can leave the issue closed then.
Much appreciated for all the help ;)
Most helpful comment
Hello again @max-mironov @sergey-akhalkov
We released on Friday the new application. As I told you we're doing.
So far, looks like everything works as expected now.
With our our last tests we saw some weird things. Like codepush triggering a rollback when everything was ok (in theory). Hence, our conclusion is that, somehow, the previous codepush bundle became corrupted at some point.
With the new market release and a new codepush bundle everything works fine.
We can leave the issue closed then.
Much appreciated for all the help ;)