Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of some PWAs prompts an error #318

Closed
Aleksandra0056 opened this issue Apr 3, 2023 · 5 comments
Closed

Installation of some PWAs prompts an error #318

Aleksandra0056 opened this issue Apr 3, 2023 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@Aleksandra0056
Copy link

Description

I think, that they can't be installed with the “Use the manifest for determining app properties” option enabled.

Error message:
Failed to parse web app manifest: expected value at line 1 column 1

Additional Information

Similar issue: #275

Affected Websites

https://apps.microsoft.com/
https://www.messenger.com/

Environment

  • Operating system: Windows 11 22621.1485
  • System architecture: 64-bit
  • Installation method: MSI
  • PWAsForFirefox extension version: 2.5.0
  • PWAsForFirefox native version: 2.5.0
  • Firefox version: 111.0.1
@Aleksandra0056 Aleksandra0056 added the bug Something isn't working label Apr 3, 2023
@filips123
Copy link
Owner

I can also reproduce this issue. I think it's similar to some problems with other sites (#315, #247), where websites respond with some random error page instead of the manifest when they see an unknown user agent. In this case, Microsoft responds with some HTML page for the "The request is blocked" error, and Messenger also with some HTML page that I haven't checked yet.

I'll check what I can do about this. In my opinion, websites shouldn't be doing this and it's completely their fault that they provide invalid manifests when they see unknown word in the user agent. I know such errors can be annoying, so I'll check if I can fix them, probably next week. Otherwise, I'll probably just create a list of known broken websites.

Also, sometimes I really don't understand some web developers. I try to be "responsible" by adding PWAsForFirefox to the user agent header, but considering it appears to cause so many problems, I might just remove it...

@filips123 filips123 added this to the 2.6.0 milestone Apr 7, 2023
@ItsRogueRen
Copy link

Bringing this error back up as now Crunchyroll (https://www.crunchyroll.com) is doing it when previously it worked just fine (and in fact on my desktop where a PWA is already installed, it continues to work just fine). However I cannot create a new PWA of it on my laptop running the same OS as my desktop (Nobara Linux, based on Fedora 38).

Error is the same one previous issues have mentioned of "Failed to parse web app manifest: expected value at line 1 column 1"

@filips123
Copy link
Owner

It seems requests made to crunchyroll.com from the native program are blocked by Cloudflare's protection page. What's interesting is that I tried doing basically the same request with curl, and it worked fine there, so maybe they're doing some more "advanced" detection that can differentiate between reqwest (HTTP client that PWAsForFirefox uses) and some other clients.

Because of this, this probably can't be fixed unless the website changes their detection algorithm.

You can try to disable "Use the manifest for determining app properties" when installing the website. Then, you will'be able to install it. However, requests for icons will still hit the same protection page, so icon probably won't work, unless you set your own.

@ItsRogueRen
Copy link

It seems requests made to crunchyroll.com from the native program are blocked by Cloudflare's protection page. What's interesting is that I tried doing basically the same request with curl, and it worked fine there, so maybe they're doing some more "advanced" detection that can differentiate between reqwest (HTTP client that PWAsForFirefox uses) and some other clients.

Because of this, this probably can't be fixed unless the website changes their detection algorithm.

You can try to disable "Use the manifest for determining app properties" when installing the website. Then, you will'be able to install it. However, requests for icons will still hit the same protection page, so icon probably won't work, unless you set your own.

That's a suitable workaround then, what kind of images are supported for the icons when setting your own?

@filips123
Copy link
Owner

filips123 commented Oct 22, 2023

Most common formats are supported (such as PNG, JPG, ICO, GIF, SVG). It's recommended to be a square icon around 128x128 px in size, although this isn't strictly required. However, one requirement is that the icon should be on an accessible URL. So, the easiest way to get Crunchyroll icon would be to search if there is already any suitable icon available online. Maybe this will be fine.

You can also try to reinstall Crunchyroll with the manifest option enabled in the future, as those "protections" can change, so it's possible that it will get unblocked in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants