You're responding way too fast. That's scary. 😃
askvortsov don't have anything set up, but the flarum project itself could always use donations
Donating to the whole project is great, but giving something back to individual developers dedicated to their projects is also great 🙂
askvortsov Huh that's odd, haven't seen that one before... Which browser is this?
Google Chrome 84.0.4147.105. So nothing special on that end. I've also seen an JS error being triggered when doing the same on my mobile phone...
Installation
Just in case it depends on how I installed it or any other circumstances:
$ composer -V
Composer version 1.10.10 2020-08-03 11:35:19
$ composer require "askvortsov/flarum-pwa:*"
$ composer require "minishlink/web-push:5" //<- making sure to use compatible v5
$ php flarum migrate
$ php flarum recache:clear
$ php flarum cache:clear
$ php flarum cache:assets --css --js --locales
I've tried removing and re-requiring flarum-pwa
once again and used --no-cache
to eliminate some factors.
idb.js
When using CTRL-F5, I can see that pulling one specific JS file fails:
sw:1 Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at '/assets/extensions/askvortsov-pwa/idb.js' failed to load.
at /sw:1:1
And even more interesting:
$ ls public/assets/extensions/askvortsov-pwa/
offline.html sw.js
It's indeed not there. However on your GitHub/idb.js it's indeed present.
So I was manually pulling it via wget https://raw.githubusercontent.com/askvortsov1/flarum-pwa/master/assets/idb.js -O public/assets/extensions/askvortsov-pwa/idb.js
. But unfortunately: No change, even when hard-refreshing the browser.
The key
When using Chrome's DevConsole the PublicKey seems to look like a valid public key indeed: (However appears to be binary data when decoding)
app.forum.attribute("vapidPublicKey")
"BFargahjcHsO1PqaVMe9Sf4rXPfRUCJE1axoBOhm0H29qAoZ0kXIsC9gD++UIKiY9XScrBIM0fApramKOvPXkBo="
Not sure if I've done something wrong on my end.
I very appreciate your reply - thanks! 🙂