Support » Plugin: PWA for WP & AMP » The FetchEvent resulted in a network error – pwa.js 404 issue

  • Resolved slr1979

    (@slr1979)


    Firstly, great plugin but some issues have cropped up.

    When navigating to a non-existent page/url e.g. https://www.domain.com/bad-url, the 404/Page Not Found is not displaying and returns browser error page instead. I have the page set in the plugin settings using a page and my theme also uses a custom 404.php. I am using network only on everything as an other caching stategy affects my users login experience e.g(having to login twice, cached profile images, bad login redirects etc.)

    Console returns this error..

    
    11:45:36.822 Navigated to chrome-error://chromewebdata/
    11:45:36.864 Fetch failed loading: GET "https://www.domain.com/bad-url".
    11:45:37.541 The FetchEvent for "https://www.domain.com/bad-url" resulted in a network error response: an object that was not a Response was passed to respondWith().
    Promise.then (async)
    (anonymous) @ pwa-sw.js:656
    11:45:37.634 pwa-sw.js:480 Fetch failed loading: GET "https://www.domain.com/bad-url".
    (anonymous) @ pwa-sw.js:480
    Promise.then (async)
    networkOnlyStrategy @ pwa-sw.js:478
    (anonymous) @ pwa-sw.js:647

    Please could someone help me resolve this asap as I have had to deactivate the plugin for the time being.

    • This topic was modified 1 year, 8 months ago by slr1979. Reason: Add link to support post

    The page I need help with: [log in to see the link]

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

    (@magazine3)

    We checked your issue. We know that, this is the issue of network only caching strategy. For testing purpose, can you please share your website URL? So we can analyze it and help you to fix the issue for you.

    Plugin Author Magazine3

    (@magazine3)

    Thank you for giving the URL. Can you please share a screenshot of what error Google is reporting? So we can analyze it and help you to fix this issue?

    Thread Starter slr1979

    (@slr1979)

    Please see screenshot here

    https://drive.google.com/file/d/1DvJ33ldM5DXLxg5kUNGxi7EprNLn_Jre/view?usp=sharing

    Thanks for your help so far

    Plugin Author Magazine3

    (@magazine3)

    Currently you are use in network only caching strategy. Can you please change the network only caching strategy to network first? It will be resolved.

    Thread Starter slr1979

    (@slr1979)

    Unfortunately, the issue still exists with network first. Any bad url results in a chrome error instead of returning a 404.

    Plugin Author Magazine3

    (@magazine3)

    We have created a ticket for this bug. We will be fixing this in our future updates.
    Reference: https://github.com/ahmedkaludi/pwa-for-wp/issues/334

    Plugin Author Magazine3

    (@magazine3)

    This issue is fixed in our latest version of plugin(1.7.8). Can you please update the plugin and check whether the issue is having or not.

    Thread Starter slr1979

    (@slr1979)

    Hello.

    I tested the plugin in a staging site and unfortunately I am still experiencing the same issue. I disabled caching and minification and emptied my browser cache and the 404 page is not returned.

    Please advise.

    Plugin Author Magazine3

    (@magazine3)

    Hello,
    As we can check on https://www.melodicloud.com/ there is PWA not installed.
    On our side we have re-created the issue and tested properly, it shows Not-Found page properly. For example https://wordpress-123147-847862.cloudwaysapps.com
    Might be it your service worker serves from the cache. So please clear cache from the server-side and browser-side also.

    You can check ticket https://github.com/ahmedkaludi/pwa-for-wp/issues/334 commit also on js page of following URL YOUR_DOMAIN/pwa-sw.js

    Thread Starter slr1979

    (@slr1979)

    Hello,

    Many thanks for your response.

    I use Litespeed Cache WP. Following your email and mention of cache, I realised that pwa-sw.js was not on the exclusions list for Litespeed Cache and therefore was being cached. Once pwa-sw.js was added to the exclusions, the plugin appears to be working as expected.

    May I suggest you add this to your documentation so people who use similar plugins do not encounter any confusion!

    Many thanks for all your help. Fantastic plugin by the way, keep up the great work. 🙂

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @slr1979 Unless it’s spam, abuse or something broken in the forums please do not report topics again.

    It is not a means to get faster support, it only gets forum moderators attention and no one else.

    Thread Starter slr1979

    (@slr1979)

    Hello,

    I may have accidentally clicked the link. I did not mean to report abuse. My apologies.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘The FetchEvent resulted in a network error – pwa.js 404 issue’ is closed to new replies.