rahul kumar
unread,Jan 23, 2023, 12:54:02 AM1/23/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, farkas.kris...@gmail.com, Chromium Extensions, suchintand...@gmail.com
This error message indicates that there was a problem with the communication between the listener and the
message channel. The reason is that sendMessage is now promisified internally, so you can 'await' it, but the by-product is that when you don't specify a callback yourselves, it is added internally anyway in order for the call to return a Promise, which means that since you don't call sendResponse in onMessage, the API will think that it was you who made a mistake of using a callback and not providing a response, and report it as such.
Since the new behaviour is very confusing for almost everyone, a solution might be to stop showing this error when the callback is not specified, however it might cause confusion for those developers who still use callbacks and forgot to call sendResponse inside onMessage by mistake, which should be reported ideally as it always was.
If you see your extension causing this errors - inspect closely all your onMessage listeners. Some of them probably need to start returning promises (marking them as async should be enough).
If still error showing, try disabled all installed extensions in Chrome then you will get a clear console without errors.