无法获得“安装"PWA 的选项 [英] Unable to get the "Install" option for the PWA

查看:152
本文介绍了无法获得“安装"PWA 的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的网站设为 PWA 并将 ServiceWorker 集成到其中.ServiceWorker 已正确注册,因为我能够看到离线"能力.

问题是我无法获得安装"用于安装 PWA 的按钮.

我已按照与 pwa-install 软件包相关的说明进行操作,但仍然无法正常工作.

我还为此打开了一个 Github 问题,其中包含更多详细信息和屏幕截图:

你提到你已经有一个 Service Worker.现在处理您的清单文件并将流量重定向到 https(而不是 http),这是您的应用可安装的最低要求.

在您的网站中:

I am trying to make my website as PWA and got the ServiceWorker integrated into it. The ServiceWorker is registered properly as I am able to see the "offline" capabilities.

The problem though is that I am unable to get the "Install" button for installing the PWA.

I have followed the instructions related to pwa-install package, but still it doesn't work.

I have also opened a Github issue for the same which has more details and screenshots:
https://github.com/pwa-builder/pwa-install/issues/355

Any help here would be appreciated. Thanks in advance.

解决方案

I suggest you use Lighthouse tool in Chrome developer tools. Simpy navigate to Lighthouse tab then check "Progressive Web App". This will outline details on what you are missing.

You mentioned you already have a Service Worker. Now work on your Manifest file and redirect traffic to https (not http) as minimum requirements for your app to be installable.

In your website: https://www.kcak11.com/, As of this writing - 14 July 2020 9:33 pm (PST), The PWA configuration errors are as follows:

  • The Manifest file has an error: display value is not one of: minimal-ui | fullscreen | standalone
  • start_url does not respond with a 200 when offline. The start_url did respond, but not via a service worker
  • Is not configured for a custom splash screen. Failures: Manifest does not have background_color

Lighthouse already provides some tips (via Learn More link) to fix these issues. Fix these issues and your PWA will be installable.

Below is a sample optimal result of a PWA Lighthouse report (using my PWA website):

这篇关于无法获得“安装"PWA 的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆