I'm using VueJS and Laravel for my project. This issue started to show lately and it shows even in the old git branches.
This error only shows in Chrome browser.
I'm using VueJS and Laravel for my project. This issue started to show lately and it shows even in the old git branches.
This error only shows in Chrome browser.
In my case it was a breakpoint set in my own page source. If I removed or disabled the breakpoint then the error would clear up.
The breakpoint was in a moderately complex chunk of rendering code. Other breakpoints in different parts of the page had no such effect. I was not able to work out a simple test case that always trigger this error.
I have answered on this.
In short, this problem occurs due to some google chrome plugins
In case you're an extension developer and have googled your way here trying to stop causing this error:
The issue isn't CORB, as blocked CORs manifest as warnings like -
The issue is most likely a mishandled async response to runtime.sendMessage. As MDN says:
When you send an async response but fail to use either of these mechanisms, the supplied
sendResponse
argument tosendMessage
goes out of scope and the result is exactly as the error message says: your message port (the message-passing apparatus) is closed before the response was received.Webextension-polyfill authors have already written about it in June 2018.
So bottom line, if you see your extension causing these errors - inspect closely all your onMessage listeners. Some of them probably need to start returning promises (marking them as async should be enough).
Make sure you are using the correct syntax.
We should use the sendMessage() method after listening it.
Here is a simple example of contentScript.js It sendRequest to app.js.
contentScript.js
app.js
If error reason is extension use incognito Ctrl+Shift+N. In incognito mode Chrome does not have extensions.
UPD. If you need some extension in incognito mode e.g. ReduxDevTools or any other, in extension settings turn on "Allow in incognito"
In my case it was OneTab chrome extension.