Closed Bug 1468935 Opened 6 years ago Closed 6 years ago

Notifications clients.openwindow doesn't do anything

Categories

(Firefox :: Untriaged, defect)

61 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mzvarik, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 Steps to reproduce: Make push messaging and service worker with this function: elf.addEventListener('notificationclick', function(e) { console.log("This is printed to console fine"); clients.openWindow('https://example.com'); // this makes no error, nothing }); Actual results: The push notification arrives, but when I click on it, the window is not opened and no errors are listed. I have allowed popup windows, but made no difference. Expected results: Tab with new page should've been opened. Works in Firefox 47. Doesn't work in Firefox 60 and 61.
Version: 60 Branch → 61 Branch
It was returning error: "event.waituntill InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable" I removed "const messaging = firebase.messaging();" From top of service worker and it is now working as expected!
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.