nextcloud / nextcloud/server

Can't add public link to home screen on Android due to PWA manifest pointing to login page

Open
#34,901 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: sharing
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
  1. Create a public link
  2. Open the public link on Chrome on Android
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.