Closed Bug 1286742 Opened 8 years ago Closed 8 years ago

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

Categories

(WebExtensions :: Untriaged, defect)

48 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: quazimozi, Unassigned, NeedInfo)

Details

Attachments

(2 files)

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");
  chrome.notifications.create({
    "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?
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.
Tested also on Windows 10 64-bit , Firefox 48.0b7 and I was not able to reproduce for windows
Thanks Victor. In guess we need to wait for the full extension code from the OP.
Keywords: qawanted
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.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: