Push notifications from http://simple-push-demo.appspot.com/ stopped working

RESOLVED WORKSFORME

Status

()

P1
normal
RESOLVED WORKSFORME
3 years ago
2 years ago

People

(Reporter: janx, Unassigned)

Tracking

(Blocks: 1 bug)

47 Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox47 affected)

Details

(Whiteboard: btpp-followup-2016-03-03)

Attachments

(1 obsolete attachment)

Created attachment 8723018 [details]
broken-push.png

STR:

1. Go to 
2. Activate "Enable Push Notifications" (and authorize permission prompt)
3. Click on "Send a Push [...]" button

Expected:
- A push notification with the weather appears.

Actual result:
- No notification is ever shown.

From the Browser Console:

PushClient.setUpPushPermission() main.js:16:4837

subscriptionUpdate:  PushSubscription { endpoint: "https://updates.push.services.mozil…" } main.js:16:842

"curl --request POST https://updates.push.services.mozilla.com/push/gAAAAABWyvwk7v4mcVwNx6NkwQ_nGqzbDMf9uC81QsH7fsu4rvQ1UG93PumefhsBNJBrsEG71D-3gEWJEFpdZiYPdxD908U-NOl2bRLP7Nslye4Sb2XaroUs-DEub5W6_KpeelYeiDZ-uRMg_S9xPbluSnqxKgIH7eNlzbx96P47ZsjKS5qG5Yk=" main.js:16:1310
endpoint:  "https://updates.push.services.mozilla.com/push/gAAAAABWyvwk7v4mcVwNx6NkwQ_nGqzbDMf9uC81QsH7fsu4rvQ1UG93PumefhsBNJBrsEG71D-3gEWJEFpdZiYPdxD908U-NOl2bRLP7Nslye4Sb2XaroUs-DEub5W6_KpeelYeiDZ-uRMg_S9xPbluSnqxKgIH7eNlzbx96P47ZsjKS5qG5Yk=" main.js:16:1612

Fetch Error :-S Error: Unsuccessful attempt to send push message
Stack trace:
r/i/</<@https://simple-push-demo.appspot.com/scripts/main.js:16:1757
promise callback*r/i/<@https://simple-push-demo.appspot.com/scripts/main.js:16:1640
EventListener.handleEvent*r/i@https://simple-push-demo.appspot.com/scripts/main.js:16:1438
[2]</s</<.value/<@https://simple-push-demo.appspot.com/scripts/main.js:16:5198
promise callback*[2]</s</<.value@https://simple-push-demo.appspot.com/scripts/main.js:16:4885
promise callback*e@https://simple-push-demo.appspot.com/scripts/main.js:16:4340
EventListener.handleEvent*[1]<@https://simple-push-demo.appspot.com/scripts/main.js:16:2789
r@https://simple-push-demo.appspot.com/scripts/main.js:16:246
e@https://simple-push-demo.appspot.com/scripts/main.js:16:421
@https://simple-push-demo.appspot.com/scripts/main.js:16:11
Priority: -- → P1
The demo on that page doesn't use the Web Push protocol but the proprietary GCM, so I think this never worked in Firefox.
No, it does support Web Push as well: https://github.com/gauntface/simple-push-demo-backend/blob/master/main.py
Maybe the issue is that it isn't sending the TTL header?
I used to trigger push events on http://simple-push-demo.appspot.com/, so it used to work before.

When looking for other demos, https://goroost.com/try-web-push also doesn't seem to work anymore.

Maybe a regression?
(In reply to Jan Keromnes [:janx] from comment #3)
> I used to trigger push events on http://simple-push-demo.appspot.com/, so it
> used to work before.

The TTL requirement was added very recently, so this would explain why it was working before and isn't working now. I've submitted a pull request to add the TTL header to requests: https://github.com/gauntface/simple-push-demo-backend/pull/1.

https://goroost.com/try-web-push doesn't seem to load for me, so I can't test it.
Kit, this is just the TTL change, right?
Flags: needinfo?(kcambridge)
Whiteboard: btpp-followup-2016-03-03
I think so. Marco has a link to the PR in comment 4. Also, today's deploy should make things easier by relaxing the TTL requirement if the browser is connected.
Flags: needinfo?(kcambridge)
Marking as fixed because the TTL requirement was relaxed and both demos work again.

Thanks Marco for submitting that PR! This should be a more permanent fix.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Re-opening because the demo is broken again in Nightly.

STR:

1. Go to https://simple-push-demo.appspot.com/

Expected:
- You can activate "Enable Push Notifications" and trigger a Push Notification.

Actual:
- The "Enable Push Notifications" option is greyed, and the page shows "Ooops a Problem Occured".

Error details from the page:

[Exception... "Method not implemented" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: https://simple-push-demo.appspot.com/scripts/main.js :: [2]</s</<.value :: line 16" data: no]

From the BrowserConsole:

PushClient.setUpPushPermission()                         main.js:16
PushClient.setUpPushPermission() Error <unavailable>     main.js:16
<unavailable>                                            main.js:16

Doesn't reproduce in Chrome.
However, other demos like https://goroost.com/try-web-push still work.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #8723018 - Attachment is obsolete: true
This is caused by bug 1261405, but I would open a new bug to track the regression.
Depends on: 1266821
The demo was removed, but the issue was definitely fixed.
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.