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: Automatic screen orientation does not work in Chrome on Android #3413
Comments
We have tested this on Android 11 and 12 - there it works properly. It may be related to the Android version or the phone itself. Has anyone else experienced this? |
Maybe other Android users could help us test this, e.g. on their own device or using an emulator on a desktop computer? 🤖 |
My wife just purchased the Galaxy S23+ with Android 13, it is showing the same behavior as my original post when installed as PWA in Chrome. As said, it works fine when using it directly in chrome without installing the app. So two different manufacturers but both on Android 13 - so perhaps an issue in Android 13? |
Screen Orientation is working fine in my Samsung M31 - Android 12 |
I have no idea what PhotoPrism is, but I had a client just report a bug on one of my products (a PWA), and I ended up on this thread. Here's what I found.
In summary, I can't get any PWAs to rotate on my Pixel 6 Pro (yes, Auto-rotate is on). I don't think this is specific to PhotoPrism, but, it also doesn't seem to be a Android 13 issue either. As far as I can tell at the moment it's specific to Android 13 and "some" devices. I'm not sure this is very helpful though. Note. On my Pixel 6 Pro. web site rotates in chrome, after installing the PWA, the app DOES rotate. If I then kill the app, and open it again, this is when if fails to rotate. |
Forget about Android versions - what about Chrome versions? |
Chrome version was the same across the two Pixel devices. Sorry, typo in my post, was meant to say "same Android and Chrome as mine"
…On Wed, 31 May 2023, 11:55 dror3go, ***@***.***> wrote:
Forget about Android versions - what about Chrome versions?
—
Reply to this email directly, view it on GitHub
<#3413 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQS5GHX36PG6HNEBVZX5HWTXI4PQVANCNFSM6AAAAAAYFVERBA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I can confirm this and it's not due to wrong manifests. By default (without an 'orientation' entry in manifest), the PWA should accept the device's orientation while respecting orientation lock. Setting any orientation value in the manifest will ignore rotation lock, which appears to be intentional. Firefox PWA appears to behave correctly. |
I can confirm also - Photoprism installed as PWA from Chrome does not allow to rotate screen no mater what. And as a workaround I've tried installing PWA from Firefox - and that works! Thanks @spuxx1701 for the tip! |
Pretty sure it's an upstream issue with Chrome not behaving according to the spec |
I've removed the "bug" label for now as it's unclear if/how we can fix this on our side. Let us know when you have other information. |
I restarted the phone, and now it doesn't work anymore. I have closed and minimized the app before and it worked fine. |
@mariokandut That makes sense, since the manifest file cannot be excluded from caching: So if there is a problem or we have improved it, there may be no other way than to delete and reinstall the PWA. |
I updated Chrome to latest and reinstalled the PWA but it does not work for me still. |
I ran into same problem and found that the solution is to remove the id option from the manifest file. Mine currently has name, short_name, scope, icons, start_url, display, and orientation. I have full orientation control with chrome for android with the id option removed. With it, the orientation option is ignored and is locked in portrait. |
@ssratma Which "id" option? These are the manifest values that our backend currently returns and there's no "id" option here from all I can see: photoprism/internal/pwa/manifest.go Lines 11 to 22 in 7197d6b
|
Hello, please tell me how you solved the problem with rotating the screen in PVA on version 13 of Android? |
As far as I know it hasn't been solved yet as it seems to be an upstream issue with Chrome. Edit: Removed and re-installed the PWA to test just now, and it's not working with latest Chrome still. |
@Beet4 Thank you |
Lastzero, sorry for delay in answer. I do not use this PWA specifically, and was google searching issues to resolve my own PWA. After looking at your discussion, it may be necessary to add an "orientation" value of "any" (you could use a set of values to lock orientation to a specific [one). Hopefully this helps resolve your issue. |
Signed-off-by: Michael Mayer <michael@photoprism.app>
@ssratma Thanks! I've changed this and started a new preview build for testing the changes. Any help with this is much appreciated, see https://docs.photoprism.app/getting-started/updates/#development-preview. |
Can confirm this, |
@lastzero Tested :preview |
@Massi-X Thanks for sharing your research! Would it still be ok to use "any" in our upcoming release? We can change it to "default" later if that provides a better experience and is supported by all devices. |
I don't really know if default it's a valid value because MDN doesn't quote it, needs to be tested. |
Hello guys! Does anyone know the place where this issue is to be reported - it could be a bug in Android or Chrome - Android. Cheers! |
@JhonnyJason If you are unsure about the exact cause of a problem, it is best to discuss it here first (or in a generic Android/Chrome forum): https://github.com/photoprism/photoprism/discussions For example, if installed apps are still having issues, you may need to remove and reinstall them, because the file containing our fix is cached by the operating system (in this case Android) and there is nothing we can do to clear this cache for you. |
@lastzero Thanks for the fast reply. However my problem is unrelated to Photoprism. So I'm sure it is off-topic here^^. However I thought you or somebody here might know the place where to report it - I'm not sure about if chromium, or the Android open Source Project are really the right place... There is definitely a bug in Chrome Android on Android 13 |
@JhonnyJason i suggest the |
@Massi-X Reported! |
1. What is not working as documented?
Running Android 13 on OnePlus 8 Pro and latest PhotoPrism as PWA in Chrome 113.0.5672.76.
The PWA does not rotate the screen when screen rotation is unlocked in the phone. Starting a video in fullscreen forces the PWA from portrait to landscape. After closing the video the PWA rotates as expected. After completely closing the PWA and re-opening it again screen rotation no longer works again.
It works fine if I open PhotoPrism normally in Chrome for Android. Other PWA in Chrome rotates as expected.
2. How can we reproduce it?
Steps to reproduce the behavior:
When reporting an import, indexing, or performance issue, please include the number and type of pictures in your library, as well as any configuration options you have changed, such as for thumbnail quality.
3. What behavior do you expect?
PhotoPrism PWA to rotate when screen orientation is set to automatic in the OS.
The text was updated successfully, but these errors were encountered: