Why does Chrome stop updating chrome app? (log fil

2019-09-04 04:54发布

问题:

I've created a packaged app. I've properly set the update_url (I confirmed this as the first time it updates) but if I update the app (either via clicking the button "update extensions now" or via chrome.runtime.requestUpdateCheck(..)), twice in a row, it does not update the second time! When I do it via chrome.runtime.requestUpdateCheck(..), and check the status, it shows as "throttled"! After that, even if I click the manual button, it will not continue to update.

This is making development very cumbersome. Does anyone know how to fix this?

To test this, do the following:

  1. Install your chrome app (drag the ".crx" file onto chrome://extensions page
  2. Make sure "manifest.json" has an update_url set and that points to an XML file with the update info
  3. Change the "version" in manifest.json to be one higher (e.g. "1.0.1" vs "1.0.0")
  4. Repackage your app (and make sure it's available in the right spot on your web server)
  5. Click "update extensions now"
  6. Wait 5-10 seconds
  7. Repeat steps 3-5

That second update will do nothing.

EDIT I've added the log info from chrome's log when I click the "update extensions now" button:

chrome_debug.log

[VERBOSE1:transport_dib_linux.cc(50)] Created SysV shared memory region 83246577
[VERBOSE1:x11_util.cc(1126)] X attached to shared memory segment 83246577
[VERBOSE1:transport_dib_linux.cc(50)] Created SysV shared memory region 83279377
[VERBOSE1:x11_util.cc(1126)] X attached to shared memory segment 83279377
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:sandbox_linux.cc(148)] Lacking support for seccomp-bpf sandbox.
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:database_manager.cc(991)] SafeBrowsingCheckDone
[VERBOSE1:speech_input_extension_manager.cc(152)] Extension unloaded. Requesting to enforce stop...
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:transport_dib_linux.cc(50)] Created SysV shared memory region 83312150
[VERBOSE1:x11_util.cc(1126)] X attached to shared memory segment 83312150
[VERBOSE1:resource_loader.cc(336)] OnResponseStarted: chrome-extension://dnpkphihgmicdfligbpcleigpmcbclbp/_generated_background_page.html
[VERBOSE1:resource_loader.cc(376)] OnReadCompleted: "chrome-extension://dnpkphihgmicdfligbpcleigpmcbclbp/_generated_background_page.html" bytes_read = 55
[VERBOSE1:resource_loader.cc(376)] OnReadCompleted: "chrome-extension://dnpkphihgmicdfligbpcleigpmcbclbp/_generated_background_page.html" bytes_read = 0
[VERBOSE1:resource_loader.cc(627)] ResponseCompleted: chrome-extension://dnpkphihgmicdfligbpcleigpmcbclbp/_generated_background_page.html
[VERBOSE1:chrome_v8_context.cc(43)] Created context:
  extension id: dnpkphihgmicdfligbpcleigpmcbclbp
  frame:        0x7f151d5f7600
  context type: BLESSED_EXTENSION
[VERBOSE1:dispatcher.cc(839)] Num tracked contexts: 1
[VERBOSE1:resource_loader.cc(336)] OnResponseStarted: chrome-extension://dnpkphihgmicdfligbpcleigpmcbclbp/main.js
[VERBOSE1:resource_loader.cc(376)] OnReadCompleted: "chrome-extension://dnpkphihgmicdfligbpcleigpmcbclbp/main.js" bytes_read = 3153
[VERBOSE1:resource_loader.cc(376)] OnReadCompleted: "chrome-extension://dnpkphihgmicdfligbpcleigpmcbclbp/main.js" bytes_read = 0
[VERBOSE1:resource_loader.cc(627)] ResponseCompleted: chrome-extension://dnpkphihgmicdfligbpcleigpmcbclbp/main.js
[VERBOSE1:dispatcher.cc(873)] Num tracked contexts: 0
[VERBOSE1:ipc_sync_channel.cc(385)] Canceling pending sends
[VERBOSE1:transport_dib_linux.cc(50)] Created SysV shared memory region 84475990
[VERBOSE1:x11_util.cc(1126)] X attached to shared memory segment 84475990