0

Im in the process of porting one of my Chrome extensions to Firefox. Though most of the pages like options.js, options.html, popup.js & popup.html work as expected, i could see that background.js is not getting invoked when extension is loaded as temporary extension in Firefox.

Following lists my manifest content:

{
"name": "ExtName",
"description": "Extension description",
"version": "0.1.0",
"manifest_version": 2,
"icons": {
  "512": "icons/extico.png"
},  
"background": {
    "scripts": [
        "background.js"
    ]   
},  
"options_ui": { 
     "page":"options.html",
     "open_in_tab":true
},  
"browser_action": {
    "default_popup": "popup.html"
},  
"permissions": ["*://*/*", "contextMenus", "storage", "unlimitedStorage", "downloads"]
}

Though the following console.log is added in background.js, this code is never hit.

console.log('Inside background.js');

It would be great help, if someone can point me the cause of the problem on why background.js is not getting invoked when Extension is loaded.

bprasanna
  • 2,351
  • 3
  • 26
  • 36
  • @wOxxOm Thank you so much for the response. With the steps mentioned in SOF link you shared, i was able to enable `Show Content Messages` and there i am able to see the messages from background.js `console.log` output. I was not aware that in Firefox, the output messages from console are not printed in Web Console. – bprasanna Apr 25 '22 at 07:58

0 Answers0