[GH-ISSUE #1206] Playback error when trying to log in #685

Closed
opened 2026-02-26 02:33:57 +03:00 by kerem · 3 comments
Owner

Originally created by @mncn on GitHub (Apr 11, 2020).
Original GitHub issue: https://github.com/koel/koel/issues/1206

Sometimes when I try to login I get the message:
TypeError: Cannot read property 'media' of undefined

referring to this line at playback.js
this.listenToMediaEvents(this.player.media);

It's weird 'cause it's not every time. Sometimes it works and I'm able to login, sometimes it doesn't and it shows this message.

A few times I'm actually able to login but nothing is loaded, it seems like the event KOEL_READY is not fired (I force it to test it inside the albums-list.vue and it worked).

Usually when it happens, the 2nd time I try I'm able to login.

As far as I checked, that happens 'cause the:
this.player = plyr.setup({
controls: []
})[0]

returns undefined for this.player.

any ideas?

Environment

  • Koel v4.2.2
  • OS: macOS Catalina
  • Brave 1.5 (shields down)
  • PHP version 7.2.1
  • Node version 12.7

Thanks!

Originally created by @mncn on GitHub (Apr 11, 2020). Original GitHub issue: https://github.com/koel/koel/issues/1206 Sometimes when I try to login I get the message: TypeError: Cannot read property 'media' of undefined referring to this line at playback.js this.listenToMediaEvents(this.player.media); It's weird 'cause it's not every time. Sometimes it works and I'm able to login, sometimes it doesn't and it shows this message. A few times I'm actually able to login but nothing is loaded, it seems like the event KOEL_READY is not fired (I force it to test it inside the albums-list.vue and it worked). Usually when it happens, the 2nd time I try I'm able to login. As far as I checked, that happens 'cause the: this.player = plyr.setup({ controls: [] })[0] returns undefined for this.player. any ideas? **Environment** - Koel v4.2.2 - OS: macOS Catalina - Brave 1.5 (shields down) - PHP version 7.2.1 - Node version 12.7 Thanks!
Author
Owner

@phanan commented on GitHub (Apr 21, 2020):

This is a race condition that's hopefully fixed in the latest version. Can you upgrade and see if the problem persists?

<!-- gh-comment-id:617439512 --> @phanan commented on GitHub (Apr 21, 2020): This is a race condition that's hopefully fixed in the latest version. Can you upgrade and see if the problem persists?
Author
Owner

@BrookeDot commented on GitHub (May 5, 2020):

Hi @mncn were you able to upgrade?

<!-- gh-comment-id:623905039 --> @BrookeDot commented on GitHub (May 5, 2020): Hi @mncn were you able to upgrade?
Author
Owner

@mncn commented on GitHub (Jul 27, 2020):

Yes, it's working now! Thank you and sorry for the late reply.

<!-- gh-comment-id:664225600 --> @mncn commented on GitHub (Jul 27, 2020): Yes, it's working now! Thank you and sorry for the late reply.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#685
No description provided.