• Extensions
  • Progressive Web App (PWA) and Push Notifications

Error caught by sentry:

TypeError: Cannot read property 'unsubscribe' of null
  at ? (webpack://@askvortsov/flarum-pwa/./src/forum/addPushNotifications.js:59:24)
5 days later

Seems that I'm not the only one who's got this issue while enabling the extension...

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1142 REFERENCES command denied to user 'forum'@'localhost' for table 'forum.users'

askvortsov
Reviewed phpMyAdmin I found that you have to grant privilege for REFERENCES to your MySQL user Manually 🤔
If something went wrong still appears, simply delete push_subscription table and it should be working fine 😉

A new problem encountered: the web push can't function while minishlink/web-push is required 🤔
How can I check the status of the extension?

When I turn on the extension for the first time, an error with the database pops up. I don't know how to solve it.
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes in ...

    iPurpl3x Nope, neither are necessary! It uses the Push API, which is a part of the service worker system being introduced into browsers.

    6 days later

    Dear @askvortsov ,

    Something from this extension is making my flarum forum to break in old browsers.
    I can confirm this after testing with the following browsers;

    1. Microsoft Edge v44.18362.449.0
    2. Google Chrome v58.0.3029.83

    When the extension is active it breaks on page load for everyone and renders a pure HTML which says;
    "Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error. " then All Discussions appear under in pure HTML with no CSS.

    Meanwhile, when the extension is disabled, my flarum forum loads just fine.

    Edit:
    To satisfy my curiosity and further confirm that its not only on my setup, I tested it on Connectome

      Operator How much market share does that version of Google Chrome and older actually take up? I mean Chrome is on version 83+ and nothing older than 83.0.4103 is supported by Google, further Google has released several critical security patches since version 58.

      As for Edge that's a slightly larger issue because of the fact that "regular" edge is still a pretty big thing at the moment (although Edge Chromium is quickly taking over)

        tankerkiller125 I totally agree with you on this. I am just concerned because Flarum's Discuss loads well in the said browser and my flarum forum also loads well when i disable the extension.

        askvortsov Don't stress yourself too much on this, as @tankerkiller125 said, if these browser vendors do not support them, who are we to do so.

        This ext worked really well on my forum, but not sure if its a bug, when i already uploaded an image for logo, once i want to change the logo, it wont let me change the logo. I have removed all existing logos and uploading the new logo, but the image will be uploaded as the previous images. Tried to cleard the cache but the logo still wont change, i mean the 1st uploaded logo not replaced by the new one

          • [deleted]

          snfansclub Yes, I experienced this also. In the end, I landed up having to clear the cache (including browser cache), renaming all uploaded files (and also deleting them from the assets folder). Finally got it working, but seeing as nobody else mentioned it, I thought it was just me 🙂

          When i press Like:
          [2020-06-30 07:10:46] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getStatusCode() on null in /usr/share/nginx/akr-developers.com/vendor/askvortsov/flarum-pwa/src/Listener/SendPushNotifications.php:112

            I get 500 on /api/pwa/push 🙁

            Edit: this could be an issue with Microsoft Edge. I don't get that on other devices

            wloot if (!$report->isSuccess() && $report->getResponse() && in_array($report->getResponse()->getStatusCode(), [403, 404, 410])) This works for me.

            Does this app need to be updated each time Flarum gets a new revision?

            I am thinking of installing but worried it may break the PWA for users on each update.