Comments

zenimagine created an issue. See original summary.

alexborsody’s picture

Status: Active » Closed (works as designed)

That start_url isn't right it should start with a /

zenimagine’s picture

@AlexBorsody Thank you, I made the change but I still have the mistake

start_url does not respond with a 200 when offline
Timed out waiting for fetched start_url.

christophweber’s picture

Please be sure to delete your existing service worker.

zenimagine’s picture

@ChristophWeber I just change the number of "Cache version" but I still have the error

zenimagine’s picture

Here is my site if you want to test (it is not in English)

https://www.s1biose.com/fr

zenimagine’s picture

Status: Closed (works as designed) » Active
rupl’s picture

When I look at the URL, it appears that slashes inside manifest.json are being escaped when they don't need to be:

{
  "name": "S1BIOSE",
  "short_name": "S1BIOSE",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#8aba12",
  "description": "Vivre sain - Vivre bien",
  "lang": "en",
  "icons": [
  {
    "src": "s1biose.com\/sites\/default\/files\/pwa\/logo-petit-512x512_1.png",
    "sizes": "512x512",
    "type": "image\/png"
  },
  {
    "src": "s1biose.com\/sites\/default\/files\/pwa\/logo-petit-512x512_1.pngcopy.png",
    "sizes": "192x192",
    "type": "image\/png"
  },
  {
    "src": "s1biose.com\/sites\/default\/files\/pwa\/logo-petit-512x512_1.pngcopy2.png",
    "sizes": "144x144",
    "type": "image\/png"
  }],
  "start_url": "\/",
  "scope": "\/"
}
zenimagine’s picture

@rupl I do not understand, what should I do to correct? I also have a lot of problem with the logo because the module does not create the right path https://www.drupal.org/project/pwa/issues/3070050

rupl’s picture

Status: Active » Needs review
StatusFileSize
new361 bytes

I wasn't recommending an immediate solution, but wanted to point out that the manifest.json seems to be outputting malformed values for start_url and the URIs for icons.

When I read the docs for json_encode I see in the $options the possibility of setting JSON_UNESCAPED_SLASHES. I believe this would fix the problem.

Can you try this patch and see what happens?

rupl’s picture

StatusFileSize
new354 bytes

Sorry, I read the docs wrong and the array() was unnecessary. New patch in this comment.

zenimagine’s picture

Status: Needs review » Active
StatusFileSize
new123.57 KB
new171.5 KB

@rupl Thank you, I applied the patch but no change

rupl’s picture

Status: Active » Needs work

Buddy you gotta read how issue statuses work please.

zenimagine’s picture

@rupl It is very surprising that I am the only one to have these problems. Why is the path to the logo not a Uri ? What does the domain name do in the way ? I feel that this module has never been tested on a domain name.

zenimagine’s picture

Before installing this module, I had my own file at the root with this data and no problem. But I miss him the service worker :

{
  "name": "S1BIOSE",
  "short_name": "S1BIOSE",
  "description": "Vivre sain - Vivre bien",
  "theme_color": "#8aba12",
  "background_color": "#ffffff",
  "display": "standalone",
  "orientation" : "any",
  "Scope": "/",
  "start_url": "./?source=pwa",
  "icons": [
    {
      "src": "themes/custom/bootstrap_subtheme_front_office/images/logo-petit-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "themes/custom/bootstrap_subtheme_front_office/images/logo-petit-512x512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ],
  "splash_pages": null
}
rupl’s picture

@zenimagine you're right, this module has been tested on very few production websites. We just released the first beta a few days ago, which seems to be what brought you here. It's not a stable module yet, so it puzzles me you have such high expectations.

We appreciate all testing and feedback, but (as with the rest of Drupal) it comes with the standard disclaimer that you're using free, open source software with absolutely no warranty. If you want every problem fixed immediately, you can speed the process by providing patches, or you can hire either myself or another maintainer for contract work.

zenimagine’s picture

This module should be in alpha

christophweber’s picture

The escapes for slashes bug me. That's not coming from the pwa module, but from other code that outputs JSON. You have schema_metatag module in play per https://www.drupal.org/project/pwa/issues/3070050 which, if I recall correctly, escapes slashes in its output JSON-LD. Reviewing that now, but if you could please disable schema_metatag and report back whether the problem with your manifest persists.
My hunch is that various modules are overly global or generic while hooking into the JSON filtering and output process, including perhaps us here.

christophweber’s picture

That said, rupl is right, you need to realize that this module is in heavy development at the moment, and also that this project is run by volunteers who may or may not get paid by a company to maintain community projects. If our company were to bill for our time put into here the invoice would be fairly substantial already.

In the meantime thank you for the time you have put in testing, and reporting and documenting issues.

rupl’s picture

Category: Bug report » Support request
Status: Needs work » Postponed (maintainer needs more info)

oh what? if this isn't being tested on a clean install it's not even a bug report yet. this is support, plain and simple.

@zenimagine please install the D8 PWA module on a clean install of D8 and see if the problem persists. Until then this is a support request and we can safely de-prioritize. Please do not reclassify the Priority or Status until you have reproduced on a fresh D8 install that includes no other modules.

alexborsody’s picture

Try this patch on the latest dev.

alexborsody’s picture

StatusFileSize
new1.03 KB
alexborsody’s picture

Status: Postponed (maintainer needs more info) » Needs review
zenimagine’s picture

@AlexBorsody Sorry, I applied the patch on the latest version dev, but still the same problem.

rupl’s picture

Version: 8.x-1.0-beta1 » 8.x-1.x-dev

So one question: you have configured the SW to cache your start URL, correct? Overall I'm wishing you would provide more information we could use to provide support. Simply telling us that it didn't fix your support request gives people very few options in terms of next steps.

zenimagine’s picture

@rupl I kept the default configuration.

alexborsody’s picture

StatusFileSize
new436.86 KB

Visiting your site now I see start_url is loading and no errors.

zenimagine’s picture

StatusFileSize
new241.58 KB

@AlexBorsody Hello, yes it's true since the logo patch is applied. If you make an "audit" there is the error

alexborsody’s picture

Status: Needs review » Postponed (maintainer needs more info)
alexborsody’s picture

Status: Postponed (maintainer needs more info) » Fixed

Ok so I am implementing this on a site now with a similar redirect to you and got the same error, the reason this is showing is that you are using / as the start URL and it should be /fr (in your case), or wherever your page is redirecting to. When Chrome is doing the Lighthouse testing this is registering as a redirect.

alexborsody’s picture

Status: Fixed » Closed (fixed)
alexborsody’s picture