You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/workplace/chromecast/node-castv2-client/node_modules/castv2-client/lib/controllers/media.js:88
data.mediaSessionId = this.currentSession.mediaSessionId;
^
TypeError: Cannot read property 'mediaSessionId' of null
at fn.MediaController.sessionRequest (/workplace/chromecast/node-castv2-client/node_modules/castv2-client/lib/controllers/media.js:88:45)
at fn.MediaController.pause (/workplace/chromecast/node-castv2-client/node_modules/castv2-client/lib/controllers/media.js:103:8)
at DefaultMediaReceiver.pause (/workplace/chromecast/node-castv2-client/node_modules/castv2-client/lib/senders/default-media-receiver.js:38:20)
at /workplace/chromecast/node-castv2-client/app.js:39:21
at PlatformSender.join (/workplace/chromecast/node-castv2-client/node_modules/castv2-client/lib/senders/platform.js:88:3)
at /workplace/chromecast/node-castv2-client/app.js:30:20
at /workplace/chromecast/node-castv2-client/node_modules/castv2-client/lib/controllers/receiver.js:86:5
at /workplace/chromecast/node-castv2-client/node_modules/castv2-client/lib/controllers/receiver.js:31:5
at fn.onmessage (/workplace/chromecast/node-castv2-client/node_modules/castv2-client/lib/controllers/request-response.js:27:7)
at emitTwo (events.js:131:20)
I can read app status with app.on('status', () => {}) so i guess connection is fine. Tried while playing Spotify and Google Play Music.
Do I need to set currentSession myself or is it a bug? Any easy fixes for it?
The text was updated successfully, but these errors were encountered:
It seems that when joining an already existing app (instead of launching it) the current session isn't registered.
This happened to me once and I solved it by calling the app.getStatus() first. You can even check if the variable is undefined to avoid calling getStatus() unnecessarily. Try and see if this fixes it.
Here's my code
And it causes this error:
I can read app status with
app.on('status', () => {})
so i guess connection is fine. Tried while playing Spotify and Google Play Music.Do I need to set
currentSession
myself or is it a bug? Any easy fixes for it?The text was updated successfully, but these errors were encountered: