Extension autoupdates and restarts even though it is active
Reported by
jetrico...@gmail.com,
Jan 19 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Steps to reproduce the problem: 1. Open a page from the extension 2. Update the extension through developer dashboard 3. Wait for chrome to download the update and auto-restart the extension, automatically closing the extension pages What is the expected behavior? The extension should not restart automatically when an update is available, if the background script is persistent, or the extension has an active open tab (chrome-extensions://) What went wrong? As it says in the documentation, active extensions (those with persistent background scripts) do not automatically restart when there is an update available. However this is not the case as we have observed in our extension (attached link). Our users are complaining that the extension restarts even though there are pages open (chrome-extension://) and the background page is active. We know that the background page is active because we even explicitly added "persistent: true" to our manifest.json. We're also sure that the background script is active since we even added a setInterval on it just to be sure. But after all that, extension still restarted automatically, even happened to me. To make things worse, an extension restart / closing of extension tabs now doesn't recognize window.onbeforeunload which previously dealth with this situation. Original doc: https://developer.chrome.com/extensions/runtime#event-onUpdateAvailable WebStore page: https://chrome.google.com/webstore/detail/kancolle-command-center-%E6%94%B9/hkgmldnainaglpjngpajnnjfhpdjkohh Did this work before? No Chrome version: 55.0.2883.87 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 24.0 r0
,
Jan 24 2017
jetriconew@ in order to triage this issue could you please help us with the screen-cast for this issue, so that we can reproduce the scenario on our end. Thank You...
,
Feb 13 2017
sorry for late reply. I recently added onUpdateAvailable listener and the auto-restart have stopped. However, the documentation is still wrong, as it says: "If your extension is using a persistent background page, the background page of course never gets unloaded, so unless you call chrome.runtime.reload() manually in response to this event the update will not get installed until the next time chrome itself restarts." (referring to the doc link in the main post) This is not true, as having a persistent background page will not stop the extension auto-restarting. The extension *needs* an onUpdateAvailable listener, even if it's an empty function just so it will not auto-restart. See pull request on our repository at github for the fix: https://github.com/KC3Kai/KC3Kai/pull/1748
,
Feb 20 2017
Thank you for providing more feedback. Adding requester "kkaluri@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 13 2017
Cleaning up "Needs-Review" label as we are not using this label for triage. Ref bug 684919
,
Mar 13 2017
,
Mar 15 2018
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ajha@chromium.org
, Jan 23 2017