spitefulgod 6 Posted April 26, 2017 Share Posted April 26, 2017 Guys I'm getting the following error when connecting into to Emby Connect and sending remote control commands to a client, the connection to the server is fine, I can pull details and query the server fine. It works if a direct connection is used (direct to the server not via emby connect) but shows the following error otherwise...... What have a missed? BTW the client is returned from the with the Sessions API with the ControllableByUserId set, so I know I should be able to control it. 2017-04-26 20:36:43.9650 Info HttpServer: HTTP POST http://192.168.0.10:8096/Sessions/80970b18df5d2bbd13bedd6443a981db/Playing?ItemIds=6f86976a2c7449d952c510ebbd1b7114&StartPositionTicks=0&PlayCommand=PlayNow. UserAgent: RestSharp/105.2.3.0 2017-04-26 20:36:43.9650 Error HttpServer: Error processing request*** Error Report ***Version: 3.2.13.0Command line: C:\Users\smillward\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exeOperating system: Microsoft Windows NT 6.2.9200.064-Bit OS: True64-Bit Process: TrueProcessor count: 4Program data path: C:\Users\smillward\AppData\Roaming\Emby-ServerApplication directory: C:\Users\smillward\AppData\Roaming\Emby-Server\SystemSystem.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.Parameter name: appName at Emby.Server.Implementations.Session.SessionManager.<LogSessionActivity>d__51.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Api.BaseApiService.<GetSession>d__12.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at MediaBrowser.Api.Session.SessionsService.Post(Play request) at Emby.Server.Implementations.Services.ServiceExecGeneral.<>c__DisplayClass4_0.<CreateExecFn>b__0(Object service, Object request) at Emby.Server.Implementations.Services.ServiceExecGeneral.<Execute>d__2.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Services.ServiceController.<Execute>d__13.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Services.ServiceHandler.<ProcessRequestAsync>d__15.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpServer.HttpListenerHost.<RequestHandler>d__75.MoveNext()---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.Parameter name: appName at Emby.Server.Implementations.Session.SessionManager.<LogSessionActivity>d__51.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Api.BaseApiService.<GetSession>d__12.MoveNext()<---System.AggregateException at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at MediaBrowser.Api.Session.SessionsService.Post(Play request) at Emby.Server.Implementations.Services.ServiceExecGeneral.<>c__DisplayClass4_0.<CreateExecFn>b__0(Object service, Object request) at Emby.Server.Implementations.Services.ServiceExecGeneral.<Execute>d__2.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Services.ServiceController.<Execute>d__13.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.Services.ServiceHandler.<ProcessRequestAsync>d__15.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.HttpServer.HttpListenerHost.<RequestHandler>d__75.MoveNext()InnerException: System.ArgumentNullExceptionSystem.ArgumentNullException: Value cannot be null.Parameter name: appName at Emby.Server.Implementations.Session.SessionManager.<LogSessionActivity>d__51.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Api.BaseApiService.<GetSession>d__12.MoveNext() at Emby.Server.Implementations.Session.SessionManager.<LogSessionActivity>d__51.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Api.BaseApiService.<GetSession>d__12.MoveNext()2017-04-26 20:36:43.9650 Info HttpServer: HTTP Response 500 to 192.168.0.10. Time: 2ms. http://192.168.0.10:8096/Sessions/80970b18df5d2bbd13bedd6443a981db/Playing?ItemIds=6f86976a2c7449d952c510ebbd1b7114&StartPositionTicks=0&PlayCommand=PlayNow2017-04-26 20:36:44.2747 Error Dlna: Error sending socket message from 10.58.2.22 to 239.255.255.250:1900*** Error Report ***Version: 3.2.13.0Command line: C:\Users\smillward\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exeOperating system: Microsoft Windows NT 6.2.9200.064-Bit OS: True64-Bit Process: TrueProcessor count: 4Program data path: C:\Users\smillward\AppData\Roaming\Emby-ServerApplication directory: C:\Users\smillward\AppData\Roaming\Emby-Server\SystemSystem.Net.Sockets.SocketException (0x80004005): The requested address is not valid in its context at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult) at Emby.Common.Implementations.Net.UdpSocket.<>c__DisplayClass17_0.<SendAsync>b__0(IAsyncResult result)--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Common.Implementations.Net.UdpSocket.<SendWithLockAsync>d__18.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Rssdp.Infrastructure.SsdpCommunicationsServer.<SendFromSocket>d__24.MoveNext()System.Net.Sockets.SocketException at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult) at Emby.Common.Implementations.Net.UdpSocket.<>c__DisplayClass17_0.<SendAsync>b__0(IAsyncResult result)--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Common.Implementations.Net.UdpSocket.<SendWithLockAsync>d__18.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Rssdp.Infrastructure.SsdpCommunicationsServer.<SendFromSocket>d__24.MoveNext() Sorry I don't have the code here it seemed redundant without the variables, but I connect to emby get a list of server, connect to a server, get the exchange token, get a list of client, get a full list of media, all fine, but then the play to command on the connected client (in this case Edge or Emby Theratre) and the above error occurs. Again it works if I connect to the server directly and not through emby connect. Link to comment Share on other sites More sharing options...
Luke 37183 Posted April 26, 2017 Share Posted April 26, 2017 can we see the full request including headers? thanks. Link to comment Share on other sites More sharing options...
spitefulgod 6 Posted April 26, 2017 Author Share Posted April 26, 2017 Not sure I can there are so many request involved in the emby authentication, I'll try to dump the project on Github, I presume c# is OK for you guys? Link to comment Share on other sites More sharing options...
Luke 37183 Posted April 26, 2017 Share Posted April 26, 2017 Well, what I was going to get at was that the command requests might be missing the required headers: https://github.com/MediaBrowser/Emby/wiki/Authentication Link to comment Share on other sites More sharing options...
spitefulgod 6 Posted April 26, 2017 Author Share Posted April 26, 2017 Ahh problem solved!!! I see, the authorisation header is + [2] {X-Emby-Authorization=MediaBrowser UserId="7614b613a6114a28b3d0563f9f3c9023", Client="EmbyVision", Device="Windows", DeviceId="b2b139bf-d6f7-4088-bfd5-6addd759e890", Version="1.0.0.0"} which is stale and used from the token exchange, switched to:+ [2] {Authorization=MediaBrowser UserId="7614b613a6114a28b3d0563f9f3c9023", Client="EmbyVision", Device="Windows", DeviceId="b2b139bf-d6f7-4088-bfd5-6addd759e890", Version="1.0.0.0"} Now works fine, thanks for the help, amazing support here. Link to comment Share on other sites More sharing options...
Luke 37183 Posted April 27, 2017 Share Posted April 27, 2017 The only change is X-Emby-Authorization to Authorization? Both should be accepted to be honest. Link to comment Share on other sites More sharing options...
spitefulgod 6 Posted April 27, 2017 Author Share Posted April 27, 2017 There was that and the X-Token one (sorry can't remember the name) was duplicated twice (same data in both though). That may have been the issue, thanks for your help though, I'll check tonight to see what the specific change that stopped the error was. Link to comment Share on other sites More sharing options...
spitefulgod 6 Posted April 27, 2017 Author Share Posted April 27, 2017 I have been unable to to replicate the original issue, I'll put this down to bad coding on my part or that I never had the Authorization code on at all maybe? Anyway thanks for the help. Link to comment Share on other sites More sharing options...
Luke 37183 Posted April 27, 2017 Share Posted April 27, 2017 Thanks for the info. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now