jellyfin / jellyfin

The Free Software Media System
https://jellyfin.org
GNU General Public License v2.0
33.47k stars 3.05k forks source link

System.ArgumentNullException: Value cannot be null. (Parameter 'resolvedUser') #2884

Closed mahriman closed 3 years ago

mahriman commented 4 years ago

Describe the bug After updating to Windows 10 version 1909 and two reboots, Jellyfin complains that it cannot contact the server when trying to login.

System (please complete the following information):

To Reproduce Don't know how to reproduce

Expected behavior Jellyfin surviving reboots

Logs

[2020-04-15 15:45:52.733 +02:00] [ERR] [10] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request: "Access token is invalid or expired."
[2020-04-15 15:45:56.738 +02:00] [ERR] [33] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request
System.ArgumentNullException: Value cannot be null. (Parameter 'resolvedUser')
   at Emby.Server.Implementations.Library.DefaultAuthenticationProvider.Authenticate(String username, String password, User resolvedUser)
   at Emby.Server.Implementations.Library.UserManager.AuthenticateWithProvider(IAuthenticationProvider provider, String username, String password, User resolvedUser)
   at Emby.Server.Implementations.Library.UserManager.AuthenticateLocalUser(String username, String password, String hashedPassword, User user, String remoteEndPoint)
   at Emby.Server.Implementations.Library.UserManager.AuthenticateUser(String username, String password, String hashedPassword, String remoteEndPoint, Boolean isUserSession)
   at Emby.Server.Implementations.Session.SessionManager.AuthenticateNewSessionInternal(AuthenticationRequest request, Boolean enforcePassword)
   at MediaBrowser.Api.UserService.Post(AuthenticateUserByName request)
   at Emby.Server.Implementations.Services.ServiceExecGeneral.GetTaskResult(Task task)
   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IRequest httpReq, HttpResponse httpRes, ILogger logger, CancellationToken cancellationToken)
   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)

Screenshots Missed screenshotting the web ui error message upon login, but something along the line "Cannot contact the Jellyfin server"

Additional context

I posted a not-so-different bug report a couple of days ago regarding Jellyfins ability to retain directory access and/or removing old directories completely when uninstalling (https://github.com/jellyfin/jellyfin-server-windows/issues/21).

Bond-009 commented 4 years ago

Did you clear your browser cache?

mahriman commented 4 years ago

Did you clear your browser cache?

No, I did ctrl-refresh though.

Thijzer commented 4 years ago

Same here.

UI message

Connection Failure
We're unable to connect to the selected server right now. Please ensure it is running and try again.

logs

[07:27:59] [WRN] [13] Emby.Server.Implementations.HttpServer.HttpListenerHost: HTTP Response 200 to 78.47.169.191. Time (slow): 0:00:09.446365. http://xxx/web/bundle.js?v=10.5.4
[07:28:36] [ERR] [34] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request. URL: http://xxx/Users/authenticatebyname
System.ArgumentNullException: Value cannot be null. (Parameter 'resolvedUser')

This happens during first time login for me after the wizard.

I'm running on a pi4

Thijzer commented 4 years ago

I'm gonna guess here, the calls are forced http in the logs, while I'm on https. That looks like an issue to me. I'll try to open the port and connect locally

Thijzer commented 4 years ago

nope, same error locally on http, I did a fresh install and now my issue is gone

Spilarix commented 4 years ago

Probably related to issue #2941

Stampede10343 commented 4 years ago

I saw this same issue when updating from 10.5 to 10.6, then reverting to 10.5.

On linux (docker). Sounds like some kind of migration issue, sticking with 10.6 for now works fine.

icksky commented 4 years ago

@Stampede10343 I have the same problem with you. Because I can not install KodiSyncQueue so I chose to downgrade to 10.5.5. I solved this by removing old from file name which file's name with old in /path to jellyfin/config/data/data. such as rename config/data/data/users.db.old to config/data/data/users.db. maybe you should backup config/data/data/users.db first. don't forget move logging.old.json to logging.default.json in /path to jellyfin/config After this process you may encounter some problems, such as you can't enter the console. Just clear browser cache and refresh.

stale[bot] commented 3 years ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.