75
rated 0 times
[
82]
[
7]
/ answers: 1 / hits: 28479
/ 5 Years ago, mon, march 18, 2019, 12:00:00
I have searched around but it's all about people complaining the bug. Many posts say that you should check all your extensions.
However, this is something I encountered when I am developing an extension.
Here is how it happens:
I have a listener on background.js
:
chrome.extension.onMessage.addListener(function(request, sender, sendResponse) {
console.log('get:', request);
if (request.hasOwnProperty('opt')) {
trackPage('opt/' + request.opt);
}
return Promise.resolve();
});
And here is the trigger in my option page:
track('something');
function track(msg){
chrome.runtime.sendMessage({opt: msg}, function(response) {
console.log(response);
});
}
The error occurs when the track
function is fired.
How can I fix the error totally?
More From » google-chrome-extension