Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Android showing updateDialog even though there are no updates targeted for the current binary #984

@RuanFluid

Description

@RuanFluid

Good day,

I recently changed (in dev) my codepush settings as I am using redux-persist and need to be able to clear a users state on demand, thus enabling mandatory updates to be immediate and show the user a dialog. This all works fine on iOS. On android however, the dialog is consistently showing up on multiple devices.

If I had prepped/released a codepush version targeting the specific binary (in my case 3.0.0) the this would be fine, below please see prod and staging release history.

Can you please advise on what could be causing this? CodeSync code below:

Production Release History:
image

Staging Release History:
image

Expected Behavior

Not show the dialog on android

Actual Behavior

Show the updateDialog on android

codePush.sync({
            installMode: codePush.InstallMode.ON_NEXT_SUSPEND,
            mandatoryInstallMode: codePush.InstallMode.IMMEDIATE,
            updateDialog: {
                title: "An update is available!"
            },
        }, (status) => {
            switch (status) {
                case codePush.SyncStatus.CHECKING_FOR_UPDATE:
                    console.log("Checking for updates.");
                    break;
                case codePush.SyncStatus.DOWNLOADING_PACKAGE:
                    console.log("Downloading package.");
                    break;
                case codePush.SyncStatus.INSTALLING_UPDATE:
                    console.log("Installing update.");
                    break;
                case codePush.SyncStatus.UP_TO_DATE:
                    console.log("Up-to-date.");
                    break;
                case codePush.SyncStatus.UPDATE_INSTALLED: // Once package has been installed
                    // DO SOME MAGIC SHIT
                    
                    // Hide "downloading" modal
                    break;
            }
        }, ({ receivedBytes, totalBytes, }) => {
          /* Update download modal progress */
        });

Environment

  • "react-native-code-push": "^1.17.4-beta"
  • react-native version:
    • react-native-cli: 2.0.1
    • react-native: 0.42.3
  • Android version: Multiple devices and versions
  • Does this reproduce on a debug build or release build?
    So far only on Debug (Beta) versions
  • Does this reproduce on a simulator, or only on a physical device?
    Simulator and physical device

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions