Chromecast can't connect after connection is lost [#18186]

Help improve MediaMonkey 5 by testing the latest pre-release builds, and reporting bugs and feature requests.

Moderator: Gurus

chisnz
Posts: 7
Joined: Sat May 06, 2017 4:09 am

Chromecast can't connect after connection is lost [#18186]

Post by chisnz »

On 5.0.1.2427 if I successfully cast to a Chromecast Audio then that connection is lost, MM is then unable to connect to that device and behaves as if the device is offline, or it connects but thinks that mp3 files are incompatible.
Lowlander
Posts: 50812
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Chromecast can't connect after connection is lost

Post by Lowlander »

Try with the current release before starting troubleshooting: viewtopic.php?p=485073#p485073

Do you know why the Chromecast becomes unavailable? Does a MediaMonkey restart resolve this?
chisnz
Posts: 7
Joined: Sat May 06, 2017 4:09 am

Re: Chromecast can't connect after connection is lost

Post by chisnz »

Now running on v5.0.1.2431 and it still won't connect to a Chromecast audio some time after it's lost connection.

Reasons for losing connection: wifi drops too low, or power is lost on the Chromecast audio (home automation).

Restarting MM resolves the issue and usually it will connect easily. I haven't used this latest version enough to see if the problem of being unable to cast mp3s has been fixed.
chisnz
Posts: 7
Joined: Sat May 06, 2017 4:09 am

Re: Chromecast can't connect after connection is lost

Post by chisnz »

I've had a few crashes on this version too, just in the midst of playing mp3s to Chromecast Audios.
Lowlander
Posts: 50812
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Chromecast can't connect after connection is lost

Post by Lowlander »

Please capture this in a debug log (step 4b) and attach the log to a Support Ticket: viewtopic.php?f=30&t=86643

This will allow a developer to analyze why this is happening in your setup.
chisnz
Posts: 7
Joined: Sat May 06, 2017 4:09 am

Re: Chromecast can't connect after connection is lost

Post by chisnz »

For the crashing while playing issue the debug version of MM sent a bug report. I didn't grab the id before it disappeared.

For the inability to play some mp3s via Chromecast it could be due to me running multiple instances of MM5. I just accept the message that the server can't start. When this fails, many files are skipped then it is able to stream a later file. Is something else required to automatically start the server on a new port when multiple instances of MM are run?

Here's a segment from DebugView

Code: Select all

00040318	556.66424561	[10900] MM5 [6892](R) TChromecastPlayer.InvokeAction(Seek, , 00:00:00) on Charlotte's Chromecast	
00040319	556.66461182	[10900] MM5 [6892](R) Player: _Play() procedure entering.	
00040320	556.66479492	[10900] MM5 [6892](R) Player: Going to handle the current track.	
00040321	556.66497803	[10900] MM5 [6892](R) Player: Updating playlist entry.	
00040322	556.66510010	[10900] MM5 [6892](R) Player: Track entry prepared, going to start playback.	
00040323	556.66528320	[10900] MM5 [268](R) BQ: Thread[268] is executing new task now: TWin7Tools.SetCurrentTrack	
00040324	556.66546631	[10900] UPnP: Get Renderers	
00040325	556.66552734	[10900] MM5 [6892](R) TRemotePlayer.PlayURI(M:\Music\Childrens\Audiobooks\Harry Potter\5 Order of the Phoenix\Harry Potter and the Order of the Phoenix-Part09.mp3, ID: 23355, Path: M:\Music\Childrens\Audiobooks\Harry Potter\5 Order of the Phoenix\Harry Potter and the Order of the Phoenix-Part09.mp3 )  on Charlotte's Chromecast, StartPos: 0	
00040326	556.66564941	[10900] MM5 [6892](R) TMediaServer.setCurrentClient: 	
00040327	556.66583252	[10900] MM5 [6892](R) TPortChecker.IsTCPPortAvailable started (10328)	
00040328	556.66613770	[10900] MM5 [6892](R) TRemotePlayer.PlayURI: server MediaMonkey Server has failed to run, exiting	
00040329	556.66894531	[10900] MM5 [14408](R) last.fm: onPlaybackState trackChanged	
00040330	556.66906738	[10900] MM5 [14408](R) COM - calling event TSDBApplication.DoTrackPropertiesEvent	
00040331	556.67016602	[35616] TCoolTrayIcon.NotifySystem: Finished 	
00040332	556.67132568	[35616] TCoolTrayIcon.NotifySystem: Finished 	
00040333	556.67736816	[10900] MM5 [6892](R) Player: Next command started	
00040334	556.67761230	[10900] MM5 [14408](R) COM - calling event TSDBApplication.DoTrackPropertiesEvent	
00040335	556.67785645	[10900] MM5 [6892](R) Player: Next track prepared, going to start playback	
00040336	556.67791748	[10900] MM5 [6892](R) Player: Last playback bookmark: 0	
00040337	556.67797852	[10900] MM5 [6892](R) TFullPlayer.setTrackPositionMS: 0	
00040338	556.67810059	[10900] MM5 [6892](R) BQ: New task - low pr. (1 in queue), stack: TWin7Tools.SetCurrentTrack	
00040339	556.67895508	[10900] MM5 [6892](R) Player: _Play() procedure leaving.	
00040340	556.67913818	[10900] MM5 [6892](R) Player: W7 icon updated.	
00040341	556.67938232	[10900] MM5 [6892](R) Player: Updating playlist entry.	
00040342	556.68054199	[35616] TCoolTrayIcon.NotifySystem: Mode = 1	
00040343	556.68395996	[35616] TCoolTrayIcon.NotifySystem: Finished 	
00040344	556.68585205	[35616] TCoolTrayIcon.NotifySystem: Finished 	
00040345	556.68957520	[10900] MM5 [6892](R) Player: Song is not cached, try to play the original file	
00040346	556.68963623	[10900] UPnP: Get Renderers	
00040347	556.68969727	[10900] UPnP: Renderer name: Dining room TV, Renderer UUID: 7eb2a839-6fb5-af1b-7b44-872763c3cb4f 	
00040348	556.68975830	[10900] MM5 [6892](R) TRemotePlayer.getServer: No server is running to be able to play our local file, we need to run a hidden server for this purpose	
00040349	556.68988037	[10900] MM5 [6892](R) TMediaServer.Run: "MediaMonkey Server", port: 10328	
00040350	556.68994141	[10900] MM5 [14408](R) Player - new state: trackChanged	
00040351	556.69024658	[10900] MM5 [6892](R) TRemotePlayer.PlayURI: server MediaMonkey Server has failed to run, exiting	
00040352	556.69061279	[10900] MM5 [38848](R) 38848 DB query prepare finished, took 0.	
00040353	556.69378662	[10900] MM5 [14408](R) last.fm: scrobblerMode=ModeOff	
00040354	556.69403076	[10900] MM5 [14408](R) COM - calling event TSDBApplication.DoTrackPropertiesEvent	
00040355	556.69647217	[35616] TCoolTrayIcon.NotifySystem: Finished 	
00040356	556.69781494	[35616] TCoolTrayIcon.NotifySystem: Finished 	
00040357	556.70391846	[10900] MM5 [24152](R) Plugins Folder: C:\Program Files (x86)\MediaMonkey 5\Plugins\	
00040358	556.70404053	[10900] MM5 [24152](R) Plugins Folder: C:\Program Files (x86)\MediaMonkey 5\Plugins\	
00040359	556.70806885	[10900] MM5 [6892](R) Player: There is a problem in playing this file, try the next one	
00040360	556.70819092	[10900] MM5 [6892](R) Player: Setting current track: M:\Music\Childrens\Audiobooks\Harry Potter\5 Order of the Phoenix\Harry Potter and the Order of the Phoenix-Part11.mp3	
00040361	556.70861816	[10900] MM5 [6892](R) Player: Next track prepared, going to start playback	
00040362	556.70874023	[10900] MM5 [6892](R) Player: Last playback bookmark: 0	
00040363	556.70880127	[10900] MM5 [6892](R) TFullPlayer.setTrackPositionMS: 0	
00040364	556.70892334	[10900] MM5 [6892](R) BQ: New task - low pr. (1 in queue), stack: TWin7Tools.SetCurrentTrack	
00040365	556.70935059	[10900] MM5 [6892](R) Player: _Play() procedure leaving.	
00040366	556.70941162	[10900] MM5 [6892](R) Player: W7 icon updated.	
00040367	556.70959473	[10900] MM5 [6892](R) Player: Setting current track: M:\Music\Childrens\Audiobooks\Harry Potter\5 Order of the Phoenix\Harry Potter and the Order of the Phoenix-Part11.mp3	
00040368	556.70965576	[10900] MM5 [6892](R) Player: Setting current track: M:\Music\Childrens\Audiobooks\Harry Potter\5 Order of the Phoenix\Harry Potter and the Order of the Phoenix-Part11.mp3	
00040369	556.70996094	[10900] MM5 [6892](R) Player: Song is not cached, try to play the original file	
00040370	556.71002197	[10900] MM5 [6892](R) Player: Last playback bookmark: 0	
00040371	556.71014404	[10900] UPnP: Get renderers	
00040372	556.71020508	[10900] MM5 [6892](R) TRemotePlayer.PlayURI(M:\Music\Childrens\Audiobooks\Harry Potter\5 Order of the Phoenix\Harry Potter and the Order of the Phoenix-Part11.mp3, ID: 23357, Path: M:\Music\Childrens\Audiobooks\Harry Potter\5 Order of the Phoenix\Harry Potter and the Order of the Phoenix-Part11.mp3 )  on Charlotte's Chromecast, StartPos: 0	
00040373	556.71032715	[10900] MM5 [6892](R) TMediaServer.setCurrentClient: 	
00040374	556.71032715	[10900] MM5 [6892](R) TPortChecker.IsTCPPortAvailable started (10328)	
00040375	556.71081543	[10900] MM5 [6892](R) TRemotePlayer.PlayURI: server MediaMonkey Server has failed to run, exiting	
00040376	556.72045898	[10900] MM5 [14408](R) COM - calling event TSDBApplication.DoTrackPropertiesEvent	
00040377	556.72137451	[35616] TCoolTrayIcon.NotifySystem: Mode = 1	
00040378	556.72302246	[35616] TCoolTrayIcon.NotifySystem: Finished 	
00040379	556.72448730	[35616] TCoolTrayIcon.NotifySystem: Finished 	
00040380	556.72686768	[10900] MM5 [14408](R) last.fm: onPlaybackState trackChanged	
00040381	556.72723389	[10900] MM5 [14408](R) COM - calling event TSDBApplication.DoTrackPropertiesEvent	
00040382	556.72772217	[10900] MM5 [6892](R) Player: Next command started	
00040383	556.72808838	[10900] MM5 [6892](R) BQ: New task (1 in queue), stack: TSettings.flushAsync	
00040384	556.72808838	[10900] MM5 [32460](R) BQ: Thread[32460] is executing new task now: TSettings.flushAsync	
00040385	556.72814941	[10900] MM5 [32460](R) WriteIniSettings	
00040386	556.72827148	[10900] MM5 [6892](R) TChromecastPlayer.InvokeAction(Seek, , 00:00:00) on Charlotte's Chromecast	
00040387	556.72839355	[10900] MM5 [6892](R) BQ: Currently running 8 threads of 10	
00040388	556.72869873	[10900] MM5 [6892](R) Player: _Play() procedure entering.	
00040389	556.72875977	[10900] MM5 [6892](R) Player: Going to handle the current track.	
00040390	556.72894287	[10900] MM5 [6892](R) Player: Updating playlist entry.	
00040391	556.72906494	[10900] MM5 [19776](R) BQ: Thread[19776] is executing new task now: TWin7Tools.SetCurrentTrack	
00040392	556.72930908	[10900] MM5 [6892](R) Player: Song is not cached, try to play the original file	
00040393	556.72937012	[10900] UPnP: Get Renderers	
00040394	556.72937012	[10900] UPnP: Renderer name: Dining room TV, Renderer UUID: 7eb2a839-6fb5-af1b-7b44-872763c3cb4f 	
00040395	556.72949219	[10900] MM5 [6892](R) TRemotePlayer.getServer: No server is running to be able to play our local file, we need to run a hidden server for this purpose	
00040396	556.72961426	[10900] MM5 [6892](R) TMediaServer.Run: "MediaMonkey Server", port: 10328	
00040397	556.72985840	[10900] MM5 [6892](R) TPortChecker.IsTCPPortAvailable failure: Could not bind socket. Address and port are already in use.	
00040398	556.73785400	[10900] MM5 [28216](R) Plugins Folder: C:\Program Files (x86)\MediaMonkey 5\Plugins\	
00040399	556.73797607	[10900] MM5 [28216](R) Plugins Folder: C:\Program Files (x86)\MediaMonkey 5\Plugins\	
00040400	556.75146484	[10900] MM5 [14408](R) COM - calling event TSDBApplication.DoTrackPropertiesEvent	
00040401	556.76147461	[10900] MM5 [11396](R) Plugins Folder: C:\Program Files (x86)\MediaMonkey 5\Plugins\	
00040402	556.76153564	[10900] MM5 [11396](R) Plugins Folder: C:\Program Files (x86)\MediaMonkey 5\Plugins\	
00040403	556.76391602	[10900] MM5 [14408](R) Player - new state: trackChanged	
00040404	556.76483154	[35616] TCoolTrayIcon.NotifySystem: Mode = 1	
00040405	556.76763916	[10900] MM5 [14408](R) last.fm: onPlaybackState trackChanged	
00040406	556.76806641	[10900] MM5 [14408](R) COM - calling event TSDBApplication.DoTrackPropertiesEvent	
00040407	556.76873779	[10900] MM5 [6892](R) Player: There is a problem in playing this file, try the next one	
00040408	556.76885986	[10900] MM5 [6892](R) Player: Setting current track: M:\Music\Childrens\Audiobooks\Harry Potter\5 Order of the Phoenix\Harry Potter and the Order of the Phoenix-Part13.mp3	
00040409	556.76916504	[10900] MM5 [6892](R) Player: Next track prepared, going to start playback
Lowlander
Posts: 50812
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Chromecast can't connect after connection is lost

Post by Lowlander »

As requested above, please attach a full log to a Support Ticket.

No, you can't automatically run the server on a new port for each instance. Why do you need to run multiple instances of the same install?
chisnz
Posts: 7
Joined: Sat May 06, 2017 4:09 am

Re: Chromecast can't connect after connection is lost

Post by chisnz »

I use multiple instances of MM for casting different music to different Chromecast devices.
Ludek
Posts: 4242
Joined: Fri Mar 09, 2007 9:00 am

Re: Chromecast can't connect after connection is lost

Post by Ludek »

chisnz wrote: Fri Aug 06, 2021 10:08 pm I use multiple instances of MM for casting different music to different Chromecast devices.
Hi, I can confirm that this currently does not work, because every MM instance is trying to run the server on the same port (showing the message that server has failed to run due to port already in use).

This could be easily workarounded as we are already starting invisible server for casting purposes (whenever the configured/default server fails to run or is disabled).
We just need to ensure that it is started on different port for each MM instance (which currently isn't the case)

To be fixed as: https://www.ventismedia.com/mantis/view.php?id=18186
Post Reply