Manifest JSON not displaying Add to Home Screen prompt

I am trying to implement the prompt for adding to the home screen using manifest.json, but I am facing an issue where the prompt is not showing up even though my PWA score in the audit is 100%.

Below is the structure of my dist folder:

https://i.sstatic.net/yEkuN.png

My Manifest JSON looks like this:

{
  "name": "xyz",
  "short_name": "xyz",
  "icons": [
    {
      "src": "/xyz/static/img/icons/xy-icon-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "/xyz/static/img/icons/xy-icon-512x512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ],
  "start_url": "xyz/index.html",
  "scope": ".",
  "display": "standalone",
  "background_color": "#0628b9",
  "theme_color": "#000000"
}

I am using the Workbox plugin for the service worker, and I have also tried with a normal service worker as shown below:

sw.js

var VERSION = '20';

self.addEventListener('install', function(e) {
  e.waitUntil(caches.open(VERSION).then(cache => {
    return cache.addAll([
      'https://cfjedimaster.github.io/nomanssky/client/index.html'
    ]);
}))
});

// Rest of the service worker code ...

Even though my PWA score in Lighthouse is 100%, I am unable to see the prompt to add to the home screen. https://i.sstatic.net/9vOFd.png

If anyone has any insights or suggestions on how to resolve this issue, it would be greatly appreciated.

Answer №1

During the process of testing and debugging Add to Home Screen (A2HS) functionality, a significant amount of time is spent removing previous tests and installations repeatedly. Browsers are designed to remember previous actions in order to avoid bombarding the user with installation prompts, which can make it challenging to see the prompt again. Completely clearing the browser cache may be necessary to trigger the prompt once more.

If a user has previously declined an installation prompt, they will not be asked again for a specific period of time. Additionally, if the user has already installed the application, the prompt should not reappear.

There are a few specific actions to consider:
-- in Desktop Chrome
-- Remove icon from chrome://apps/
-- If that does not work, you may need to clear the cache

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The URL not functioning properly after including the .active class with JQuery

This website is built on the Shopify platform. To highlight an active link in a subcategory list, I am using JQuery and CSS to add the .active class to the element. However, after adding the JQuery code, the link element is not functioning properly and d ...

How can I showcase the selected file using jQuery's querySelector?

I have successfully implemented a file upload feature using jQuery querySelector. Now, I am looking for a way to display the selected file name in a span element after the user selects the file. Here is my HTML code: <span id="filename"></span&g ...

Uncovering the Issue with Select All Functionality in <Table/> when using Material-UI and React

When using Material-UI's <Table/> with ReactJS, a table is set up with a select all checkbox. Each time an individual row checkbox is clicked, the row id is added to the state array clickedRowIds. This allows for logging of the ids of the clicke ...

Exploring Nuxt.js: A guide to server-side caching of axios calls for universal client access

I am currently working on a project using Vue and Nuxt.js. I am wondering if there is a way to cache an axios web service call for all clients. Specifically, I need to retrieve currency reference data and it seems inefficient for every client to make this ...

Encountering 404 Error in Production with NextJS Dynamic Routes

I'm currently working on a next.js project that includes a dynamic routes page. Rather than fetching projects, I simply import data from a local JSON file. While this setup works well during development, I encounter a 404 error for non-existent pages ...

Is it possible to use an onclick function to input JavaScript values into a password entry box seamlessly?

Is there a way to input password values continuously using a JavaScript onclick function into a password field? I have two images, one 'Blue' and one 'Red', that trigger an onclick function with the following values: Blue= w3! Red= T4 ...

JavaScript's Ajax request seems to be stagnant and inactive

Having some difficulties with the code below. It triggers an alert correctly, but the ajax part doesn't seem to be functioning. No errors or indications of what's wrong. $(document).on('change', '.department_select', function ...

Trigger jQuery when a breakpoint has been met

I am working on a responsive design that has multiple breakpoints. Within the content, some block dimensions are calculated using jQuery. Whenever the viewport changes, these dimensions also change and therefore the calculation needs to be re-run. How can ...

How to assign a value to a component variable using props in Vue.js

I am attempting to assign a props value to my component variable. Below is the code I'm working with: export default { props: { // eslint-disable-next-line vue/require-default-prop multiPaginatedTableTitle: { type: Stri ...

Track the number of views each month using PHP and MySQL to generate dynamic jQuery charts

I am currently utilizing jQuery with chart.js to display the view counter based on month using PHP and MySql. Each page view is inserted into MySql in the following format : | id | ip | page | date(timestamp) | | 1 | 138.86.20.20 | test.p ...

Activate expansive pop-up windows with primeng's dynamic dialog feature

In my Angular web application, I am using the PrimeNg modal extension to display modal popups. I have successfully passed a component to the modal service with the following code: const ref = this.dialogService.open(LogsComponent, { data: { ...

Having trouble with transferring JSON data as a string from POSTMAN to a node server

My JSON data structure is as follows: const json = { "name": "Peter", "age": 21 } After calling JSON.stringify(json), the result is: '{"name":"Peter","age":21}' I am currently us ...

The jQuery prop method seems to be malfunctioning

Here is the HTML code snippet: <ul class="expander-list" id="category"> <li> <div class="radio" style="padding-left:0px"> <label> <input type="checkbox" id="all" ...

Animate out Material UI element with zoom effect and then remove it from the

I'm currently working on a dynamic user interface that allows for adding and removing items dynamically. Each item has both an add and remove button, with a special animation effect using Zoom. While this works smoothly when adding new items, I encoun ...

Creating first-person shooter game controls using Three.js in JavaScript

I am currently in the process of creating a small 3D FPS Game using Three.js, but I am in need of assistance with the controls. To better illustrate what I am aiming for, please watch this video to see the desired controls in action (only the controls, no ...

formik does not support using the "new Date" function as an initial value

I have been trying to set the initial value of a date in my component like this, but when it renders I am encountering an error. const formik = useFormik ({ initialValues: { dob: new Date () } }) During this process, I'm facing the follow ...

How to implement a Typescript interface without necessarily implementing the parent interfaces

Within my current project, I have defined the following interfaces: interface foo { fooProperty: number; fooFunction(): void; } interface bar extends foo { barProperty: string; barFunction(): void; } Now, I am interested in creating a class like ...

Display the checkbox as selected using AngularJS

I have already submitted a form with a checkbox value. Now, I am trying to display the checkbox as "checked" using AngularJS based on the value retrieved from the data source. Can someone guide me on how to achieve this? ...

Inverting the order of vertices in a THREE.js face

I am seeking a way to reverse the order of vertices in faces within my geometry. For instance: // create geometry var geometry = new THREE.Geometry(); // create vertices geometry.vertices.push( new THREE.Vector3( 0, 0, 0 ) ); geometry.vertices.push( ...

Sending user input from an input field to a Node JS backend using AJAX for implementing typeahead feature

Implementing a typeahead functionality can be quite challenging, but with the right code, it can be achieved effortlessly. Here is an example of the HTML page: ... ... <input id="product" name="product" type="text" class="form-control" placeholde ...