Jump to content

500 Internal Service Error when manually connecting via Roku


kkkeeeooo
Go to solution Solved by Luke,

Recommended Posts

kkkeeeooo

I run Emby in a docker container behind a public-facing reverse proxy (& a separate internal reverse proxy, but I don't think that's relevant to this issue). I can access the server normally in web browsers on my LAN with or without the reverse proxy. I can also access it externally through the reverse proxy. However, the Emby Roku app on my TV (on LAN) cannot connect, throwing error "500: The requested URL returned error: 500 Internal Server Error" attempting to connect either through reverse proxy or directly to IP/port.

I was able to connect & stream from this same Roku up until a few days ago, but a friend with access told me they were getting errors in the Roku app so I reset my app to test the config & now get this error.

This error is not reflected in either the reverse proxy logs nor the Emby logs (although the fact I get the same error when connecting with IP/port suggests to me the proxy is not the issue). If I change the mapped port in the docker config, I get a "connection refused" error (obviously, but this shows it's making a connection when mapped correctly), and I can `nc` the port and see that it's open. I can see the traffic being passed through firewall. I can put another client on the same subnet as the Roku and am able to successfully connect via web browser, both directly and through reverse proxy.

Not sure where to start here. Roku app v4.0.31, Emby v4.6.4 (linuxserver.io image). I tried rolling back to 4.6.3 and get the same error. I can post the logs if that may be helpful, but like I said there is no activity in the logs when attempting these connections.

Any advice/insight is appreciated...

Edited by kkkeeeooo
Link to comment
Share on other sites

Hi, does any of the traffic show up in the emby server log? In other words, are the requests from Roku even getting far?

Link to comment
Share on other sites

  • 2 weeks later...
kkkeeeooo

Apologies for late reply, but I was mistaken -- it actually does appear in the server log:

2021-09-05 21:23:23.152 Info Server: http/1.1 GET http://10.20.0.19:8096/emby/Users/Public. UserAgent: Roku/DVP-10.0 (10.0.0.4209-30)
2021-09-05 21:23:23.156 Error Server: Error processing request
	*** Error Report ***
	Version: 4.6.4.0
	Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe -restartexitcode 3
	Operating system: Linux version 5.4.0-81-generic (buildd@lgw01-amd64-052) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021
	Framework: .NET Core 3.1.13
	OS/Process: x64/x64
	Runtime: app/emby/System.Private.CoreLib.dll
	Processor count: 2
	Data path: /config
	Application path: /app/emby
	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
	   at Emby.Server.Implementations.Library.UserManager.GetInternalId(Guid id)
	   at Emby.Server.Implementations.Security.AuthenticationRepository.<GetUserHistory>b__10_0(Guid i)
	   at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
	   at System.Linq.Set`1.UnionWith(IEnumerable`1 other)
	   at System.Linq.Enumerable.DistinctIterator`1.FillSet()
	   at System.Linq.Enumerable.DistinctIterator`1.ToArray()
	   at Emby.Server.Implementations.Security.AuthenticationRepository.GetUserHistory(String deviceId)
	   at Emby.Server.Implementations.Devices.DeviceManager.GetUserHistory(String deviceId)
	   at MediaBrowser.Api.UserService.QueryUsers(BaseUserRequest request, Boolean filterByDevice, Boolean filterByNetwork, Boolean isAuthenticated, Boolean isInLocalNetwork, CancellationToken cancellationToken)
	   at MediaBrowser.Api.UserService.GetUsers(GetUsersResult request, Boolean filterByDevice, Boolean filterByNetwork, Boolean isAuthenticated, CancellationToken cancellationToken)
	   at MediaBrowser.Api.UserService.Get(GetPublicUsers request)
	   at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Int64 GetInternalId(System.Guid)
	
2021-09-05 21:23:23.156 Info Server: http/1.1 Response 500 to 10.99.0.11. Time: 4ms. http://10.20.0.19:8096/emby/Users/Public

 

Link to comment
Share on other sites

  • Solution

Hi, yes I see what's going on here and it's resolved for the next release of Emby Server. A temporary workaround in the meantime would be to enable this user option for every single one of your users:

Quote

Hide this user from login screens when connected remotely

This means they'll have to manually enter their username when logging in rather than being able to see it and click on it.

  • Thanks 1
Link to comment
Share on other sites

kkkeeeooo

Great, thanks for your help!

By chance, do you know which beta release version contains the fix? I may just run beta until the fix hits the stable channel. Either way, thanks again for confirming!

Link to comment
Share on other sites

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...