Support » Plugin: Super Progressive Web Apps » SuperPWA 2.0 : Service worker not really generated

  • Resolved ariestwn

    (@ariestwn)


    Hello,

    i’ve updated the plugin from 1.9 to 2.0, on the page superpwa -> settings. it show “Service worker generated successfully”, but when i click the url, the file got 404 not found.

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

Viewing 12 replies - 16 through 27 (of 27 total)
  • @arunbasillal

    i tried to turn off pagespeed cache and plugin autoptimize. but its just the service worker that not generated automatically. i dont know what cause of this problems.

    Plugin Author Arun Basil Lal

    (@arunbasillal)

    Hello @ariestwn

    if it was the problem from our server. then why the older version of the pluggin work perfectly ?

    In this version, the files are no longer physically generated, but are served dynamically. This is why the issue happens.

    Details here: https://superpwa.com/superpwa-2-0/

    i tried to turn off pagespeed cache and plugin autoptimize. but its just the service worker that not generated automatically. i dont know what cause of this problems.

    I just checked the service worker. The 404 response is generated by the webserver and not WordPress (i.e. WordPress’s 404 page is not is displayed). Which means WordPress is not loaded in the process.

    I will think on ways to work around this. I am not familiar with NGINX config to suggest where to look into. Can you get in touch with your host and see what they have to say?

    Sorry for the trouble and thanks for working with us on this.

    hello @arunbasillal

    the service worker is successfully generated when i remove cache header for javascript on nginx. it run like it was. but the service worker not generated when i activate onesignal plugin. it https://ariestwn.com/OneSignalSDKWorker.js.php return 404.

    error.log :
    2018/12/29 07:36:51 [error] 4968#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 125.161.106.4, server: ariestwn.com, request: "GET /OneSignalSDKWorker.js.php HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "ariestwn.com"

    • This reply was modified 1 year, 1 month ago by ariestwn.
    • This reply was modified 1 year, 1 month ago by ariestwn.

    I have *exactly* the same issue as ariestwn here: https://www.policymakr.com. The plugin says the manifest file is generated, but in reality it isn’t and causes a 404.

    And we’ve removed the cache header for superpwa-sw.js and added it to the cache exclusion list, but the 404 is still there.

    Hi,

    It is common practice for nginx to directly handle urls ending with .js. According to @arunbasillal

    In this version, the files are no longer physically generated, but are served dynamically. This is why the issue happens.

    So you have to modify the nginx configuration in order for the superpwa-sw.js url to be handled by php – something like:

    
        location = /superpwa-sw.js {
            try_files $uri $uri/ /index.php?$args;
        }
    
    Plugin Author Arun Basil Lal

    (@arunbasillal)

    Thanks for the input @dimitrisunited . I am not knowledgeable in NGINX, so that helps a lot.

    I am trying to figure out a solution where users won’t have this issue at all. An update is expected this week.

    Plugin Author Arun Basil Lal

    (@arunbasillal)

    Hey guys,

    Please upgrade to 2.0.1 and see how that works out.

    If you still face issues, please let me know.

    Plugin Author Arun Basil Lal

    (@arunbasillal)

    Hey guys, its working well in all tests and reports so far. Closing this thread.

    If the issue persists, please let me know.

    ariestwn

    (@ariestwn)

    Hello, thanks for solving this issue. i’ve tried it again on my website and it was worked.

    Plugin Author Arun Basil Lal

    (@arunbasillal)

    Perfect, thanks for reporting back 🙂

    Help me?

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘SuperPWA 2.0 : Service worker not really generated’ is closed to new replies.