bitwarden / server

Bitwarden infrastructure/backend (API, database, Docker, etc).
https://bitwarden.com
Other
15.78k stars 1.32k forks source link

Conect with device: after acepting the notificationon the phone, nothing happens on the source device #3011

Open MuadDibIII opened 1 year ago

MuadDibIII commented 1 year ago

Steps To Reproduce

  1. I'm logged on my phone's app
  2. on my Firefox extension, I type my e-mail and on the next step I choose "Login with device" option
  3. I receive a notification on my phone
  4. I check the fingerprint phrase and accept the connection on my phone

Expected Result

Th Firefox extension should log on my Bitwarden vault

Actual Result

Nothing happens on the extension, it keeps waiting the response for the login

Screenshots or Videos

No response

Additional Context

No response

Build Version

Firefox extension 2023.5.0 / Unified server 2023.5.0 / Android app 2023.5.0 (6330)

Environment

Self-Hosted

Environment Details

Synology DSM 7.2

Issue Tracking Info

justindbaur commented 1 year ago

Are you running with BW_ENABLE_NOTIFICATIONS=true?

MuadDibIII commented 1 year ago

Hello, thanks for the quick reply. Yes, the setting is set to TRUE: image

If it was not the case, would I receive the phone notification to validate?

justindbaur commented 1 year ago

Oh yes, sorry, the only thing I can think of is there anything of interest in your api.log/notificaitons.log in var/log/bitwarden?

MuadDibIII commented 1 year ago

I did found this on the API.log:

fail: Bit.Core.Services.RelayPushNotificationService[12339] => SpanId:f9f9dd09e931f176, TraceId:bee11591b8484aaf3baf60b19e41fde1, ParentId:0000000000000000 => ConnectionId:0HMR1PDNA9E84 => RequestPath:/auth-requests/ RequestId:0HMR1PDNA9E84:00000002 => Bit.Api.Auth.Controllers.AuthRequestsController.Post (Api) Unable to authenticate with identity server. System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.IO.IOException: The response ended prematurely. at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Bit.Core.Services.BaseIdentityClientService.HandleTokenStateAsync() in /source/src/Core/Services/Implementations/BaseIdentityClientService.cs:line 163 fail: Bit.Core.Services.RelayPushNotificationService[0] => SpanId:f9f9dd09e931f176, TraceId:bee11591b8484aaf3baf60b19e41fde1, ParentId:0000000000000000 => ConnectionId:0HMR1PDNA9E84 => RequestPath:/auth-requests/ RequestId:0HMR1PDNA9E84:00000002 => Bit.Api.Auth.Controllers.AuthRequestsController.Post (Api) Empty token response from https://identity.bitwarden.com/ for client installation.XXXXXXXXXXXXXXXXXXXXXXXXX fail: Bit.Core.Services.RelayPushNotificationService[0] => SpanId:f9f9dd09e931f176, TraceId:bee11591b8484aaf3baf60b19e41fde1, ParentId:0000000000000000 => ConnectionId:0HMR1PDNA9E84 => RequestPath:/auth-requests/ RequestId:0HMR1PDNA9E84:00000002 => Bit.Api.Auth.Controllers.AuthRequestsController.Post (Api) Unable to send POST request to https://push.bitwarden.com/push/send because an access token was unable to be obtained

I don't see nothing wrong on the notifications log, but I can post it if you want...

justindbaur commented 1 year ago

@MuadDibIII That helps a ton, can you try adding globalSettings__installation__identityUri=https://localhost:5005 to your settings.env file, restarting and seeing if that fixes it? And if not include any errors from api.log again.

MuadDibIII commented 1 year ago

I just checked, today I have globalSettingsbaseServiceUriinternalIdentity=http://localhost:5005

Should I also add your variable or replace the current one? Note that the actual uses http, not https

justindbaur commented 1 year ago

@MuadDibIII Yeah, also add that one, and good point, make it http. If this works I will work on making it try and use the baseServiceUri one if one isn't present instead of defaulting to our cloud one. But first I just want to make sure this fixes the issue.

MuadDibIII commented 1 year ago

Hello, I just tested and it doesn't work. This time at least I don't get any errors on the api.log file:

2023-06-12 20:27:14.453 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state 2023-06-12 20:30:08.215 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state 2023-06-12 20:30:11.376 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state 2023-06-12 20:30:11.376 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state 2023-06-12 20:30:11.378 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state 2023-06-12 20:30:11.390 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state 2023-06-12 20:30:13.676 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state 2023-06-12 20:30:13.683 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state 2023-06-12 20:30:13.687 +00:00 [LaunchDarkly.Sdk.Evaluation] WARN: AllFlagsState() called when client is in offline mode; returning empty state fail: Bit.Core.Services.RelayPushNotificationService[0] => SpanId:1473878c9a2a2b08, TraceId:46c7ba9f7870749f50b1c67661ee02d3, ParentId:0000000000000000 => ConnectionId:0HMRBEHQHJ5FM => RequestPath:/auth-requests/ RequestId:0HMRBEHQHJ5FM:00000002 => Bit.Api.Auth.Controllers.AuthRequestsController.Post (Api) Unsuccessful token response from http://localhost:5005/ for client installation.b1772dae-XXXX-XXXX-XXXX-af9a00ce188b with status InternalServerError-Internal Server Error fail: Bit.Core.Services.RelayPushNotificationService[0] => SpanId:1473878c9a2a2b08, TraceId:46c7ba9f7870749f50b1c67661ee02d3, ParentId:0000000000000000 => ConnectionId:0HMRBEHQHJ5FM => RequestPath:/auth-requests/ RequestId:0HMRBEHQHJ5FM:00000002 => Bit.Api.Auth.Controllers.AuthRequestsController.Post (Api) Unable to send POST request to https://push.bitwarden.com/push/send because an access token was unable to be obtained fail: Bit.Core.Services.RelayPushNotificationService[0] => SpanId:40ac2a404729c77e, TraceId:08d5a34ce6e76f5b9db92042534b2acc, ParentId:0000000000000000 => ConnectionId:0HMRBEHQHJ5FR => RequestPath:/auth-requests/49288e82-9fef-40d5-9bf4-b01f0151e949 RequestId:0HMRBEHQHJ5FR:00000002 => Bit.Api.Auth.Controllers.AuthRequestsController.Put (Api) Unsuccessful token response from http://localhost:5005/ for client installation.b1772dae-XXXX-XXXX-XXXX-af9a00ce188b with status InternalServerError-Internal Server Error fail: Bit.Core.Services.RelayPushNotificationService[0] => SpanId:40ac2a404729c77e, TraceId:08d5a34ce6e76f5b9db92042534b2acc, ParentId:0000000000000000 => ConnectionId:0HMRBEHQHJ5FR => RequestPath:/auth-requests/49288e82-9fef-40d5-9bf4-b01f0151e949 RequestId:0HMRBEHQHJ5FR:00000002 => Bit.Api.Auth.Controllers.AuthRequestsController.Put (Api) Unable to send POST request to https://push.bitwarden.com/push/send because an access token was unable to be obtained

The identity.log file also has some errors (sorry but I didn't found time stamps, so it's hard to locate the start of the log):

[40mwarn: IdentityServer4.Services.DefaultRefreshTokenService[0] => SpanId:b8d189a93affa519, TraceId:affa98b7ea0ddd8f4500422e8ca7ff49, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JML => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JML:00000002 Refresh token has expired. warn: IdentityServer4.Validation.TokenRequestValidator[0] => SpanId:b8d189a93affa519, TraceId:affa98b7ea0ddd8f4500422e8ca7ff49, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JML => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JML:00000002 Refresh token validation failed. aborting, { "ClientId": "browser", "GrantType": "refresh_token", "AuthorizationCode": "****", "RefreshToken": "****", "Raw": { "grant_type": "refresh_token", "client_id": "browser", "refresh_token": "REDACTED" } } warn: IdentityServer4.Hosting.CorsPolicyProvider[0] => SpanId:b06f2d2bad051e07, TraceId:afa38426245c1fd276a9246945bc0bbd, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JMN => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JMN:00000002 CorsPolicyService did not allow origin: moz-extension://1671199b-c810-4904-bc92-b851f31266ff warn: Microsoft.AspNetCore.Identity.UserManager[10] => SpanId:b06f2d2bad051e07, TraceId:afa38426245c1fd276a9246945bc0bbd, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JMN => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JMN:00000002 VerifyTwoFactorTokenAsync() failed for user. warn: IdentityServer4.Hosting.CorsPolicyProvider[0] => SpanId:1da613e3ee4da714, TraceId:d28d7eafa51de69931100221af9b6006, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JMO => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JMO:00000002 CorsPolicyService did not allow origin: moz-extension://1671199b-c810-4904-bc92-b851f31266ff crit: IdentityServer4.Hosting.IdentityServerMiddleware[0] => SpanId:8ebd6bfff7c3b1df, TraceId:d28d7eafa51de69931100221af9b6006, ParentId:23662ed9150b5982 => ConnectionId:0HMRBEHGF9JMP => RequestPath:/connect/token RequestId:0HMRBEHGF9JMP:00000002 Unhandled exception: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) fail: Microsoft.AspNetCore.Server.Kestrel[13] => SpanId:8ebd6bfff7c3b1df, TraceId:d28d7eafa51de69931100221af9b6006, ParentId:23662ed9150b5982 => ConnectionId:0HMRBEHGF9JMP => RequestPath:/connect/token RequestId:0HMRBEHGF9JMP:00000002 Connection id "0HMRBEHGF9JMP", Request id "0HMRBEHGF9JMP:00000002": An unhandled exception was thrown by the application. System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 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 Bit.SharedWeb.Utilities.ServiceCollectionExtensions.<>cDisplayClass11_0.<b1>d.MoveNext() in /source/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs:line 527 --- End of stack trace from previous location --- at Bit.Identity.Startup.<>cDisplayClass10_1.<b2>d.MoveNext() in /source/src/Identity/Startup.cs:line 174 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) fail: Bit.Core.Services.RelayPushRegistrationService[0] => SpanId:1da613e3ee4da714, TraceId:d28d7eafa51de69931100221af9b6006, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JMO => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JMO:00000002 Unsuccessful token response from http://localhost:5005/ for client installation.xxxxxxxx-xxxx-xxxx-xxxx-af9a00ce188b with status InternalServerError-Internal Server Error fail: Bit.Core.Services.RelayPushRegistrationService[0] => SpanId:1da613e3ee4da714, TraceId:d28d7eafa51de69931100221af9b6006, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JMO => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JMO:00000002 Unable to send POST request to https://push.bitwarden.com/push/register because an access token was unable to be obtained warn: IdentityServer4.Hosting.CorsPolicyProvider[0] => SpanId:e447d6be15f4b3a6, TraceId:152c6dd4716ceeba3ef8696fc244d7e9, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JMQ => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JMQ:00000002 CorsPolicyService did not allow origin: moz-extension://1671199b-c810-4904-bc92-b851f31266ff crit: IdentityServer4.Hosting.IdentityServerMiddleware[0] => SpanId:0484ad64584dc5c1, TraceId:449754d2224222db3896bfd9089c6b02, ParentId:f0beb795b15349be => ConnectionId:0HMRBEHGF9JMT => RequestPath:/connect/token RequestId:0HMRBEHGF9JMT:00000002 Unhandled exception: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) fail: Microsoft.AspNetCore.Server.Kestrel[13] => SpanId:0484ad64584dc5c1, TraceId:449754d2224222db3896bfd9089c6b02, ParentId:f0beb795b15349be => ConnectionId:0HMRBEHGF9JMT => RequestPath:/connect/token RequestId:0HMRBEHGF9JMT:00000002 Connection id "0HMRBEHGF9JMT", Request id "0HMRBEHGF9JMT:00000002": An unhandled exception was thrown by the application. System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 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 Bit.SharedWeb.Utilities.ServiceCollectionExtensions.<>c__DisplayClass11_0.<<UseDefaultMiddleware>b__1>d.MoveNext() in /source/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs:line 527 --- End of stack trace from previous location --- at Bit.Identity.Startup.<>c__DisplayClass10_1.<<Configure>b__2>d.MoveNext() in /source/src/Identity/Startup.cs:line 174 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) crit: IdentityServer4.Hosting.IdentityServerMiddleware[0] => SpanId:276d1c3c48c80b03, TraceId:8b9e9aa6019f40194de6857e64b0615f, ParentId:4f539480fc28fdcd => ConnectionId:0HMRBEHGF9JMT => RequestPath:/connect/token RequestId:0HMRBEHGF9JMT:00000004 Unhandled exception: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) fail: Microsoft.AspNetCore.Server.Kestrel[13] => SpanId:276d1c3c48c80b03, TraceId:8b9e9aa6019f40194de6857e64b0615f, ParentId:4f539480fc28fdcd => ConnectionId:0HMRBEHGF9JMT => RequestPath:/connect/token RequestId:0HMRBEHGF9JMT:00000004 Connection id "0HMRBEHGF9JMT", Request id "0HMRBEHGF9JMT:00000004": An unhandled exception was thrown by the application. System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 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 Bit.SharedWeb.Utilities.ServiceCollectionExtensions.<>cDisplayClass11_0.<b1>d.MoveNext() in /source/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs:line 527 --- End of stack trace from previous location --- at Bit.Identity.Startup.<>cDisplayClass10_1.<b2>d.MoveNext() in /source/src/Identity/Startup.cs:line 174 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) warn: IdentityServer4.Hosting.CorsPolicyProvider[0] => SpanId:23a545e85a2ca4b0, TraceId:f9a07e81d51e46fb4ce02316bf7fdd5c, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JN0 => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JN0:00000002 CorsPolicyService did not allow origin: moz-extension://1671199b-c810-4904-bc92-b851f31266ff warn: IdentityServer4.Hosting.CorsPolicyProvider[0] => SpanId:05c85ff9816a06e3, TraceId:e4398122a4e3b75942cc637879acfb97, ParentId:0000000000000000 => ConnectionId:0HMRBEHGF9JN1 => RequestPath:/identity/connect/token RequestId:0HMRBEHGF9JN1:00000002 CorsPolicyService did not allow origin: moz-extension://1671199b-c810-4904-bc92-b851f31266ff crit: IdentityServer4.Hosting.IdentityServerMiddleware[0] => SpanId:4485386e89912582, TraceId:46c7ba9f7870749f50b1c67661ee02d3, ParentId:9ac014866d600e85 => ConnectionId:0HMRBEHGF9JN3 => RequestPath:/connect/token RequestId:0HMRBEHGF9JN3:00000002 Unhandled exception: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) fail: Microsoft.AspNetCore.Server.Kestrel[13] => SpanId:4485386e89912582, TraceId:46c7ba9f7870749f50b1c67661ee02d3, ParentId:9ac014866d600e85 => ConnectionId:0HMRBEHGF9JN3 => RequestPath:/connect/token RequestId:0HMRBEHGF9JN3:00000002 Connection id "0HMRBEHGF9JN3", Request id "0HMRBEHGF9JN3:00000002": An unhandled exception was thrown by the application. System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 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 Bit.SharedWeb.Utilities.ServiceCollectionExtensions.<>c__DisplayClass11_0.<<UseDefaultMiddleware>b__1>d.MoveNext() in /source/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs:line 527 --- End of stack trace from previous location --- at Bit.Identity.Startup.<>c__DisplayClass10_1.<<Configure>b__2>d.MoveNext() in /source/src/Identity/Startup.cs:line 174 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) crit: IdentityServer4.Hosting.IdentityServerMiddleware[0] => SpanId:af126a95772daec5, TraceId:08d5a34ce6e76f5b9db92042534b2acc, ParentId:1b90f7976b0aecd1 => ConnectionId:0HMRBEHGF9JN3 => RequestPath:/connect/token RequestId:0HMRBEHGF9JN3:00000003 Unhandled exception: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) fail: Microsoft.AspNetCore.Server.Kestrel[13] => SpanId:af126a95772daec5, TraceId:08d5a34ce6e76f5b9db92042534b2acc, ParentId:1b90f7976b0aecd1 => ConnectionId:0HMRBEHGF9JN3 => RequestPath:/connect/token RequestId:0HMRBEHGF9JN3:00000003 Connection id "0HMRBEHGF9JN3", Request id "0HMRBEHGF9JN3:00000003": An unhandled exception was thrown by the application. System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID) at System.Guid.TryParseExactD(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid..ctor(String g) at Bit.Identity.IdentityServer.ClientStore.CreateApiKeyClientAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 92 at Bit.Identity.IdentityServer.ClientStore.FindClientByIdAsync(String clientId) in /source/src/Identity/IdentityServer/ClientStore.cs:line 87 at IdentityServer4.Stores.ValidatingClientStore1.FindClientByIdAsync(String clientId) at IdentityServer4.Stores.IClientStoreExtensions.FindEnabledClientByIdAsync(IClientStore store, String clientId) at IdentityServer4.Validation.ClientSecretValidator.ValidateAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessTokenRequestAsync(HttpContext context) at IdentityServer4.Endpoints.TokenEndpoint.ProcessAsync(HttpContext context) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 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 Bit.SharedWeb.Utilities.ServiceCollectionExtensions.<>cDisplayClass11_0.<b1>d.MoveNext() in /source/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs:line 527 --- End of stack trace from previous location --- at Bit.Identity.Startup.<>cDisplayClass10_1.<b2>d.MoveNext() in /source/src/Identity/Startup.cs:line 174 --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

There are no errors on the notification log...

justindbaur commented 1 year ago

Sorry, I definitely led you astray, it was correct before that it was calling https://identity.bitwarden.com, you can delete the globalSettings__installation__identityUri entry. But going back to the first logs you sent me, am I right in assuming you redacted your installation id from logs and you aren't using XXXXXXXXXXXXXXXXXXXXXXXXX as your installation id right?

Assuming you redacted it, it seems like the error is that the connection to https://identity.bitwarden.com closed before it could get a response. Can you enter your container using docker exec -it [container-id] sh and then run curl https://identity.bitwarden.com/alive and see if it comes back with the current time?

MuadDibIII commented 1 year ago

Hello, I am going to the office today, so I can't access my home network during the day, I'll check the time when I get back home.

But from the logs I sent you, I can tell that there is a 2h gap between my current time and the log one. When it says 20h, it was actually 22h here...

And yes, I replace the installation ID before. I've tried to to a better job on the last log, keeping the ID structure 😁

justindbaur commented 1 year ago

No rush on my end 😄! But those times are fine, all those times will be UTC so you're probably in UTC+2. The time that comes back from our server will also be in UTC but it's not as much about the time and just about testing if you are able to connect with our servers from inside your container.

MuadDibIII commented 1 year ago

Hello, I just did the test you asked, I got a valid date/ time:

ssh

MuadDibIII commented 1 year ago

Hello, just for curiosity, are you able to reproduce the anomaly it in your test environment?