sendMessage is called without callback
No error will be logged, even if the tab doesn't exist, so for these errors to appear you must pass a callback like chrome.tabs.sendMessage(2, 'hi', console.log)
Tab doesn't exist
Could not establish connection. Receiving end does not exist.
Tab didn't call chrome.runtime.onMessage.addListener
Could not establish connection. Receiving end does not exist.
onMessage listener did not call sendResponse
If the listener returns true
The error is thrown when the page is navigates away or the tab is closed.
Before Chrome 102:
The message port closed before a response was received.
In Chrome 102:
A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received
If the listener returns anything else
This error is thrown immediately:
The message port closed before a response was received.
sendMessageis called without callbackNo error will be logged, even if the tab doesn't exist, so for these errors to appear you must pass a callback like
chrome.tabs.sendMessage(2, 'hi', console.log)Tab doesn't exist
Tab didn't call
chrome.runtime.onMessage.addListeneronMessagelistener did not callsendResponseIf the listener returns
trueThe error is thrown when the page is navigates away or the tab is closed.
Before Chrome 102:
In Chrome 102:
If the listener returns anything else
This error is thrown immediately: