Hello,
Some users of my add-on (GroupSpeedDial) are experiencing rare issue that I managed to identify as this:
From my content script I send message to my background script using this code:
chrome.runtime.sendMessage({type: 'getImages'}, data => { /* data parameter is undefined! */ })
My background script replies using code:
chrome.runtime.onMessage.addListener((data, sender, sendResponse) => { sendResponse({ /* some data in Object, never undefined */ }) })
Now my question is, how can I receive response with the undefined
message, when such message cannot be even send?
What can be happening if I do get the response but it’s undefined
?
I understand something is wrong. But unfortunately I’m unable to reproduce this error but I’m getting several e-mails every day reporting it. Also usually it disappears after reloading the page or restarting browser.
I even implemented a repeater function that will try to send this message 5 more times, each time with increased delay, each time waiting for response, but it didn’t helped.
I suspect this can be related with upgrade mechanism of extension or upgrade of Firefox as I tend to get more e-mails right after releasing a new version.