google chrome extension - Reason for Uncaught Error: Attempting to use a disconnected port object -


While retrieving the request from the content script, I get this error in the background page. Does anyone know that this error What can be the reason?

Full stack trace:

  Unwanted error: Attempt to use Chrome / Renderer Extension Binding Disconnected Port Objects: 147 Chrome.port Post Message Chrome / Renderer Extension Binings: 147 ChromeHird.port DicePatchOnConnect.Connect Event Chrome / Renderer Extension Binings: 89IExtension.fu SendResponse.state background.js: 1573db.readTransaction.tx.executeSql.paramStr background.js: 1038  < / Ex> 

This only happens when Reloading extension is not being helpful for a few hours - it is not that after restarting the Chrome browser it will be a solution that becomes normal for a few hours, content script may continue to send requests for background No response can be sent from the background. Is there any way that I can catch this unwanted error and reset the listener?

I am using chrome.extension.onRequest.addListener for my communication. Before my response, I query DB and I do not send any other feedback before the question ends.

Thanks, Marek

This happens when a connection stops . For example, if you open a tab that contains content_script injection, then it opens a connection, tab is closed, and then background_page attempts to pass a message. This will fail because the tab is no longer active for receiving messages.

In your case, I guess you are trying to post messages with the old tab id, with the close of tab and opening the new tabs, the new connection for the new tab. I would like to read again

Comments