Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta app fails to connect, server wipes devices+api-keys #6081

Closed
krutburken opened this issue May 19, 2021 · 8 comments
Closed

Beta app fails to connect, server wipes devices+api-keys #6081

krutburken opened this issue May 19, 2021 · 8 comments

Comments

@krutburken
Copy link

@krutburken krutburken commented May 19, 2021

Describe the bug
When using 2.3.0-beta1 on 10.7.5 I'm unable to connect ("Unable to connect to the server right now"), and after the failure, the server wipes all devices and api-keys. I first thought this was due to the 10.7.5 release (#6003), but I just got the problem a second time when testing the beta app on a fully functional installation.

To Reproduce

  1. Install 10.7.5
  2. Try to log in with 2.3.0-beta1
  3. Login fails and all api-keys and existing devices are wiped from the server

Expected behavior
Login successful

Logs
I unfortunately only have the server logs. And I really don't want to wipe all the devices again as it forces everyone using it to login again.

[2021-05-07 09:08:07.099 +00:00] [ERR] [73] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Users/authenticatebyname".
System.ArgumentNullException: Value cannot be null. (Parameter 'appName')
   at Emby.Server.Implementations.Session.SessionManager.LogSessionActivity(String appName, String appVersion, String deviceId, String deviceName, String remoteEndPoint, User user)
   at Emby.Server.Implementations.Session.SessionManager.AuthenticateNewSessionInternal(AuthenticationRequest request, Boolean enforcePassword)
   at Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(AuthenticateUserByName request)
   at lambda_method22341(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

System (please complete the following information):

  • App version: 2.3.0-beta1
  • Android version: 11
  • Device manufacturer and model: Google Pixel 2
  • Jellyfin server version: 10.7.5
@nielsvanvelzen
Copy link
Member

@nielsvanvelzen nielsvanvelzen commented May 19, 2021

The server wiping all sessions is a long standing issue but is fixed in the next release (#6038). Also, this is an server issue so I'm moving it.

@nielsvanvelzen nielsvanvelzen transferred this issue from jellyfin/jellyfin-android May 19, 2021
@krutburken
Copy link
Author

@krutburken krutburken commented May 19, 2021

The server wiping all sessions is a long standing issue but is fixed in the next release (#6038). Also, this is an server issue so I'm moving it.

I see, great news. Is the failure to login related to this or a separate issue?

@nielsvanvelzen
Copy link
Member

@nielsvanvelzen nielsvanvelzen commented May 19, 2021

From my testing the login failure was a result of the server removing everything.

@krutburken krutburken changed the title Beta app fails to connect, wipes devices+api-keys from server Beta app fails to connect, server wipes devices+api-keys May 19, 2021
@krutburken
Copy link
Author

@krutburken krutburken commented May 19, 2021

I guess I'll leave this for now. If they're related and fixed by #6038 feel free to close the issue.

@kabo
Copy link

@kabo kabo commented Jun 20, 2021

Any update on this? Just as I got past the android app issue, this bug pops up and prevents the use of jellyfin from my phone. Are there any workarounds or something like that? Should downgrading work?

@crobibero
Copy link
Member

@crobibero crobibero commented Jun 20, 2021

The issue of all of the authentication tokens being removed was fixed with the release of 10.7.6. I believe either downloading a newer beta directly from the android repo here should fix your connection issue.

@crobibero crobibero closed this Jun 20, 2021
@kabo
Copy link

@kabo kabo commented Jun 20, 2021

Woohoo, you're right, I checked the other day and there were no updates, but with 10.7.6 it works again! :)

@Extarys
Copy link

@Extarys Extarys commented Jul 1, 2021

Fixed. Looks like beta3 and 4 aren't the latest. Frdoid is outdated and github webpage on mobile showed me the wrong thing xD

Thx to here jellyfin/jellyfin-android#329

@crobibero I can open a new issue if needed but I'm on the phone so it's quite tedious but I ran into the same scenario as @kabo

I had to disconnect from the app and when I tried logging in I had this issue. I can no longer log in from the android app. I tried the web to make sure and it works. I tried both apk from the 2.3.0-beta4 on Android and I get the following:

(All logs from the same second)

 [INF] [67] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "myuser" has succeed
[INF] [67] Emby.Server.Implementations.Session.SessionManager: Reissuing access token: "3af26ab58311429baf13cbe89b2cce06"
[2021-07-01 08:49:33.908 -04:00] [ERR] [67] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/Users/authenticatebyname".
System.ArgumentNullException: Value cannot be null. (Parameter 'appName')
   at Emby.Server.Implementations.Session.SessionManager.LogSessionActivity(String appName, String appVersion, String deviceId, String deviceName, String remoteEndPoint, User user)
   at Emby.Server.Implementations.Session.SessionManager.AuthenticateNewSessionInternal(AuthenticationRequest request, Boolean enforcePassword)
   at Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(AuthenticateUserByName request)
   at lambda_method1227(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

I started by wiping cache/data and reinstalling the beta3. Then I tried both open and proprietary beta4.

Sorry for my short reply I'm on mobile/away.

Edit:
Android 11 on a Samsung A70 server version 10.7.6

Edit2: I tried removing the android session from Devices but I get the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants