Skip to content

[stable35] fix(viewer): skip duplicate handlers on init - #3457

Merged
skjnldsv merged 2 commits into
nextcloud:stable35from
bulungasdeveloper:fix-viewer-duplicate-handler
Oct 21, 2026
Merged

skjnldsv merged 2 commits into
nextcloud:stable35from
bulungasdeveloper:fix-viewer-duplicate-handler

Conversation

@bulungasdeveloper

Copy link
Copy Markdown

Summary

The viewer initializes the service, which registers the built-in handlers, and then replays the handlers queued before it loaded. That replay did not check whether a handler was already registered, so built-ins queued by other apps were registered twice and logged "already registered" errors.

Skip handlers that are already in availableHandlers. Viewer.vue already does this when it mounts; this change covers the earlier synchronous init path in src/init.ts.

Testing

  • Manual: open the viewer from Files; no "already registered" errors in the browser console; images and videos open normally.
  • No unit tests in this app; the existing Playwright e2e suite covers viewer behavior.

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI: code drafted with opencode/DeepSeek V4.1 Flash Free, reviewed and tested manually.

The viewer initializes the service, which registers the built-in
handlers, and then replays the handlers queued before it loaded. That
replay did not check whether a handler was already registered, so
built-ins queued by other apps were registered twice and logged
"already registered" errors.

Skip handlers already in availableHandlers. Viewer.vue already does
this when it mounts; this covers the earlier synchronous init path.

Assisted-by: opencode:DeepSeek-V4.1-Flash-Free
Signed-off-by: Braux Martinez <martinezjb@hitss.com>
Signed-off-by: Braux Martinez <martinezjb@hitss.com>
@bulungasdeveloper bulungasdeveloper changed the title fix(viewer): skip duplicate handlers on init [stable35] fix(viewer): skip duplicate handlers on init Oct 21, 2026
@skjnldsv

skjnldsv commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

/backport to stable34

@backportbot backportbot Bot added the backport-request Pending backport by the backport-bot label Oct 21, 2026
@skjnldsv

Copy link
Copy Markdown
Member

/backport to stable33

@skjnldsv skjnldsv added bug Something isn't working 3. to review Waiting for reviews labels Oct 21, 2026
@skjnldsv
skjnldsv merged commit 3820425 into nextcloud:stable35 Oct 21, 2026
19 of 21 checks passed
@backportbot backportbot Bot removed the backport-request Pending backport by the backport-bot label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants