• Resolved hupe13

    (@hupe13)


    Hello,

    I have difficulties to run the plugin successfully on a multisite. If I check it with Lighthouse, the error is:

    Web app manifest or service worker do not meet the installability requirements
    Failure reason
    Page does not work offline

    And I can’t install the app in Chrome. I have running the plugin on a single site also, there the problem does not exist. The settings are in principle the same.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Magazine3

    (@magazine3)

    Can you please share the URL of your website? So that we will look into it and get back to you shortly.

    Thread Starter hupe13

    (@hupe13)

    Plugin Author Magazine3

    (@magazine3)

    Can you please share few screengrabs of your dashboard PWAforWP set-up settings? So that we will look at it and get back to you shortly.

    Thread Starter hupe13

    (@hupe13)

    I set up a new Test Multisite with Subdirectory and all defaults. The only plugin, I installed is PWA. I activated it for the main site with its default settings. Chromes developer console logs following error:

    The script resource is behind a redirect, which is disallowed.

    I changed the first line from pwa-register-sw-1.js:
    false: var swsource = "https://my-domain.de/e?pwa_for_wp_script=1&sw=pwa-sw-1-js";
    valid: var swsource = "https://my-domain.de/e/?pwa_for_wp_script=1&sw=pwa-sw-1-js";

    Testing the webpage with Chrome Lighthouse, the same as above:

    Web app manifest or service worker do not meet the installability requirements

    reason
    Service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. With proper service worker and manifest implementations, browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. Learn more.

    Failure reason
    Page does not work offline

    Googleing this, I find out, this may be a Chrome Lighthouse feature. But why the problem doesn’t exist on a single site?

    I Have the same problem too, exactly the same.

    Plugin Author Magazine3

    (@magazine3)

    Can you please let me know, Have you installed PWAforWP plugin at your end? Please check it once and let me know back.

    Plugin Author Magazine3

    (@magazine3)

    faelmarcondeli: As per forum guidelines, Please create a new topic.

    Thread Starter hupe13

    (@hupe13)

    Can you please let me know, Have you installed PWAforWP plugin at your end? Please check it once and let me know back.

    Of course. https://phw-web.de/e/ is the main site of the test network installation, https://phw-web.de/e/1/ is a sub website. All settings are the defaults.

    Plugin Author Magazine3

    (@magazine3)

    Thanks for the confirmation. We are checking your issue and we will get back to you shortly.

    Plugin Author Magazine3

    (@magazine3)

    Can you please uncheck “PWA alternative method” to serve service workers in the setting Advance section?

    Thread Starter hupe13

    (@hupe13)

    “PWA alternative method” was and is unchecked on both sites. Should I check it?
    I see your scan in the logs, and I don’t see any other status code as 200.

    Plugin Author Magazine3

    (@magazine3)

    Reference screengrab: https://prnt.sc/1ec7xoh
    As we can check for service worker there 2 calls. one RESPONSE with 301 and the other one is 200.

    That’s the cause of the issue, the service worker is registered but it’s the second time.

    Thread Starter hupe13

    (@hupe13)

    This issue I had in https://www.ads-software.com/support/topic/multisite-624/#post-14648330 too. Thats why I changed pwa-register-sw-1.js as described there.

    Today I updated to WordPress 5.8 and to PWA 1.7.35 and it is the same as before:

    – the slash is missing on the main page in pwa-register-sw-1.js.
    – I corrected this.
    – Lighthouse reports the same as above.
    – On the subsite the problem with the slash does not exist, but Lighthouse reports the error too.

    Plugin Author Magazine3

    (@magazine3)

    Alright, We will check the issue and get back to you.

    Thread Starter hupe13

    (@hupe13)

    Thank you for the new version. It works on the main site, but for the subsite doesn’t. It works if I write the following lines in .htaccess for the site with blogid 2:

    RewriteRule .*/pwa-register-sw-2.js /pwa-register-sw-2.js [L]
    RewriteRule .*/pwa-sw-2.js /pwa-sw-2.js [L]
    RewriteRule .*/pwa-manifest-2.json /pwa-manifest-2.json [L]

    Then Lighthouse doesn’t find any errors and I can install it on my mobile.

    • This reply was modified 3 years, 6 months ago by hupe13. Reason: code format
Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Multisite’ is closed to new replies.