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

Login not working after update to latest beta #335

Open
1 of 2 tasks
MichaelSch opened this issue Dec 31, 2024 · 8 comments
Open
1 of 2 tasks

Login not working after update to latest beta #335

MichaelSch opened this issue Dec 31, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@MichaelSch
Copy link

MichaelSch commented Dec 31, 2024

Self-host installation scripts issue

  • I understand this repository only tracks self-host installation scripts and any other issues should be reported in bitwarden/server

Steps To Reproduce

  1. Go to your bitwarden instance
  2. Try to log in

Expected Result

You are logged in

Actual Result

An unknown error occurs after entering the TOTP. From identity.log

  => SpanId:0028e3a2ebc851fa, TraceId:b76d5f72e1d0811f72c96ca850eb3d14, ParentId:0000000000000000 => ConnectionId:0HN99HET88LQO => RequestPath:/identity/connect/token RequestId:0HN99HET88LQO:00000001
  Connection id "0HN99HET88LQO", Request id "0HN99HET88LQO:00000001": An unhandled exception was thrown by the application.
  System.Text.Json.JsonException: 'b' is invalid after a single JSON value. Expected end of data. Path: $ | LineNumber: 15 | BytePositionInLine: 1.
   ---> System.Text.Json.JsonReaderException: 'b' is invalid after a single JSON value. Expected end of data. LineNumber: 15 | BytePositionInLine: 1.
     at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
     at System.Text.Json.Utf8JsonReader.ConsumeNextToken(Byte marker)
     at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
     at System.Text.Json.Utf8JsonReader.Read()
     at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
     --- End of inner exception stack trace ---
     at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
     at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
     at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Deserialize(Utf8JsonReader& reader, ReadStack& state)
     at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
     at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
     at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
     at Bit.Core.Services.LicensingService.ReadUserLicense(User user) in /source/src/Core/Services/Implementations/LicensingService.cs:line 286
     at Bit.Core.Services.LicensingService.ProcessUserValidationAsync(User user) in /source/src/Core/Services/Implementations/LicensingService.cs:line 212
     at Bit.Core.Services.LicensingService.ValidateUserPremiumAsync(User user) in /source/src/Core/Services/Implementations/LicensingService.cs:line 207
     at Bit.Identity.IdentityServer.ProfileService.GetProfileDataAsync(ProfileDataRequestContext context) in /source/src/Identity/IdentityServer/ProfileService.cs:line 46
     at Duende.IdentityServer.Services.DefaultClaimsService.GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resourceResult, ValidatedRequest request) in /_/src/IdentityServer/Services/Default/DefaultClaimsService.cs:line 211
     at Duende.IdentityServer.Services.DefaultTokenService.CreateAccessTokenAsync(TokenCreationRequest request) in /_/src/IdentityServer/Services/Default/DefaultTokenService.cs:line 180
     at Duende.IdentityServer.ResponseHandling.TokenResponseGenerator.ProcessRefreshTokenRequestAsync(TokenRequestValidationResult request) in /_/src/IdentityServer/ResponseHandling/Default/TokenResponseGenerator.cs:line 200
     at Duende.IdentityServer.ResponseHandling.TokenResponseGenerator.ProcessAsync(TokenRequestValidationResult request) in /_/src/IdentityServer/ResponseHandling/Default/TokenResponseGenerator.cs:line 101
     at Duende.IdentityServer.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) in /_/src/IdentityServer/Endpoints/TokenEndpoint.cs:line 133
     at Duende.IdentityServer.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) in /_/src/IdentityServer/Endpoints/TokenEndpoint.cs:line 81
     at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IdentityServerOptions options, IEndpointRouter router, IUserSession userSession, IEventService events, IIssuerNameService issuerNameService, ISessionCoordinationService sessionCoordinationService) in /_/src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 106
     at Duende.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IdentityServerOptions options, IEndpointRouter router, IUserSession userSession, IEventService events, IIssuerNameService issuerNameService, ISessionCoordinationService sessionCoordinationService) in /_/src/IdentityServer/Hosting/IdentityServerMiddleware.cs:line 128
     at Duende.IdentityServer.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) in /_/src/IdentityServer/Hosting/MutualTlsEndpointMiddleware.cs:line 95
     at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
     at Duende.IdentityServer.Hosting.DynamicProviders.DynamicSchemeAuthenticationMiddleware.Invoke(HttpContext context) in /_/src/IdentityServer/Hosting/DynamicProviders/DynamicSchemes/DynamicSchemeAuthenticationMiddleware.cs:line 51
     at Duende.IdentityServer.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) in /_/src/IdentityServer/Hosting/BaseUrlMiddleware.cs:line 27
     at Bit.Core.Utilities.CurrentContextMiddleware.Invoke(HttpContext httpContext, ICurrentContext currentContext, GlobalSettings globalSettings) in /source/src/Core/Utilities/CurrentContextMiddleware.cs:line 19
     at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
     at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath)
     at Bit.Identity.Startup.<>c__DisplayClass10_1.<<Configure>b__2>d.MoveNext() in /source/src/Identity/Startup.cs:line 188
  --- End of stack trace from previous location ---
     at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Screenshots or Videos

No response

Additional Context

No response

Build Version

1024.12.1

Environment

Self-Hosted

Environment Details

No response

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@MichaelSch MichaelSch added the bug Something isn't working label Dec 31, 2024
@daniellbw
Copy link

Hi @MichaelSch

Are you using the linux standard deployment or are you self hosting with helm? (https://bitwarden.com/help/self-host-with-helm/)

@MichaelSch
Copy link
Author

MichaelSch commented Dec 31, 2024

It‘s the default linux deployment using the Unified beta via podman

@7djs7
Copy link

7djs7 commented Jan 1, 2025

Having this same issue, noticed it today. Going back to 12.1 image from two weeks ago works. https://hub.docker.com/r/bitwarden/self-host/tags?page=2

@baldemar-wuda
Copy link

Also having this issue (Docker deployment, bitwarden/self-host:beta)

@wbagdon
Copy link

wbagdon commented Jan 9, 2025

I also had this issue on bitwarden/self-host:beta

In my case the license file in /etc/bitwarden/licenses/user/ had gotten corrupted
The second to last line of the file for my user was making the json invalid and needed to be deleted
I was able to login after doing this, and I re-uploaded my license file for good measure

@MichaelSch
Copy link
Author

Thanks @wbagdon,

it was the same for me. After deleting the last line in the license file login is working again. So the question is why the file gets corrupted.

@daniellbw
Copy link

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@7djs7
Copy link

7djs7 commented Jan 10, 2025

I also had this issue on bitwarden/self-host:beta

In my case the license file in /etc/bitwarden/licenses/user/ had gotten corrupted The second to last line of the file for my user was making the json invalid and needed to be deleted I was able to login after doing this, and I re-uploaded my license file for good measure

Did this. Deleted the second to the last line in the .Json file and then went back to the beta tag in docker compose and it's now working great. I'm on 2025.1.0. I did not however need to re-upload my license file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants