nextcloud / nextcloud/spreed

Joining call fails with 404 after long inactivity (app & browser)

Open
#19,218 9 comments 1 reaction 1 assignee View on GitHub

@Antreesy is already working on this.

Since Aug 31, 2026.

bug feature: call 📹 feature: signaling 📶 Needs triage
Dominant language
PHP
Stars
2.2k
Forks
587
Avg merge
18h 27m
Merged PRs (30d)
333

Description

[!TIP]

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Open Talk in browser, do NOT join a call
  2. Wait 2+ minutes, sometimes one day, sometimes over the weekend
  3. Click "Join Call"
Expected behaviour

Call joins successfully

Actual behaviour

Error dialog "Please reload the page" or silent failure with infinite loading spinner (more often than Please reload page)

Current fix

Reloading the page or the app (STRG+R or CMD+R) manually. This solves the problem 100%, but it's not a behaviour users expect these days.

Talk app

Talk app version: 23.0.10 (also reproduced in v24.0.4, main)

Custom Signaling server configured: yes, nextcloud-spreed-signaling v2.1.1

Custom TURN server configured: yes

Custom STUN server configured: yes

Browser

Microphone available: yes

Camera available: yes

Operating system: macOS/Windows (not tested on Linux)

Browser name: Chrome/Firefox/Brave

Browser version: Latest

Browser log
POST /ocs/v2.php/apps/spreed/api/v4/call/{token} 404 Not Found

Error while joining call: Error: Request failed with status code 404

Server configuration

Operating system: Linux (k3s cluster)

Web server: Traefik v3.6.12

Database: PostgreSQL

PHP version: 8.3

Nextcloud Version: 33.0.5

List of activated apps:

spreed (Talk 23.0.10)
user_oidc 8.11.0 --> Keycloak
notify_push
and others

Nextcloud configuration:

signaling_servers:
  - server: https://hpb.example.com
    secret: ***

turn_servers:
  - server: turn.example.com
  - server: turns.example.com

stun_servers:
  - stun.example.com
Server log (data/nextcloud.log)
Session expires after 60s inactivity. Room session not found on join attempt.
WebSocket timeout on pongWait=60s. Backend room session removed from state.

Additional Context

Root Cause:
WebSocket times out (pongWait=60s) → signaling session expires (30s resumption window) → backend room session expires → client calls joinCall() → no session exists → 404

Code Location:

  • Issue: src/store/participantsStore.js line 779-785 (catch block with no 404 handler)
  • Signaling timeout: nextcloud-spreed-signaling/client/client.go:52 (pongWait=60s)
  • Session expiry: nextcloud-spreed-signaling/server/hub.go:119 (sessionExpireDuration=30s)

Proposed Fix:
Add automatic retry logic on 404 error (26-line fix in catch block). Wait 500ms, retry join. If succeeds: transparent recovery. If fails: show original error.

Testing:
✅ Unit tests: 4/4 scenarios pass
✅ Browser test: automatic recovery confirmed in console logs
✅ Versions affected: v23.0.10, v24.0.4, main

However, proper testing on NC side is still required.

Related Code Change:
File: src/store/participantsStore.js lines 779-810

} catch (e) {
    if (e?.response?.status === 404 && state.joiningCall[token]) {
        console.info('Room session expired after inactivity, attempting automatic recovery...', { token })
        await new Promise(resolve => setTimeout(resolve, 500))
        try {
            const actualFlags = await joinCall(token, flags, silent, recordingConsent, silentFor)
            const updatedData = { inCall: actualFlags }
            commit('updateParticipant', { token, attendeeId: attendee.attendeeId, updatedData })
            const callViewStore = useCallViewStore()
            callViewStore.handleJoinCall(getters.conversation(token))
            console.info('Automatic recovery succeeded')
            return
        } catch (retryError) {
            e = retryError
        }
    }
    finishConnecting()
    console.error('Error while joining call: ', e)
}

If this is an issue no one else has, I will resume finding the error in our configuration. But many hours of searching were not successful.

Best regards

PS: Nextcloud is a great app :)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.