• Resolved digastoof

    (@digastoof)


    First of all, this plugin is great when I don’t modify any settings. However, it appears that once I change the “Application Icon” to one of my own photos (still 192 x 192), that this causes the service worker to quit working.

    I have deactivated, and deleted the plugin, cleared browser cache, and then reinstalled countless times. The story is always the same. If I try and change the photo, it quits working. I even tried uploading the original photo but with a different path (to my WP_Uploads), and that did not work either.

    I’ve done the lightsail PWA audit and without changing anything, I score 10 out of 11 (the only fail appears to be on my part because the site loads to slowly). However, once I change the “Application Icon” photo, now I only pass 7 out of 11. The main error, is “Does not register a service worker” along with “User will not be prompted to install the Web App” and “Does not respond with a 200 when offline”.

    Hope this pinpoints where the issue lies.

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello @digastoof,

    Good day and thanks for using our plugin SuperPWA.

    The issue that you noticed is because the image that you changed is added to our manifest and service worker as <strong>https://</strong>.

    Can you please let me know whether you have the cPanel or FTP access? So that I can share more informations on how to fix this issue easily.

    [ Signature deleted ]

    • This reply was modified 6 years, 10 months ago by Jan Dembowski.
    Thread Starter digastoof

    (@digastoof)

    Yes I have FTP.

    Thanks for your quick reply @digastoof!

    Within the root of WordPress, you can see two files called superpwa-sw.js and superpwa-manifest.json.

    Within the both files when you uploaded the new image, the image URL is added as <strong>https://</strong>, you can fix this by editing both files as below:

    1) Within the superpwa-manifest.json change

    {"name":"Greg Landscaping","short_name":"Greg Landscaping","icons":[{"src":"http:\/\/greglandscaping.org\/wp-content\/uploads\/2018\/04\/greg-photo_logo.png","sizes":"192x192","type":"image\/png"},{"src":"https:\/\/greglandscaping.org\/wp-content\/plugins\/super-progressive-web-apps\/public\/images\/logo-512x512.png","sizes":"512x512","type":"image\/png"}],"background_color":"#D5E0EB","theme_color":"#D5E0EB","display":"standalone","orientation":"portrait","start_url":"\/","scope":"\/"}

    with

    {"name":"Greg Landscaping","short_name":"Greg Landscaping","icons":[{"src":"https:\/\/greglandscaping.org\/wp-content\/uploads\/2018\/04\/greg-photo_logo.png","sizes":"192x192","type":"image\/png"},{"src":"https:\/\/greglandscaping.org\/wp-content\/plugins\/super-progressive-web-apps\/public\/images\/logo-512x512.png","sizes":"512x512","type":"image\/png"}],"background_color":"#D5E0EB","theme_color":"#D5E0EB","display":"standalone","orientation":"portrait","start_url":"\/","scope":"\/"}

    And within the superpwa-sw.js change

    const fallbackImage = 'https://greglandscaping.org/wp-content/uploads/2018/04/greg-photo_logo.png'

    with

    const fallbackImage = 'https://greglandscaping.org/wp-content/uploads/2018/04/greg-photo_logo.png'

    That’s it! Hope it will help you!

    Looking forward.

    [ Signature deleted ]

    • This reply was modified 6 years, 10 months ago by Jan Dembowski.

    Hi @digastoof,

    I noticed that you have changed the code as I mentioned above and now the Add to Home Screen prompt is working perfectly upon my tests. Also upon LightHouse test, your website scores 91/100. See LightHouse report at here. Hope it helps.

    Closing this ticket ??

    Thread Starter digastoof

    (@digastoof)

    Yes it has. It seems the temporary solution is whenever you change the default logo or splash screen images, that you need to add an “s” into http in the two files you mentioned. Works great now, but hoping this can get resolved soon.

    Thread Starter digastoof

    (@digastoof)

    Btw, the plugin is really cool. Thanks for creating it.

    Glad to hear that @digastoof!

    The issue within your case is the URLs are not fully redirected to https://, due to that when our plugin checks the URL of image that you uploaded – it gets https:// and then it gets stored into the manifest and service worker.

    We noticed this issue upon some users also as they didn’t force https:// to https://. Due to that from the next version onward, all the URLs will be saved to our manifest and service worker as https://, even whether the website is SSL or not. You can also use Really Simple SSL which will redirect all https:// to https:// till our next release and also that awesome plugin helps in all criteria other than our plugin needs.

    Hope this helps!

    Thread Starter digastoof

    (@digastoof)

    https:// is redirected to https://.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Added to home page not working’ is closed to new replies.