Jump to content

Incorporating an "Access Denied" message


geotux

Recommended Posts

Hi,

 

I can't stop praising the Emby community for the excellent work they are doing. THe more I use Emby the more I like it. I'm hoping that through my testing and feedback i can contribute that little to the community.

 

I have a problem which is think is a missing functionality rather than an issue itself. The problem occurs both with my Android app and with the web client. Basically, I set an access schedule for my son so that he doesn't watch movie when he is suppose to be sleeping. All fine to this point.

 

THen, when i log on with the son's account and I am trying to do this outside the planned access schedule, I don't get any error message "You are not allowed to use Emby outside these hours ....". In the webclient it just keeps looping to the login window while the android app just hangs and keeps you waiting while nothing happens. In some instances, the Android app crashed and every other time i had to kill it. Surely this is because the server is not passing the right message to the app, something like "dear server, please let me in" and the server doesn't reply "oh, sorry you can't" so the app keeps waiting for an answer? Would this seems a correct interpretation. The logs are clearly recording what is happening (see below).

 

Wouldn't it be sensible to get the server to post a reply to the app trying to access so that the person doesn't wait to infinity for something to happen?

 

Cheers

*** Error Report ***	Version: 3.0.5781.9	Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe -restartpath /usr/lib/emby-server/restart.sh	Operating system: Unix 3.2.0.4	Processor count: 2	64-Bit OS: False	64-Bit Process: False	Program data path: /var/lib/emby-server	Mono: 4.2.1 (Stable 4.2.1.102/6dd2d0d Fri Dec  4 18:52:28 UTC 2015)	Application Path: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe	Access token has expired.	MediaBrowser.Controller.Net.SecurityException	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.ValidateSecurityToken (IServiceRequest request, System.String token) <0xb3f25160 + 0x00133> in <filename unknown>:0 	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.ValidateUser (IServiceRequest request, IAuthenticationAttributes authAttribtues) <0xb3f24810 + 0x00067> in <filename unknown>:0 	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.Authenticate (IServiceRequest request, IAuthenticationAttributes authAttribtues) <0xb3f247e0 + 0x0001f> in <filename unknown>:0 	  at MediaBrowser.Controller.Net.AuthenticatedAttribute.RequestFilter (IRequest request, IResponse response, System.Object requestDto) <0xb3f24778 + 0x0005f> in <filename unknown>:0 	  at ServiceStack.ServiceStackHost.ApplyRequestFiltersSingle (IRequest req, IResponse res, System.Object requestDto) <0xb3f9a610 + 0x00232> in <filename unknown>:0 	  at ServiceStack.ServiceStackHost.ApplyRequestFilters (IRequest req, IResponse res, System.Object requestDto) <0xb3f9a220 + 0x00098> in <filename unknown>:0 	  at ServiceStack.Host.RestHandler.ProcessRequestAsync (IRequest httpReq, IResponse httpRes, System.String operationName) <0xb3f960e8 + 0x0044a> in <filename unknown>:0 	2015-12-23 21:54:19.4057 Error HttpAsyncTaskHandler: Error occured while Processing Request: Access token has expired.	*** Error Report ***	Version: 3.0.5781.9	Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe -restartpath /usr/lib/emby-server/restart.sh	Operating system: Unix 3.2.0.4	Processor count: 2	64-Bit OS: False	64-Bit Process: False	Program data path: /var/lib/emby-server	Mono: 4.2.1 (Stable 4.2.1.102/6dd2d0d Fri Dec  4 18:52:28 UTC 2015)	Application Path: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe	Access token has expired.	MediaBrowser.Controller.Net.SecurityException	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.ValidateSecurityToken (IServiceRequest request, System.String token) <0xb3f25160 + 0x00133> in <filename unknown>:0 	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.ValidateUser (IServiceRequest request, IAuthenticationAttributes authAttribtues) <0xb3f24810 + 0x00067> in <filename unknown>:0 	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.Authenticate (IServiceRequest request, IAuthenticationAttributes authAttribtues) <0xb3f247e0 + 0x0001f> in <filename unknown>:0 	  at MediaBrowser.Controller.Net.AuthenticatedAttribute.RequestFilter (IRequest request, IResponse response, System.Object requestDto) <0xb3f24778 + 0x0005f> in <filename unknown>:0 	  at ServiceStack.ServiceStackHost.ApplyRequestFiltersSingle (IRequest req, IResponse res, System.Object requestDto) <0xb3f9a610 + 0x00232> in <filename unknown>:0 	  at ServiceStack.ServiceStackHost.ApplyRequestFilters (IRequest req, IResponse res, System.Object requestDto) <0xb3f9a220 + 0x00098> in <filename unknown>:0 	  at ServiceStack.Host.RestHandler.ProcessRequestAsync (IRequest httpReq, IResponse httpRes, System.String operationName) <0xb3f960e8 + 0x0044a> in <filename unknown>:0 	2015-12-23 21:54:19.4070 Info HttpServer: HTTP Response 401 to 192.168.1.9. Time: 10ms. http://192.168.1.3:8096/emby/ScheduledTasks2015-12-23 21:54:19.4070 Info HttpServer: HTTP Response 401 to 192.168.1.9. Time: 7ms. http://192.168.1.3:8096/emby/DisplayPreferences/dashboard?userId=85a345e4371f4329933e0bd69ed76954&client=dashboard2015-12-23 21:54:19.4106 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/Sessions. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:19.4334 Error HttpAsyncTaskHandler: Error occured while Processing Request: Access token has expired.	*** Error Report ***	Version: 3.0.5781.9	Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe -restartpath /usr/lib/emby-server/restart.sh	Operating system: Unix 3.2.0.4	Processor count: 2	64-Bit OS: False	64-Bit Process: False	Program data path: /var/lib/emby-server	Mono: 4.2.1 (Stable 4.2.1.102/6dd2d0d Fri Dec  4 18:52:28 UTC 2015)	Application Path: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe	Access token has expired.	MediaBrowser.Controller.Net.SecurityException	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.ValidateSecurityToken (IServiceRequest request, System.String token) <0xb3f25160 + 0x00133> in <filename unknown>:0 	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.ValidateUser (IServiceRequest request, IAuthenticationAttributes authAttribtues) <0xb3f24810 + 0x00067> in <filename unknown>:0 	  at MediaBrowser.Server.Implementations.HttpServer.Security.AuthService.Authenticate (IServiceRequest request, IAuthenticationAttributes authAttribtues) <0xb3f247e0 + 0x0001f> in <filename unknown>:0 	  at MediaBrowser.Controller.Net.AuthenticatedAttribute.RequestFilter (IRequest request, IResponse response, System.Object requestDto) <0xb3f24778 + 0x0005f> in <filename unknown>:0 	  at ServiceStack.ServiceStackHost.ApplyRequestFiltersSingle (IRequest req, IResponse res, System.Object requestDto) <0xb3f9a610 + 0x00232> in <filename unknown>:0 	  at ServiceStack.ServiceStackHost.ApplyRequestFilters (IRequest req, IResponse res, System.Object requestDto) <0xb3f9a220 + 0x00098> in <filename unknown>:0 	  at ServiceStack.Host.RestHandler.ProcessRequestAsync (IRequest httpReq, IResponse httpRes, System.String operationName) <0xb3f960e8 + 0x0044a> in <filename unknown>:0 	2015-12-23 21:54:19.4348 Info HttpServer: HTTP Response 401 to 192.168.1.9. Time: 24ms. http://192.168.1.3:8096/emby/Sessions2015-12-23 21:54:19.4400 Debug SessionManager: Disposing session controller WebSocketController2015-12-23 21:54:19.4439 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 135ms. http://192.168.1.3:8096/emby/System/Info2015-12-23 21:54:19.4481 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/users/public. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:19.4511 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/Branding/Configuration. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:19.4543 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 6ms. http://192.168.1.3:8096/emby/users/public2015-12-23 21:54:19.5308 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 79ms. http://192.168.1.3:8096/emby/Branding/Configuration2015-12-23 21:54:19.5335 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 134ms. http://192.168.1.3:8096/emby/News/Product?StartIndex=0&Limit=72015-12-23 21:54:24.0002 Info HttpServer: HTTP POST http://192.168.1.3:8096/emby/Users/authenticatebyname. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.0046 Info UserManager: Authentication request for Antonio has succeeded.2015-12-23 21:54:24.0046 Info SessionManager: Creating new access token for user 85a345e4371f4329933e0bd69ed769542015-12-23 21:54:24.0493 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 49ms. http://192.168.1.3:8096/emby/Users/authenticatebyname2015-12-23 21:54:24.0699 Info HttpServer: HTTP POST http://192.168.1.3:8096/emby/Sessions/Capabilities/Full. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.0893 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/System/ActivityLog/Entries?startIndex=0&limit=7&minDate=2015-12-22T21:54:24.085Z. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1072 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/System/Info. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1145 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 7ms. http://192.168.1.3:8096/emby/System/Info2015-12-23 21:54:24.1164 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/DisplayPreferences/dashboard?userId=85a345e4371f4329933e0bd69ed76954&client=dashboard. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1193 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/Sessions. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1193 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/ScheduledTasks. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1232 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/News/Product?StartIndex=0&Limit=7. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1389 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 40ms. http://192.168.1.3:8096/emby/System/ActivityLog/Entries?startIndex=0&limit=7&minDate=2015-12-22T21:54:24.085Z2015-12-23 21:54:24.1397 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/Users/85a345e4371f4329933e0bd69ed76954. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1422 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 22ms. http://192.168.1.3:8096/emby/Sessions2015-12-23 21:54:24.1424 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 22ms. http://192.168.1.3:8096/emby/ScheduledTasks2015-12-23 21:54:24.1424 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 26ms. http://192.168.1.3:8096/emby/DisplayPreferences/dashboard?userId=85a345e4371f4329933e0bd69ed76954&client=dashboard2015-12-23 21:54:24.1458 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 6ms. http://192.168.1.3:8096/emby/Users/85a345e4371f4329933e0bd69ed769542015-12-23 21:54:24.1627 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/System/Info. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1955 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/Users/85a345e4371f4329933e0bd69ed76954. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.1966 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 73ms. http://192.168.1.3:8096/emby/News/Product?StartIndex=0&Limit=72015-12-23 21:54:24.1988 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 36ms. http://192.168.1.3:8096/emby/System/Info2015-12-23 21:54:24.2036 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 8ms. http://192.168.1.3:8096/emby/Users/85a345e4371f4329933e0bd69ed769542015-12-23 21:54:24.2089 Info HttpServer: HTTP Response 204 to 192.168.1.9. Time: 139ms. http://192.168.1.3:8096/emby/Sessions/Capabilities/Full2015-12-23 21:54:24.2221 Info HttpServer: HTTP POST http://192.168.1.3:8096/emby/Sessions/Capabilities/Full. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.2687 Info HttpServer: HTTP Response 204 to 192.168.1.9. Time: 46ms. http://192.168.1.3:8096/emby/Sessions/Capabilities/Full2015-12-23 21:54:24.2839 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/Packages/Updates?PackageType=UserInstalled. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.3318 Info HttpServer: WS ws://192.168.1.3:8096/embywebsocket?api_key=05297bc18674409e9999c4df47dc847f&deviceId=85d3b7926da943dcd76a3639894e3aafee927a96. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.3318 Debug HttpServer: Web socket connection allowed2015-12-23 21:54:24.3542 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 70ms. http://192.168.1.3:8096/emby/Packages/Updates?PackageType=UserInstalled2015-12-23 21:54:24.3632 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/Packages/Updates?PackageType=System. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:24.3674 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 4ms. http://192.168.1.3:8096/emby/Packages/Updates?PackageType=System2015-12-23 21:54:24.4434 Info App: ScheduledTasksWebSocketListener Begin transmitting over websocket to 192.168.1.9:480522015-12-23 21:54:24.4433 Info App: SessionInfoWebSocketListener Begin transmitting over websocket to 192.168.1.9:480522015-12-23 21:54:24.4433 Info App: ActivityLogWebSocketListener Begin transmitting over websocket to 192.168.1.9:480522015-12-23 21:54:28.3321 Info App: ActivityLogWebSocketListener Begin transmitting over websocket to 192.168.1.9:480522015-12-23 21:54:28.3321 Info App: ActivityLogWebSocketListener stop transmitting over websocket to 192.168.1.9:480522015-12-23 21:54:28.3324 Info App: SessionInfoWebSocketListener stop transmitting over websocket to 192.168.1.9:480522015-12-23 21:54:28.3324 Info App: ScheduledTasksWebSocketListener stop transmitting over websocket to 192.168.1.9:480522015-12-23 21:54:29.7029 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/System/Logs. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.02015-12-23 21:54:29.7669 Info HttpServer: HTTP Response 200 to 192.168.1.9. Time: 64ms. http://192.168.1.3:8096/emby/System/Logs2015-12-23 21:54:39.9301 Info HttpServer: HTTP GET http://192.168.1.3:8096/emby/System/Logs/Log?name=server-63586425600.txt&api_key=05297bc18674409e9999c4df47dc847f. UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0
Edited by geotux
Link to comment
Share on other sites

Yes it would make sense. The way it is now it was a quick and easy addition to incorporate. An improvement would be to go through each of the apps and add friendly error messages.

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