[CDB] Browser Push Notifications

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
deninho32
Registered User
Posts: 239
Joined: Tue May 21, 2019 8:57 am

Re: [3.3][RC] Browser Push Notifications

Post by deninho32 »

MattF wrote: Tue Jun 04, 2024 9:38 pm You won't be able to click on the Subscribe button unless you're on a secure https site.
I'm on https, cleared all the caches, but no subscribe button.
phpBB 3.3.7 | PHP Version 7.4.33 | Milk Theme
rxu
Extensions Development Team
Posts: 3901
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: [3.3][RC] Browser Push Notifications

Post by rxu »

It requires phpBB >=3.3.12 to work.
deninho32
Registered User
Posts: 239
Joined: Tue May 21, 2019 8:57 am

Re: [3.3][RC] Browser Push Notifications

Post by deninho32 »

Screenshot 2024-06-05 at 10-42-20 Beheerdersoverzicht.png
You do not have the required permissions to view the files attached to this post.
phpBB 3.3.7 | PHP Version 7.4.33 | Milk Theme
User avatar
bennybernaer
Registered User
Posts: 674
Joined: Tue Mar 22, 2011 9:53 pm

Re: [3.3][RC] Browser Push Notifications

Post by bennybernaer »

Despite the settings, I don't get any push notifications in Chrome or Firefox. cashe emptied via: browser, acp and ftp. Extension removed + files, reinstalled. Nothing....

With the previous version I did receive notifications in safari (mobile) but nowhere in this version

phpbb version: 3.3.12
php: 8.3.6
database: MySQL(i) 10.6.17-MariaDB-cll-lve-log
website: https://www.ana4life.nl
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5980
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.3][RC] Browser Push Notifications

Post by MattF »

SpIdErPiGgY wrote: Tue Jun 04, 2024 5:14 pm I still get this error:

Code: Select all

Web Push message could not be sent: Client error: `POST https://updates.push.services.mozilla.com/wpush/v2/gAAAAABmXAUOb6I8fz_AqiU8n7iDJJNvnFuCZ6fxSvoUh2GKhKW6lHFK1disqH8Q6HC7CGUFCcnjF2InWst1MJFbnxmAQHgm8-c4SNTslMpa4XDg5X4gOQeqlLgQiJaLYx1d4E1LzSKReAwIgDc3DDllND2t09ppMVWTcuUXsnx4_J8d_M9YfrM` resulted in a `413 Payload Too Large` response:
{"code":413,"errno":104,"error":"Payload Too Large","message":"This message is intended for a constrained device and is (truncated...)
Android 14
One UI 6.1
Mozilla Firefox Beta
Open up the file notification/method/webpush.php

change $web_push->setAutomaticPadding(2820);
to $web_push->setAutomaticPadding(2000);

And see if that fixes it.

Also I looked at your site and you're not using the latest version.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5980
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.3][RC] Browser Push Notifications

Post by MattF »

bennybernaer wrote: Wed Jun 05, 2024 9:08 am Despite the settings, I don't get any push notifications in Chrome or Firefox. cashe emptied via: browser, acp and ftp. Extension removed + files, reinstalled. Nothing....

With the previous version I did receive notifications in safari (mobile) but nowhere in this version

phpbb version: 3.3.12
php: 8.3.6
database: MySQL(i) 10.6.17-MariaDB-cll-lve-log
website: https://www.ana4life.nl
I don't even see any sign of it being installed on your forum's landing page in the source html.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
bennybernaer
Registered User
Posts: 674
Joined: Tue Mar 22, 2011 9:53 pm

Re: [3.3][RC] Browser Push Notifications

Post by bennybernaer »

MattF wrote: Wed Jun 05, 2024 2:05 pm
bennybernaer wrote: Wed Jun 05, 2024 9:08 am Despite the settings, I don't get any push notifications in Chrome or Firefox. cashe emptied via: browser, acp and ftp. Extension removed + files, reinstalled. Nothing....

With the previous version I did receive notifications in safari (mobile) but nowhere in this version

phpbb version: 3.3.12
php: 8.3.6
database: MySQL(i) 10.6.17-MariaDB-cll-lve-log
website: https://www.ana4life.nl
I don't even see any sign of it being installed on your forum's landing page in the source html.
He was disabled because he wasn't working. Try again.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5980
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.3][RC] Browser Push Notifications

Post by MattF »

bennybernaer wrote: Wed Jun 05, 2024 2:49 pm
MattF wrote: Wed Jun 05, 2024 2:05 pm

I don't even see any sign of it being installed on your forum's landing page in the source html.
He was disabled because he wasn't working. Try again.
I subscribed on your site. Send me a pm. mattt
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
bennybernaer
Registered User
Posts: 674
Joined: Tue Mar 22, 2011 9:53 pm

Re: [3.3][RC] Browser Push Notifications

Post by bennybernaer »

MattF wrote: Wed Jun 05, 2024 3:35 pm
bennybernaer wrote: Wed Jun 05, 2024 2:49 pm

He was disabled because he wasn't working. Try again.
I subscribed on your site. Send me a pm. mattt
Just done.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5980
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.3][RC] Browser Push Notifications

Post by MattF »

Push notification received.
Screenshot 2024-06-05 at 8.37.49 AM.jpeg
You do not have the required permissions to view the files attached to this post.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
bennybernaer
Registered User
Posts: 674
Joined: Tue Mar 22, 2011 9:53 pm

Re: [3.3][RC] Browser Push Notifications

Post by bennybernaer »

Very strange. I've been searching all day now and I don't see any other settings in Google Chrome or Firefox.
Naamloos.png
You do not have the required permissions to view the files attached to this post.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5980
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: [3.3][RC] Browser Push Notifications

Post by MattF »

Just so you know, you can't send yourself anything to trigger a notification. It has to be from a different user.

Also, these notifications are handled by a "Service Worker." Every browser has a way of showing you the service worker from their Developer tools. If you can find that and view it, make sure it matches what is uploaded by the extension (the file called push_worker.js.twig). The browsers don't really seem to refresh the service worker unless you go extreme and basically delete everything in your browser (entire history/caches/cookies/web data/etc). We have updated the service worker a few times in these updates to make it so that it DOES get refreshed when you purge the forum cache. So it's quite possible you have an expired Service worker from a previous RC version stuck in your browser. Another way to check this is to just try different browsers.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
bennybernaer
Registered User
Posts: 674
Joined: Tue Mar 22, 2011 9:53 pm

Re: [3.3][RC] Browser Push Notifications

Post by bennybernaer »

Okay, I've reset all browser settings.

When I send a private message to account 2 in Firefox using account 1, I receive a push notification in Google Chrome. Also the other way around...

But when I send a private message in the same browser/PC, I don't receive anything. But maybe the latter is normal?
User avatar
halil16
Registered User
Posts: 1393
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil

Re: [3.3][RC] Browser Push Notifications

Post by halil16 »

MattF wrote: Wed Jun 05, 2024 3:50 pm ...Also, these notifications are handled by a "Service Worker."...
What should we do if we have a different service worker file? I was able to prepare one for PWA. If it have both.... I sent you the context as a PM.
Buy me a coffee
Hire me for your phpBB board.
Introducing Mobile Upgrade! Make your phpBB board like an app!
O BeldeThatTowns*for sale*
"The day we will need ideas more than possessions, we will find the secret to true wealth." - Peyami Safa
rxu
Extensions Development Team
Posts: 3901
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: [3.3][RC] Browser Push Notifications

Post by rxu »

bennybernaer wrote: Wed Jun 05, 2024 4:08 pm But when I send a private message in the same browser/PC, I don't receive anything. But maybe the latter is normal?
Looks like that. For me, when you subscribe as user2 then user1's subscription becomes invalid in the same browser.

Return to “Extensions in Development”