Web Push Troubleshooting

Modified on Sat, 18 Mar 2023 at 09:14 AM

Web Push Notifications are informative, concise yet captivating pop-up messages, designed essentially to gain the website visitor's consent to convey product or service related offers, reminders, updates and promotions in the near future with the ultimate goal of converting the casual visitor to a regular customer. One advantageous aspect of Web Push Notifications from a marketing standpoint is that they can be sent to and displayed on a subscriber’s device even when the subscriber is not actively surfing the website. Additionally, since Web Push Notifications are browser, platform and device independent, they serve as a convenient communication channel to instantly grab the customer’s attention. However, there are common setup issues pertaining to Web Push Notifications for various web browsers such as Google Chrome, Mozilla Firefox, Safari etc. 

Before we begin delineating how NotifyVisitors makes it convenient to troubleshoot problems concerning Web Push Notifications, we will mention a few simple checks that you can make in case you are experiencing issues pertaining to the deployment and reception of notifications. These checks are as follows:

Check your browser’s settings

Make sure that you have allowed the website to send push notifications, and that you have not blocked notifications for the website. In most browsers, you can manage your notification settings in the ‘Privacy and security’ or ‘Permissions’ section of the settings menu.

Check the website's notification settings

Some websites have their own notification settings that you can access from the website itself. For example, you might be able to choose which types of notifications you want to receive, or you might be able to turn off notifications altogether.

Check your device's notification settings

If you are not receiving push notifications on your device, it could be because your device's notification settings are blocking the notifications. Check your device's settings to make sure that notifications are enabled for the website and for your browser.

Check your internet connection

If you are not receiving push notifications, it could be because your device is not connected to the internet. Ensure that your device is connected to the internet, and try again.

Clear your cache and cookies

Sometimes, clearing your browser's cache and cookies can help resolve issues with web push notifications. To do this, go to the ‘Privacy and security’ or ‘Advanced’ section of your browser's settings and click on the ‘Clear browsing data’ button.

Check for updates

Make sure that you are using the latest supported version of your browser since updating your browser to the latest supported version can often resolve issues with web push notifications.

How NotifyVisitors Makes It Convenient To Troubleshoot Problems Concerning Web Push Notifications

NotifyVisitors displays helpful error messages in your browser's Developer Tools Console when your website is being viewed with the NotifyVisitors code active. Kindly proceed as per the following steps to open the Chrome Developer Tools Console and check errors on your website:

  1. Visit your website which has NotifyVisitors integrated.
  2. Open the browser's Developer Tools Console by pressing the F12 button, or right-click within the browser’s window and click on the ‘Inspect’ option, or navigate to View > Developer > JavaScript Console.
  3. Subscribe to your website if you have not done so already and check for the following errors:

Error Messages

403 Or 404 Service Worker Installation Errors

[Service Worker Installation] Installing service worker failed TypeError: Failed to register a ServiceWorker for scope ('https://www.organizationwebsite.com/') with script ('https://www.organizationwebsite.com/...'): A bad HTTP response code (403) was received when fetching the script.

There is an error that usually occurs while trying to connect with the NotifyVisitors Service Worker files. Kindly check the link provided below in order to know how to fix this see: 403 & 404 service worker installation errors.


Redirects Are Not Allowed

The NotifyVisitors Service Worker files are being redirected but should be in the root directory and accessible. Check out CDN and Redirects.


Unsupported MIME Type Error

The NotifyVisitors Service worker files service-worker.js must be transferred with the MIME content-type application/javascript.


403 & 404 Service Worker Errors

When you subscribe to your website, and you see a 403 or 404 error in your browser’s console that means something is blocking the NotifyVisitors Service Worker files from being publicly accessible.

These files must be spelled with the upper case letters and not redirects. You should be able to visit these pages without any errors.

If you followed the Typical Setup or Custom Code Setup (HTTPS sites that do not use the NotifyVisitors Plugin), then you should be able to view them at: 

If you use NotifyVisitors WordPress Plugin, then you should be able to view them at:

Please make sure that you add these files correctly by following our Service Worker Setup.

In case you are still experiencing issues, then the common reasons for these being inaccessible are as follows:

CDN Issues or Redirects

Make sure that the service-worker.js is being served from the same top-level domain of your site. It cannot be served by a CDN or a redirect or a domain other than the domain the visitor is currently on. See the Same Origin Policy Guide for more details on this browser restriction.

WordPress Plugin Users see common CDN and Caching Plugins to fix this.
Non-WordPress users see our NotifyVisitors Service Worker FAQ if you cannot add the files to the root directory.

PWA or Multiple Service Workers

If you are integrating NotifyVisitors into a website with an existing service worker (like a PWA), you may have to merge service workers in order for NotifyVisitors to work correctly. See NotifyVisitors Service Worker FAQ for more details.

How Do I Check If My NotifyVisitors Service Worker Is Configured Correctly

In your browser's development tools, go to the Service Workers section (under the ‘Application’ tab in Chrome) and look for ‘service-worker.js’ as the source for the service-worker for your domain.

If you do not see the NotifyVisitors service worker there, then you have not configured NotifyVisitors correctly.

If you only see a different service-worker on your website, it may be causing a conflict with NotifyVisitors’ service-worker. Try merging the service-workers to resolve the issue.

Incorrect Site URL

In the NotifyVisitors panel, you can configure targeting rules / URL rules to deploy your web push notifications. Navigate to the NotifyVisitors Dashboard > Settings > Web Push, and click on the Targeting Rules tab in order to configure the rules. 

Note

Do not configure the targeting rules in case you want the permission prompt to appear on all the webpages of your organization’s website.

Within the Targeting Rules tab there exists a URL Rules section. 

The configuration settings within the ‘URL Rules’ section, allow you to precisely target your Permission prompts to specific web pages of your organization’s website. This is made possible by allowing you to define certain portions of a web address or keywords for which the URLs of all the web pages within your organization’s website will be searched and the push notifications will appear only on those URLs that satisfy a specific condition (URL Rule) associated with those predefined keywords. 

You can add as many keywords along with their associated conditions (URL Rules) as you like, by clicking on the ‘Add More Field’ button. Additionally, you can also choose whether all or any of the specified conditions associated with the defined keywords should be satisfied in order for the Web Push Notifications to get deployed.

However, for the successful deployment of your web push notifications, you need to ensure that the entire URL or portions of it mentioned within the URL field are absolutely correct. In other words:

  • There should exist no discrepancy between the URL mentioned within the panel’s URL field and the actual URL to which you want the Web Push to get deployed.
  • In case you enter a portion of a web address within the panel’s URL field, then that specific portion should exist as it is within the actual URL to which you want the Web Push to get deployed.

Incorrect Browser, Viewing Mode, Or Browser’s Version

  1. Make sure that you are testing with the latest version of Chrome or Firefox.
  2. Don’t use the incognito mode, private browser mode or guest browser mode or Mozilla Firefox's ESR versions, since subscriptions to push do not work in these modes.
  3. Apple currently still does not support Web Push Notifications on iOS mobile devices like iPhones and iPads. Currently iPhones and iPads can only get notifications from mobile apps, not from websites.

Supported browsers can be viewed in the Web Push FAQs.

My Site Isn't Working On My Mobile Phone

iOS - At present, Apple still does not support Web Push Notifications on iOS mobile devices like iPhones and iPads. For more information, please read our Blog Post.

Android - Web push works automatically on android mobile devices via a supported browser.

  1. First make sure that your site works on Desktop before testing it on the mobile platform.
  2. You may be subscribed on android already, but our dashboard does not differentiate mobile web subscribers from desktop web subscribers.
  3. Check if Notifications are enabled on Chrome and Firefox in your Android Settings > Application Manager > Chrome. Make sure ‘Show notifications’ is checked as shown in the images provided below:

  1. Clear the cache in your Chrome web browser. If your browser cache is full on mobile, this may not allow further prompting or subscription. See Clearing your cache and resetting push permissions based on your browser to test your site again.
  2. Some users reported that uninstalling Chrome and reinstalling it on the mobile device fixed an issue where subscription on the prompt would not work.

Safari Troubleshooting

  1. Apple Inc., at present does not support Web Push Notifications on iOS mobile devices like iPhones and iPads. For more information, kindly read our Blog Post.
  2. The icon you upload on the NotifyVisitors Dashboard > Settings > Web Push > Assets Tab must be exactly 200 X 200 px.
  3. The Site URL set in the Safari Config must be exactly what you see when visiting the website. For example, if you see https://www.organizationwebsite.com in the browser, then you must add this to the setup field. www and non-www sites have different origins.
  4. Safari 12.1 created a new rule that users must perform some action on the site before they can get prompted

You must use the Slide Prompt on Safari. This is why the slide prompt always appears before the native one, if you use our Typical Setup.

Usually in case of other browsers, the native browser permission prompt gets displayed by default upon page load. However, since Safari implemented a new rule i.e. the user must perform a certain action such as visit ten pages on the organization’s website, spend a certain amount of time on the company’s website etc. in order to get prompted, the permission prompt settings need to be tweaked or modified.

In such a scenario, a customized trigger to detect a specific user action needs to be set up, and then the following function needs to be called in order to display the permission prompt upon execution of the custom trigger.

Function:

If (typeof(_nv_data) !== "undefined") {   _nv_data.customPermissionBox();}

  1. Finally, try clearing your cache and resetting push permissions to see your site as a first-time user and try to subscribe again.

Safari Icons Or Site Name Not Changing

Due to Safari's custom web push implementation, your site name and icon image are treated as static resources downloaded and stored locally on the user's computer. New site names and new images are not updated or downloaded.

Unfortunately anyone subscribed with these older resources will need to clear your cache and reset push permissions and then return to the site to resubscribe.

Clearing Your Cache And Resetting Push Permissions

See clearing your cache and reset push permissions for more details.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article