Push notifiication error in log
Steps To Reproduce
- open logs/identity/Identity/20220815.txt
Expected Result
no errors
Actual Result
2022-08-15 08:00:58.794 +00:00 [Error] Failed to send to "https://push.bitwarden.com/push/register".
System.Text.Json.JsonException: 'e' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: 'e' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, 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.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellationToken)
at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, Encoding sourceEncoding, JsonSerializerOptions options, CancellationToken cancellationToken)
at Bit.Core.Services.BaseIdentityClientService.SendAsync[TRequest,TResult](HttpMethod method, String path, TRequest requestModel) in /home/runner/work/server/server/src/Core/Services/Implementations/BaseIdentityClientService.cs:line 75
Screenshots or Videos
No response
Additional Context
I was checking the logs and found this error.
Build Version
bitwarden.sh version 2022.6.2 Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1 docker-compose version 1.25.0, build 0a186604
Environment
Self-Hosted
Environment Details
- Ubuntu 20.04.4 LTS
Before ReadFromJsonAsync here https://github.com/bitwarden/server/blob/231eb84e694814b658cf5a52e45b782d587f97e4/src/Core/Services/Implementations/BaseIdentityClientService.cs#L71
calling response.EnsureSuccessStatusCode(); to throw an exception if the http call is not successful will give us more details