我创建了一个打包的应用程序。我已经正确设置了update_url
(我确认这是第一次更新)但是如果我更新应用程序(通过单击“立即更新扩展”按钮或通过chrome.runtime.requestUpdateCheck(..)
),连续两次,它不会更新第二次!当我通过 执行此操作chrome.runtime.requestUpdateCheck(..)
并检查状态时,它显示为"throttled"
!之后,即使我点击手动按钮,它也不会继续更新。
这使得开发非常麻烦。有谁知道如何解决这一问题?
要对此进行测试,请执行以下操作:
- 安装您的 chrome 应用程序(将“.crx”文件拖到 chrome://extensions 页面上
- 确保“manifest.json”有一个
update_url
集合并且指向一个包含更新信息的 XML 文件 - 将 manifest.json 中的“版本”更改为更高版本(例如“1.0.1”与“1.0.0”)
- 重新打包您的应用程序(并确保它在您的 Web 服务器上的正确位置可用)
- 点击“立即更新扩展”
- 等待 5-10 秒
- 重复步骤 3-5
第二次更新将无济于事。
编辑当我单击“立即更新扩展”按钮时,我已经从 chrome 的日志中添加了日志信息:
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