• Resolved AWOL

    (@awol)


    Hi,
    I have been using your plugin for quite a long time, but recently the Add To Homescreen banner has stopped appearing on the devices and browsers I use (Samsung J6 Android phone, iMac with Chrome, Firefox, and Brave(phone only)). I don’t know when this started unfortunately because its not something I regularly check. I have tried clearing cache (browser and using the Litespeed Cache plugin Purge All) and cookies and altering settings in the plugin, and deactivated and reactivated the plugin. I also have a clone of my site which is virtually identical (just some minor settings, page design and small bits of php code in child theme functions and style.css that differ, and some inactive plugins) where the banner does appear on the same devices and browsers, except Firefox (I tried deactivating the same plugins on the main site and it made no difference so there is no plugin conflict).

    In addition, when I go to the browser settings on the phone, the Install option does not show on the main site (sentlive.com) but does show for the cloned site (staging.sentlive.com) on Chrome and Brave. With Firefox it does show that option on both but it doesn’t actually install the app, just adds it to the homescreen (no entry in the Apps list). I have compared the manifests and there is only one difference (other than the url) – in the main site file there is an additional line, “gcm_sender_id”: “482941778795” following “scope”: “https:\/\/sentlive.com\/”, – but having looked into this I don’t think that has any effect, but please let me know if I need to edit this.
    Having looked at the plugin files they are identical on both sites, as are the settings, except for the following, which I think might be the cause of the problem:
    The cloned site has this file – pwa-sw.js – in the root of the site, but it is missing on the main site. I had a look at it and it seems to relate to caching, but I think this file might have something to do with the fact that I have the OneSignal plugin deactivated on the clone but active on the main site (I can’t activate it on the clone without adding the clone site to OneSignal as well; it throws errors otherwise) – I have the compatibility option for OneSignal checked on both sites though. This is reflected in the first line of the pwa-register-sw.js file which is as follows in the two sites:
    Main site: var swsource = “https://sentlive.com/OneSignalSDKUpdaterWorker.js”;
    Clone site: var swsource = “https://staging.sentlive.com/pwa-sw.js”;
    Initially there were also some other major differences in these files, but I deactivated and deleted the plugin and reinstalled, and those differences were gone. I tried copying and adjusting the pwa-sw.js file for the main site, as well as the reference at the top of the pwa-register-sw.js file but this too hasn’t made any difference, so I have reverted to how it was.

    Finally, in an attempt to at least temporarily give users the chance to install the app (on mobile Android devices) I added a ‘ClickTo Install our Web App’ element with a class name of .webappinstall which I then put in the plugin settings in the Add To Home On Element Click section, but this does not work either.

    I tried deactivating Litespeed Cache but that made no difference. And in the Urls Exclude From Cache List I have https://sentlive.com/wp-content/plugins/litespeed-cache/guest.vary.php (this is on the clone site as well).

    I should mention that this is occurring regardless of whether it is the default or custom banner.

    I am at my wits end trying to work out what is causing this, so please can you help me fix it? It is of course possible that it is only my devices that are exhibiting this behaviour but I would like some confirmation of at least that – unfortunately I only have access to one Android phone (we all use iPhones) but given that the cloned site works there is something, somewhere in the main site that is causing this – both sites are on the same server – but I just don’t know what to look for or how to find it. I am guessing it might be some sort of javascript issue but I really don’t know.

    Please Help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter AWOL

    (@awol)

    I have managed to finally resolve this, although it does leave me with some questions. I inspected the site and the clone using Chrome DevTools, specifically the Application section, and firstly discovered that the browsers were not finding the manifest on the main site, and after some research found a suggestion to create a new manifest called site.webmanifest with the relevant info from the pwa-manifest.json. This has fixed the problem, but now makes me wonder why the plugin generated manifest file was not being detected (it was detected in the clone site), so any suggestions about this would be welcome. This has also fixed the issue with the Add To Home On Element Click.

    One other minor note is that I noticed that the pwa-manifest.json has all the ‘/’ characters escaped with ‘\’ which, according to a search I did on this, is not required in json files; the only text that needs to be escaped is ‘</’ according to what I read. I have not delved into the plugin files to find out if this is by design but I have to assume it is as the clone site is the same. Essemtially what I am saying is that you can get rid of the code that does this if you wanted to.

    Plugin Author Magazine3

    (@magazine3)

    Hi, thank you for reaching out to us. We are currently checking this concern and will provide you with an update shortly. We kindly request your patience in the meantime.

    Plugin Author Magazine3

    (@magazine3)

    Hi, We have released the new update version 1.7.70. Kindly update the plugin once with the new version, clear the cache once and retry. Please let us know if issue persist.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add To Homescreen banner not showing’ is closed to new replies.