KoenZomers / RingSnapshotDownload

Console Application for Windows, Raspberry Pi, Linux and macOS which allows for downloading of snapshots from Ring devices
Apache License 2.0
19 stars 4 forks source link

[BUG] Unhandled Exception #16

Open g6nhu opened 4 months ago

g6nhu commented 4 months ago

Hi, I get this when I try and retrieve a list.

I've tried both 64bit and x86 versions on Windows 10.

Thanks.

Ring Snapshot Download Tool v2.1.0.0 by Koen Zomers

Connecting to Ring services Authenticating using provided username and password Unhandled exception. System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. ---> System.Text.Json.JsonReaderException: '<' 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.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo jsonTypeInfo) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at KoenZomers.Ring.Api.Session.Authenticate(String operatingSystem, String hardwareId, String appBrand, String deviceModel, String deviceName, String resolution, String appVersion, Nullable`1 appInstallationDate, String manufacturer, String deviceType, String architecture, String language, String twoFactorAuthCode) at KoenZomers.Ring.SnapshotDownload.Program.Main(String[] args) at KoenZomers.Ring.SnapshotDownload.Program.

(String[] args)

wmayberry commented 3 months ago

Just tried this out today. Got this same result.

Windows 10 Pro version 22H2. OS build 19045.4529

Thanks for providing this. Could be very useful.

===== Microsoft Windows [Version 10.0.19045.4529] (c) Microsoft Corporation. All rights reserved.

D:\Ring>RingSnapshotDownload.exe -username wmxxx@gmail.com -password xxx -list

Ring Snapshot Download Tool v2.1.0.0 by Koen Zomers

Connecting to Ring services Authenticating using provided username and password Unhandled exception. System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. ---> System.Text.Json.JsonReaderException: '<' 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.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo jsonTypeInfo) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at KoenZomers.Ring.Api.Session.Authenticate(String operatingSystem, String hardwareId, String appBrand, String deviceModel, String deviceName, String resolution, String appVersion, Nullable`1 appInstallationDate, String manufacturer, String deviceType, String architecture, String language, String twoFactorAuthCode) at KoenZomers.Ring.SnapshotDownload.Program.Main(String[] args) at KoenZomers.Ring.SnapshotDownload.Program.

(String[] args)

D:\Ring>

S0litaire commented 3 months ago

Getting same issue Running : Ubuntu 24.04

Unhandled exception. System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
 ---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 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.JsonConverter`1.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.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at KoenZomers.Ring.Api.Session.Authenticate(String operatingSystem, String hardwareId, String appBrand, String deviceModel, String deviceName, String resolution, String appVersion, Nullable`1 appInstallationDate, String manufacturer, String deviceType, String architecture, String language, String twoFactorAuthCode)
   at KoenZomers.Ring.SnapshotDownload.Program.Main(String[] args)
   at KoenZomers.Ring.SnapshotDownload.Program.<Main>(String[] args)
Aborted (core dumped)