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

PWA not available #852

Closed
benmccann opened this issue Jan 7, 2021 · 17 comments
Closed

PWA not available #852

benmccann opened this issue Jan 7, 2021 · 17 comments
Assignees
Labels
technical-support Support request

Comments

@benmccann
Copy link
Contributor

I've seen numerous references that PhotoPrism is a PWA. However, I cannot install it when I visit https://demo.photoprism.org. There does not appear to be a service worker available and I think that's why. I'm not sure if this is a feature that hasn't been developed and launched yet or the service worker broke somehow

@lastzero
Copy link
Member

lastzero commented Jan 7, 2021

We don't use service workers at the moment, but there is a manifest.json and you can just add it to your home screen (we plan to add a dialog for this later, so that the feature is more visible):

photo_2021-01-07_19-13-50

@lastzero lastzero added the technical-support Support request label Jan 7, 2021
@lastzero lastzero self-assigned this Jan 7, 2021
@lastzero lastzero closed this as completed Jan 7, 2021
@benmccann
Copy link
Contributor Author

Ah, okay. I think it's technically not a PWA without a service worker, so I was confused by the use of that term. But I did find the "Add to Home screen" button on mobile and that works for me. Thanks for the clarification!

@lastzero
Copy link
Member

lastzero commented Jan 7, 2021

Not that I am aware of. We can add a worker later, if that helps.

lastzero added a commit that referenced this issue Jan 8, 2021
@lastzero
Copy link
Member

lastzero commented Jan 8, 2021

@benmccann Just added a service worker for you 💐

@benmccann
Copy link
Contributor Author

I get the install prompt in Chrome now, which is kind of cool. Screenshot attached

Screenshot_20210108-104544

@lastzero
Copy link
Member

lastzero commented Jan 8, 2021

You're welcome!

@Sherlock1979
Copy link

I don't have the install prompt. Also in the Chrome menu I still see "Add to Home Screen" as opposed to "Install App".

I have forced stopped Chrome, emptied cache and reloaded the Photoprism page but did not help.

PhotoPrism® 210111-cc05c430-Linux-x86_64
Android on Samsung A51.

@lastzero
Copy link
Member

Are you loading photoprism via https using a valid certificate?

@Sherlock1979
Copy link

Yes. Nginx reverse proxy using let's encrypt certificate. (Talking to Photoprism through http.)

@lastzero
Copy link
Member

@Sherlock1979 Still having issues? Maybe clearing the cache helps:

On Desktop, the manifest is not automatically updated, but this is planned for a future update.

https://web.dev/customize-install/#criteria

@benplumley
Copy link

I came across this issue while trying to figure out why I couldn't install the PWA. For me, putting the server behind Caddy and setting up HTTPS was enough to make the "Install" button to appear in Firefox and Chrome's menus.

The information at https://docs.photoprism.app/user-guide/pwa#__tabbed_1_2 is slightly wrong - it says "Click Add to Home screen" to install the PWA. This actually just adds a bookmark, which opens in a full browser when tapped. When the criteria for PWA are met, there will be a separate button called "Install" underneath "Add to Home screen" which installs the PWA.

@lastzero
Copy link
Member

Yes, HTTPS is usually required unless you run it on the same host (if you install the PWA on a desktop computer). On Android, the results of "Install" and "Add to homescreen" are essentially the same.... I can't see any difference in functionality, only the icons are different and I think with "install" you can't edit the app name.

@lastzero
Copy link
Member

@graciousgrey will update our docs accordingly 👍

@benplumley
Copy link

benplumley commented Nov 26, 2022

On Android, the results of "Install" and "Add to homescreen" are essentially the same

In Firefox for Android, the results are quite different - Install installs a thing that has no browser chrome, whereas "Add to homescreen" adds a bookmark that opens in a regular browser tab with full browser chrome. I'd describe the former as a PWA and the latter as a bookmark. Chrome might does work differently though, they seem to be equivalent there.

@lastzero
Copy link
Member

I would assume that PWAs are always opened with Chrome while bookmarks will be opened in the browser that added them. Thus the difference if you don't use Chrome as your main browser. On iOS, even Chrome uses the Safari engine. Apple enforces this, they have no choice.

@benplumley
Copy link

I would assume that PWAs are always opened with Chrome

This doesn't seem to be the case on my phone (Mi 9T with MIUI12) - opening the PWA originally installed from Firefox, then opening its "App info" page from the switcher, opens the app info page for Firefox.

@graciousgrey
Copy link
Member

Docs have been updated: https://docs.photoprism.app/user-guide/pwa/#__tabbed_1_2 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical-support Support request
Projects
None yet
Development

No branches or pull requests

5 participants