nextcloud / nextcloud/viewer

Public Share Links keeps loading for viewer: 5.0.0-dev.0

Open
#3,050 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug
Dominant language
JavaScript
Stars
119
Forks
72
Avg merge
18h 42m
Merged PRs (30d)
24

Description

Infinite top-loading spinner on public share links, /s/undefined on download


Description

When sharing a folder via a public link in Nextcloud, visiting the link results in a continuous top loading spinner:

  • The loading circle appears, stops briefly, then reappears indefinitely.

  • In the top-right corner, the cross and three-dot menu are clickable.

  • Clicking three-dot menu gives two options "Full Screen" and "Downlaod"

  • Refreshing the page reproduces the same issue.

This behavior occurs regardless of whether the request is made via internal IP/port — it is not caused by NPM or reverse proxy settings.


Steps to Reproduce
  1. Visit my public share link at https://cloud.pri.al/s/oXSsjP7KbkTMW9J
  2. Observe the top loading spinner looping indefinitely.
  3. Click the Download option in the top-right three-dot menu — observe the s/undefined URL.
  4. Click the Cross in the top-right — the spinner disappears and content becomes accessible.

Browser console error

Could not open file / TypeError: can't access property "split", n is undefined
    openFileInfo Viewer.vue:720
    openFile Viewer.vue:669
    file Viewer.vue:459
    VueJS 11
        Eu
        run
        Jg
        Yn
        Eo
        promise callback*ys
        Yn
        Pi
        update
        notify
        set
    open Viewer.js:319
    openWith Viewer.js:353
    o main.ts:171
    v main.ts:400
    X main.ts:209
    E main.ts:428
    X main.ts:208
    z main.ts:62
    <anonymous> main.ts:477
Viewer.vue:680:1
    openFile Viewer.vue:680
    file Viewer.vue:459
    VueJS 11
    open Viewer.js:319
    openWith Viewer.js:353
    o main.ts:171
    v main.ts:400
    X main.ts:209
    E main.ts:428
    X main.ts:208
    z main.ts:62
    <anonymous> main.ts:477

Environment
  • Nextcloud version: 32.0.3 (docker: linuxserver/nextcloud:latest)
  • Apps causing this issue is viewer: 5.0.0-dev.0
  • rm -rf viewer from /app/www/public/apps/directory fixes the issue but I lost file preview functionality.

Additional Context / Notes
  • The bug appears only on public shared folders; internal accounts and authenticated users are unaffected.
  • Previous instances of DEV app viewer 5.0.0-dev caused the spinner to behave similarly.
  • Removing incompatible DEV apps temporarily resolved the spinner, but restoring the viewer folder from a clean container brings the preview functionality back, reintroducing the spinner.
  • Likely cause: viewer code attempts to access undefined file IDs in public shares when certain optional apps are missing or incompatible.

Suggested Investigation
  • Examine viewer public share logic in Nextcloud 32, particularly how it handles fileId when no previewing app is installed or when optional apps like files_downloadlimit are removed.
  • Prevent undefined.split() errors in Viewer.vue for public links.

This bug is reproducible consistently on fresh docker containers with only stable apps installed.

Thanks

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 by reproducing the public shared-folder link and reading Viewer.vue around openFileInfo (line 720) and openFile (lines 669-680), using the reported undefined.split() stack trace. Trace how the file ID reaches the public-share viewer and verify the spinner stops, browsing remains usable, and Download no longer opens an s/undefined URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.