Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

images not always rendering after code-push update #259

Closed
gulullu opened this issue Jun 23, 2017 · 3 comments
Closed

images not always rendering after code-push update #259

gulullu opened this issue Jun 23, 2017 · 3 comments

Comments

@gulullu
Copy link

gulullu commented Jun 23, 2017

  • ionic version: 2.2.0
  • cordova version: 7.0.1
  • code-push version: code-push 1.9.0-beta "CodePushAcquisition"

Hi, I am using code-push for an ionic application. I noticed that sometimes some images are not rendering when an update package has download but app not restart. When restart it, then everything is fine.

This is my check update code:

    checkUpdate() {
        if (this.platform.is('ios') || this.platform.is('android')) {
            const downloadProgress = (progress) => {
                console.debug(`Downloaded ${progress.receivedBytes} of ${progress.totalBytes}`);
                if (!ConfigService.isProdEnv) {
                    if (progress.receivedBytes === progress.totalBytes) {
                        this.hudService.getAlert('更新成功', '新版本更新成功,请关闭应用并重新打开使用新版本.该提示只会在测试期间出现,请勿依赖。', [
                            {
                                text: '确定',
                                handler: () => {
                                }
                            }
                        ]).present();
                    }
                }
            }
            this.codePush.sync({}, downloadProgress).subscribe((syncStatus) => console.log(syncStatus));
        }
    }

Do you have any idea what could be the problem? I tried various things as a workaround but so far nothing helped.

Thanks a lot.

@max-mironov
Copy link
Contributor

Hello @gulullu, thank you for your question. Although I'm not sure that this is the same problem (and the issue was initially created for react app, not a cordova one) but anyway - do you have a chance to look for this thread to see if this could be useful for you.

@max-mironov
Copy link
Contributor

Hey @gulullu, do you have a chance to look at this?

@max-mironov
Copy link
Contributor

Closing this for now, please feel free to reopen when you get a chance t revisit it.

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

No branches or pull requests

2 participants