webextension - notify not working from background script on Firefox 48.0b7




WebExtensions: Untriaged
a year ago
a year ago


(Reporter: Quazi Mozi, Unassigned, NeedInfo)


48 Branch

Firefox Tracking Flags

(Not tracked)



(2 attachments)



a year ago
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce:

sent a message to background script from content script.
console logs message received.  Function follows (same function works perfectly from options script but not from background script):
function notify(message) {
  console.log("afoTWGv4 - INFO - background.js - running notify function");
    "type": "basic",
    "iconUrl": chrome.extension.getURL("blah.png"),
    "title": "Blah",
    "message": message
notify("Hello world.");

Actual results:

No notification.
No error or message of any sort in the javascript console except for the console.log entry mentioned above.

Expected results:

Should have gotten a notification "Hello World."
Component: Untriaged → WebExtensions
Product: Firefox → Toolkit
Can someone in QA please try to verify this? The code looks like it should work to me.
Keywords: qawanted
(In reply to Quazi Mozi from comment #0)
> User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,
> like Gecko) Chrome/51.0.2704.103 Safari/537.36

This user agent string doesn't look like 48?
Flags: needinfo?(quazimozi)
Can't reproduce in OS X in Firefox 48 beta 7 and in Chrome. "Hello World" shows up. Could be a windows problem?
Created attachment 8772048 [details]

This is a copy of the example from the MDN docs changed to say Hello world on load as suggested by the author.
Quazi, could you please provide us with the complete code for the extension you are using which produces this problem. We are unable to reproduce it.

Comment 6

a year ago
Tested also on Windows 10 64-bit , Firefox 48.0b7 and I was not able to reproduce for windows

Comment 7

a year ago
Created attachment 8772431 [details]
Not able to reproduce on Windows
Thanks Victor. In guess we need to wait for the full extension code from the OP.
Keywords: qawanted

Comment 9

a year ago
Unfortunately and fortunately, I am unable to reproduce the problem.
My firefox updated to 48.0b9 so I can only surmise the issue was resolved.
Notification from content script via background script is now working fine for me.
All I can do at this point is to apologize for diverting your attention from other important matters.
No worries, thanks for the report and thanks for using WebExtensions.
Last Resolved: a year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.