Skip to content

Disconnecting from chromecast while video is playing produces an uncaught runtime error #7585

@HazardousPeach

Description

@HazardousPeach

This issue respects the following points:

  • This issue is not already reported on GitHub (I've searched it).
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Describe the bug

Basically what it says in the title. In the current master branch of jellyfin-web, disconnecting from a cast while a video is playing produces a big backtrace about player being null.

Reproduction Steps

  1. Clone the repository
  2. npm install && npm start
  3. Click the cast icon in the upper right and select a google chromecast device
  4. Start playing a video
  5. While the video is playing, click the cast icon in the upper right and click "disconnect"
  6. Error appears

Expected/Actual behaviour

I expect the app to disconnect from the chromecast without error, returning to a non-casting state where it is free to cast to other chromecasts. Instead, it produces a big runtime error backtrace across the entire app with three copies of the backtrace.

Logs

ERROR
player cannot be null
at PlaybackManager.self.getPlayerState (webpack-internal:///./components/playback/playbackmanager.js:2125:15)
at MediaSessionSubscriber.onMediaSessionUpdate (webpack-internal:///./apps/stable/features/playback/utils/mediaSessionSubscriber.ts:148:62)
at MediaSessionSubscriber.onPlayerChange (webpack-internal:///./apps/stable/features/playback/utils/mediaSessionSubscriber.ts:197:14)
at eval (webpack-internal:///./utils/events.ts:59:22)
at Array.forEach ()
at Object.trigger (webpack-internal:///./utils/events.ts:58:14)
at triggerPlayerChange (webpack-internal:///./components/playback/playbackmanager.js:244:61)
at setCurrentPlayerInternal (webpack-internal:///./components/playback/playbackmanager.js:1013:7)
at PlaybackManager.self.setActivePlayer (webpack-internal:///./components/playback/playbackmanager.js:876:9)
at PlaybackManager.setDefaultPlayerActive (webpack-internal:///./components/playback/playbackmanager.js:3981:12)

Server version

10.11.6-1

Web version

a30dd7e

Build version

a30dd7e

Platform

Linux

Browser

Chrome Version 144.0.7559.132 (Official Build) (64-bit)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions