I can no longer log in

Hello!

I have reinstalled Windows on my PC and when setting it up I found that I can no longer log into my Bitwarden instance. Due to the reinstallation of Windows, I thought that the client has a problem (missing dependencies, etc.) and then went directly to the web interface of my self-hosted instance via Chrome Brwoser and could unfortunately reproduce the error there. I then connected to my server via SSH and reproduced the error and looked at the logs, this is what came up:

bitwarden-identity |       ClientConnectionId:ae2ab921-3bf6-4d96-a623-ed824ff50c8c
bitwarden-identity |       Error Number:201,State:4,Class:16
bitwarden-identity | fail: Microsoft.AspNetCore.Server.Kestrel[13]
bitwarden-identity |       => SpanId:eee9e341c5a9a43b, TraceId:a54b9e889b2ef1b40b187a336c3bf133, ParentId:0000000000000000 => ConnectionId:0HMQ0289IR6QD => RequestPath:/identity/connect/token RequestId:0HMQ0289IR6QD:00000002
bitwarden-identity |       Connection id "0HMQ0289IR6QD", Request id "0HMQ0289IR6QD:00000002": An unhandled exception was thrown by the application.
bitwarden-identity |       Microsoft.Data.SqlClient.SqlException (0x80131904): Procedure or function 'Event_Create' expects parameter '@DomainName', which was not supplied.
bitwarden-identity |          at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
bitwarden-identity |          at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
bitwarden-identity |          at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
bitwarden-identity |          at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
bitwarden-identity |          at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
bitwarden-identity |          at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
bitwarden-identity |          at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
bitwarden-identity |          at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
bitwarden-identity |          at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult)
bitwarden-identity |          at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
bitwarden-identity |       --- End of stack trace from previous location ---
bitwarden-identity |          at Dapper.SqlMapper.ExecuteImplAsync(IDbConnection cnn, CommandDefinition command, Object param) in /_/Dapper/SqlMapper.Async.cs:line 654
bitwarden-identity |          at Bit.Infrastructure.Dapper.Repositories.Repository`2.CreateAsync(T obj) in /home/runner/work/server/server/src/Infrastructure.Dapper/Repositories/Repository.cs:line 52
bitwarden-identity |          at Bit.Infrastructure.Dapper.Repositories.EventRepository.CreateAsync(IEvent e) in /home/runner/work/server/server/src/Infrastructure.Dapper/Repositories/EventRepository.cs:line 92
bitwarden-identity |          at Bit.Core.Services.RepositoryEventWriteService.CreateAsync(IEvent e) in /home/runner/work/server/server/src/Core/Services/Implementations/RepositoryEventWriteService.cs:line 18
bitwarden-identity |          at Bit.Core.Services.EventService.LogUserEventAsync(Guid userId, EventType type, Nullable`1 date) in /home/runner/work/server/server/src/Core/Services/Implementations/EventService.cs:line 84
bitwarden-identity |          at Bit.Identity.IdentityServer.BaseRequestValidator`1.BuildSuccessResultAsync(User user, T context, Device device, Boolean sendRememberToken) in /home/runner/work/server/server/src/Identity/IdentityServer/BaseRequestValidator.cs:line 166
bitwarden-identity |          at Bit.Identity.IdentityServer.BaseRequestValidator`1.ValidateAsync(T context, ValidatedTokenRequest request, CustomValidatorRequestContext validatorContext) in /home/runner/work/server/server/src/Identity/IdentityServer/BaseRequestValidator.cs:line 160
bitwarden-identity |          at Bit.Identity.IdentityServer.ResourceOwnerPasswordValidator.ValidateAsync(ResourceOwnerPasswordValidationContext context) in /home/runner/work/server/server/src/Identity/IdentityServer/ResourceOwnerPasswordValidator.cs:line 99
bitwarden-identity |          at IdentityServer4.Validation.TokenRequestValidator.ValidateResourceOwnerCredentialRequestAsync(NameValueCollection parameters)
bitwarden-identity |          at IdentityServer4.Validation.TokenRequestValidator.RunValidationAsync(Func`2 validationFunc, NameValueCollection parameters)
bitwarden-identity |          at IdentityServer4.Validation.TokenRequestValidator.ValidateRequestAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult)
bitwarden-identity |          at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context)
bitwarden-identity |          at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context)
bitwarden-identity |          at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
bitwarden-identity |          at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
bitwarden-identity |          at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes)
bitwarden-identity |          at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
bitwarden-identity |          at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
bitwarden-identity |          at Bit.Core.Utilities.CurrentContextMiddleware.Invoke(HttpContext httpContext, ICurrentContext currentContext, GlobalSettings globalSettings) in /home/runner/work/server/server/src/Core/Utilities/CurrentContextMiddleware.cs:line 20
bitwarden-identity |          at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
bitwarden-identity |          at Bit.SharedWeb.Utilities.ServiceCollectionExtensions.<>c__DisplayClass11_0.<<UseDefaultMiddleware>b__1>d.MoveNext() in /home/runner/work/server/server/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs:line 505
bitwarden-identity |       --- End of stack trace from previous location ---
bitwarden-identity |          at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath)
bitwarden-identity |          at Bit.Identity.Startup.<>c__DisplayClass10_1.<<Configure>b__2>d.MoveNext() in /home/runner/work/server/server/src/Identity/Startup.cs:line 175
bitwarden-identity |       --- End of stack trace from previous location ---
bitwarden-identity |          at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
bitwarden-identity |       ClientConnectionId:ae2ab921-3bf6-4d96-a623-ed824ff50c8c
bitwarden-identity |       Error Number:201,State:4,Class:16
bitwarden-attachments | info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
bitwarden-attachments |       Request starting HTTP/1.1 GET http://localhost:5000/alive - -
bitwarden-attachments | info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
bitwarden-attachments |       Executing endpoint '/alive HTTP: GET'
bitwarden-attachments | info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
bitwarden-attachments |       Executed endpoint '/alive HTTP: GET'
bitwarden-attachments | info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
bitwarden-attachments |       Request finished HTTP/1.1 GET http://localhost:5000/alive - - - 200 - - 0.1023ms
bitwarden-web    | info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
bitwarden-web    |       Request starting HTTP/1.1 GET http://localhost:5000/ - -
bitwarden-web    | info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
bitwarden-web    |       Sending file. Request path: '/index.html'. Physical path: '/app/index.html'
bitwarden-web    | info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
bitwarden-web    |       Request finished HTTP/1.1 GET http://localhost:5000/ - - - 200 1238 text/html 1.5267ms

Fortunately I am still able to open and sync the Vault on other devices (mobile, workstation), it seems like new instances only have the problem with the pre-auth token.

All images have version “2023.2.1” (except bitwarden/web 2023.2.0, which is still latest according to hub).

Does anyone have an idea what this could be?

Best Regards

The web vault client is on version 2023.3.0 — what do you mean by “according to hub”?

Bitwarden Server is also on version 2023.3.0.

Can you log in to your System Administrator Portal and screenshot the dashboard that shows the server & web client versions?

I would suggest updating to the latest versions of the server and clients, and trying again.