Can't add public link to home screen on Android due to PWA manifest pointing to login page
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
Trying to add a public link to the home screen does create the icon, but clicking on it opens the login page instead of the original public link.
Also, its name is "Nextcloud" and makes one believe that it's the Android client that got installed, even though it's a PWA wrapper that points at the root URL.
Steps to reproduce
- Create a public link
- Open the public link on Chrome on Android
- In the three dots menu of the browser, click "Add to home screen" with the intend to create a shortcut there
Expected behavior
Whatever shortcut is created on the home screen must point at the public link.
Installation method
No response
Operating system
No response
PHP engine version
No response
Web server
No response
Database engine version
No response
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
N/A
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
Maybe we should remove all the PWA metadata (like manifest) when on public link pages ?
Or if we keep the manifest, change its start URL from "../.." to "." so that it points to the public link, and adjust the title accordingly ?
Ref https://github.com/nextcloud/server/blob/master/core/img/manifest.json#L3
@skjnldsv @CarlSchwan thoughts ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with core/img/manifest.json and reproduce the Android Chrome “Add to home screen” flow using a public link. Check how that manifest is applied on public-link pages; the work is done when the created shortcut opens the original public link and uses an appropriate name rather than the root login page or generic Nextcloud label.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100