PHP Classes

getting started with the demo

Recommend this page to a friend!

      PHP Web Push Notifications Server  >  All threads  >  getting started with the demo  >  (Un) Subscribe thread alerts  
Subject:getting started with the demo
Summary:Wondering if you hav a quick start guide. Here are my steps so f
Messages:3
Author:Mark Hopgood
Date:2021-05-04 15:17:47
 

  1. getting started with the demo   Reply   Report abuse  
Picture of Mark Hopgood Mark Hopgood - 2021-05-04 15:17:47
Hi do you have a quick start to get the demo up and running.

So far I have..

1. created my vapid on a secured server
2. edited the MyVapid.php
3. edited PNServiceWorker.js
4. visited /PNTestClient.html

clicked subscribe
everything looks ok but I got.


PNTestClient.html:1 Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
foreground.js:13 Error occurred when fetchNoteList
(anonymous) @ foreground.js:13
PNTestClient.html:1 Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.

Any ideas?

  2. Re: getting started with the demo   Reply   Report abuse  
Picture of Mark Hopgood Mark Hopgood - 2021-05-04 15:23:16 - In reply to message 1 from Mark Hopgood
I also got

SaveSubscription failed with: SyntaxError: Unexpected end of JSON input
Have modified the PNServiceWorker.js as instructed..

uncommenting..
var cloned = response.clone();
console.log('Response: ', await cloned.text());

I now get no errors, just registration successful.

What do I do next to get a notification?

Many thanks
Mark

  3. Re: getting started with the demo   Reply   Report abuse  
Picture of Mark Hopgood Mark Hopgood - 2021-05-04 15:33:02 - In reply to message 2 from Mark Hopgood
I think my problem might be with
Warning: At least PHP Version 7.4 is required (current Version is 7.3.27-1~deb10u1)! in PNTestServer.php on line 47

Warning: Extension gmp must be installed! in PNTestServer.php on line 53

Any other recommendations beyond this?