The message port closed before a response was received.

103 views
Skip to first unread message

Vasco Gomes

unread,
Feb 13, 2019, 6:28:22 AM2/13/19
to Chromium Extensions
Hi, since the last update of Chrome 71-72 I'm reading a lots of this messages on almost all extensions. Both on content script as the background script.
Anyone has an idea of what is going on with Chrome?

From what I understand the issue is between:
chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) -> Background Page
and
chrome.runtime.sendMessage({ ... }, function (response) { -> Content Script

If there is a return true on chrome.runtime.onMessage.addListener the error is reduced but it's supposed to only return true when there is a message to be sent latter (assync message). If there is no return message we don't send anything.

Please help.
Greetings.

Deliaz

unread,
Apr 18, 2019, 2:07:06 PM4/18/19
to Chromium Extensions
I can confirm that the problem still exists. Working on extension with Popup sending messages to Background. Even If the background returns true and then call response fn (async response) - I still see "The message port closed before a response was received."
Any guess? I noticed that problem since Chrome v73. 

Vasco Gomes

unread,
Apr 22, 2019, 10:03:04 AM4/22/19
to Chromium Extensions
Hi, yes still having the issue.

Greetings.

thescripter

unread,
Apr 26, 2019, 6:34:46 AM4/26/19
to Chromium Extensions
Yep this issue exists for me too.

Vasco Gomes

unread,
Jun 7, 2019, 10:58:24 AM6/7/19
to Chromium Extensions
Still having this issue. Don't know why...

Greetings.
Reply all
Reply to author
Forward
0 new messages