0

我正在开发一个使用选项卡 API、长期连接和 HTML5 indexedDB 的扩展。扩展随机崩溃(或者至少我无法重现崩溃场景)。我看了一下chrome日志:

[22654:-1322192896:0118/184514:VERBOSE1:ipc_sync_channel.cc(382)] Canceling pending sends
[22649:-1398687192:0118/184514:VERBOSE1:speech_input_extension_manager.cc(228)] Extension unloaded. Requesting to enforce stop...
[22654:-1398687192:0118/184514:VERBOSE1:ipc_sync_channel.cc(382)] Canceling pending sends
[22654:-1322192896:0118/184514:VERBOSE1:ipc_sync_channel.cc(382)] Canceling pending sends
[22808:-1398687192:0118/184514:VERBOSE1:chrome_v8_context.cc(125)] Could not execute chrome hidden method: Port.dispatchOnDisconnect
[22808:-1398687192:0118/184514:VERBOSE1:chrome_v8_context.cc(125)] Could not execute chrome hidden method: Port.dispatchOnDisconnect
[22808:-1398687192:0118/184514:VERBOSE1:chrome_v8_context.cc(125)] Could not execute chrome hidden method: Port.dispatchOnDisconnect
[22808:-1398687192:0118/184514:VERBOSE1:chrome_v8_context.cc(125)] Could not execute chrome hidden method: Port.dispatchOnDisconnect
[22808:-1398687192:0118/184514:VERBOSE1:chrome_v8_context.cc(125)] Could not execute chrome hidden method: Port.dispatchOnDisconnect
[22808:-1398687192:0118/184514:VERBOSE1:chrome_v8_context.cc(125)] Could not execute chrome hidden method: Port.dispatchOnDisconnect
[22649:-1398687192:0118/184514:VERBOSE1:notification_ui_manager_impl.cc(83)] Added notification. URL: data:text/html;charset=utf-8,%3C!DOCTYPE%20html%3E%0A%3Chtml%3E%0A%3Chead%3E%0A%20%20%3Ctitle%3E%3C%2Ftitle%3E%0A%20%20%3Cstyle%3E%0A%20%20body%20%7B%0A%20%20%20%20direction%3A%20ltr%3B%0A%20%20%7D%0A%20%20%23icon%20%7B%0A%20%20%20%20height%3A%2032px%3B%0A%20%20%20%20width%3A%2032px%3B%0A%20%20%20%20float%3A%20left%3B%0A%20%20%7D%0A%20%20%23title%20%7B%0A%20%20%20%20margin-left%3A%2038px%3B%0A%20%20%20%20font-weight%3A%20bold%3B%0A%20%20%20%20font-size%3A%2013px%3B%0A%20%20%20%20font-family%3A%20helvetica%2C%20arial%2C%20sans-serif%3B%0A%20%20%7D%0A%20%20%23description%20%7B%0A%20%20%20%20margin-left%3A%2038px%3B%0A%20%20%20%20font-family%3A%20helvetica%2C%20arial%2C%20sans-serif%3B%0A%20%20%20%20font-size%3A%2013px%3B%0A%20%20%7D%0A%20%20%3C%2Fstyle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%20%20%3Cdiv%20id%3D%22icon%22%3E%3Cimg%20src%3D%22chrome-extension%3A%2F%2Fegoecnhkgdfeofmdmjgopmdjbaknldjf%2Fres%2Ficon_48x48.png%22%20width%3D%2232%22%20height%3D%2232%22%3E%3C%2Fdiv%3E%0A%20%20%3Cdiv%20id%3D%22title%22%3E%3C%2Fdiv%3E%0A%20%20%3Cdiv%20id%3D%22description%22%3EHelloWorld%20ist%20abgest%C3%BCrzt.%20Klicken%20Sie%20auf%20dieses%20Fenster%2C%20um%20die%20Erweiterung%20erneut%20zu%20laden.%3C%2Fdiv%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A

我激活了最健谈的详细模式,但对我来说导致崩溃的原因没有意义。有什么建议么?

4

2 回答 2

0

您应该向 Chromium 项目http://code.google.com/p/chromium/issues/list提交票证,Google 将在几天内回复您。

于 2013-12-05T21:53:11.833 回答
0

我有一个类似的问题,花了我一整天的时间来解决,我认为它可能适用。如果我只是打开它,我的弹出扩展程序将运行而不会崩溃,但是如果我在开发人员模式下打开扩展程序(即右键单击->“检查弹出窗口”),下次我尝试打开它时会崩溃。

这似乎是 Chrome 的新设备模式功能的问题。要解决此问题,我必须在新选项卡中打开我的 popup.html 文件,并确保设备模式已关闭。然后,当我在开发人员模式下打开我的扩展程序时,它就不会再崩溃了。

要关闭设备模式:

  • 在新选项卡中打开您的 html 文件
  • 进入开发者模式(查看 -> 开发者 -> Javascript 控制台)
  • 确保设备模式已关闭(通过单击放大镜旁边的手机小图像来切换设备模式)

希望这对你们中的一个人有所帮助。

于 2015-05-10T13:46:55.280 回答