Add To Homescreen banner not showing
-
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!
- The topic ‘Add To Homescreen banner not showing’ is closed to new replies.