Orion Version Details
Version 0.99.119-beta (WebKit 615.1.1)
MacBook Pro (macOS Monterey 12.5 build 21G72)
The official Pinboard extension for chrome is very simple so I was using it to debug other broken extensions. The main "Save to Pinboard" flow from the popup fails with no error. In the popup code that is trying to communicate to background.js --
chrome.runtime.sendMessage("get_current_tab", callback)
Where the message
is the string "get_current_tab".
In the background script:
chrome.runtime.onMessage.addListener(
function(message, sender, sendResponse) {
console.log('processing message: ' + JSON.stringify(message));
})
message
is an empty object {}
-- The wiring for sendMessage, onMessage appears to be broken. The relevant APIs:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/sendMessage
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage
No matter what I tried tweaking, I couldn't get onMessage
to receive anything other than an empty object as the message