Jump to content

Emby Web constantly "losing connection" when Chromecasting media.


Mr_Scumbag

Recommended Posts

Mr_Scumbag

This seems to happen every few versions of Emby server, which is why I usually hold off on updating for many months once this issue stops after upgrading to a "good" version. It's very frustrating and has been occurring for years.

I'm using the latest version of Chrome and Emby server.

After Chromecasting, the media will continue playing as normal, but anywhere between a few minutes to a hour after playing the media, the Web app will stop communicating with the Chromecast, meaning that the status bar will stop moving and showing how far into the media it is, and all controls (pause, next, previous, etc) will stop responding, but the media continues to play on the Chromecast. The only way to resolve this is to disconnect and reconnect to the Chromecast or (sometimes) to refresh the Emby Web page, although about 50% of the time, refreshing the page will immediately disconnect the Chromecast, stopping media.

Importantly, I also use the web app with a different server running an older version, and this issue very rarely ever occurs, so it certainly seems to be related to the version. Why it's a much bigger issue in some versions than others is worth investigating, I think.

I'm interested in hearing from others who Chromecast from Emby Web in Chrome. I imagine it's not a particularly common setup, but are there others experiencing this issue?

Link to comment
Share on other sites

  • 3 weeks later...
Mr_Scumbag

Thanks for your response and sorry for my delayed reply. I had to wait for the issue to occur again in a time window where I was easily able to find the right part of the log.

The issue described above has just occurred again, although slightly differently in that instead of the stream still playing on the TV, it has completely frozen and the controls on the PC are not working either. This happened about 3min and 50 seconds into playing a movie.

The log is small enough to post here:

 

2022-07-21 10:31:17.982 Info Server: http/1.1 Response 204 to ‌‍‍192.168.1.107‌. Time: 2ms. http://‌‍‍192.168.1.109‌:8096/emby/Sessions/Playing/Progress?X-Emby-Client=Emby for Chromecast&X-Emby-Device-Name=Chromecast&X-Emby-Device-Id=chromecast_1658324284942&X-Emby-Client-Version=2.1.0&reqformat=json
2022-07-21 10:31:22.257 Error PortMapper: Error in GetSpecificMappingAsync
	*** Error Report ***
	Version: 4.7.5.0
	Command line: C:\Users\dsktp01\AppData\Roaming\Emby-Server\system\EmbyServer.dll
	Operating system: Microsoft Windows 10.0.19043
	Framework: .NET 6.0.5
	OS/Process: x64/x64
	Runtime: C:/Users/dsktp01/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 12
	Data path: C:\Users\dsktp01\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\dsktp01\AppData\Roaming\Emby-Server\system
	System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: An error occurred while sending the request.
	 ---> System.IO.IOException: The response ended prematurely.
	   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   --- End of inner exception stack trace ---
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Mono.Nat.Upnp.UpnpNatDevice.GetSpecificMappingAsync(Protocol protocol, Int32 publicPort, CancellationToken cancellationToken)
	   at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMap(Mapping mapping, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	InnerException: System.IO.IOException: The response ended prematurely.
	Source: System.Net.Http
	TargetSite: Void MoveNext()
	   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	
2022-07-21 10:31:22.263 Error HttpClient: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>402</errorCode>
<errorDescription>Invalid Args</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

 

Link to comment
Share on other sites

  • 2 weeks later...

Hi, I don't see anything obvious. Have you updated to Emby Server 4.7.6? Are you still running into this?

Link to comment
Share on other sites

Mr_Scumbag

@Luke I have updated and it is still occurring. It seems to be less frequent, but it's hard to tell without more time with the new version.

Link to comment
Share on other sites

Mr_Scumbag

Update: Seems to be happening more frequently now. I haven't been able to watch anything (45 min episodes) all the way through without it occurring since I updated.

Link to comment
Share on other sites

Mr_Scumbag

Yes, and other issues. Sometimes the video just stops altogether on the TV as well as the webapp. The only way to recover it is to un-chromecast then re-chromecast, but now sometimes I'm not even able to un-chromecast Emby which is a new wrinkle I've not encountered for any app before. The only way to fix this when it happens it to chromecast something else to the TV. Othertimes, the stream will start pausing or stuttering for no obvious reason. Disk I/O is fine, wireless is fine, network traffic is fine. un-chromecasting, re-chromecasting and then resuming the video will fix the issue. Sometimes for the remainder of the video, sometimes only for 10-20 minutes. It's very random.

I've decided to switch to Plex until the next major Emby update cause it's becoming too much of a hassle to babysit.

Edited by Mr_Scumbag
Link to comment
Share on other sites

  • 4 weeks later...
On 8/23/2022 at 11:49 PM, Mr_Scumbag said:

Yes, and other issues. Sometimes the video just stops altogether on the TV as well as the webapp. The only way to recover it is to un-chromecast then re-chromecast, but now sometimes I'm not even able to un-chromecast Emby which is a new wrinkle I've not encountered for any app before. The only way to fix this when it happens it to chromecast something else to the TV. Othertimes, the stream will start pausing or stuttering for no obvious reason. Disk I/O is fine, wireless is fine, network traffic is fine. un-chromecasting, re-chromecasting and then resuming the video will fix the issue. Sometimes for the remainder of the video, sometimes only for 10-20 minutes. It's very random.

I've decided to switch to Plex until the next major Emby update cause it's becoming too much of a hassle to babysit.

Hi, did you see this? https://www.pcworld.com/article/871581/change-your-plex-password-right-now.html

Anyway can you try this again?

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
Mr_Scumbag

It seems to be working properly now. That has happened before, though. Usually it lasts for a while until the issue starts occurring again after a new update.

 

I guess all I can do is keep using it and see what happens.

  • Thanks 1
Link to comment
Share on other sites

  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...