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

Unexpected character encountered error when trying to update library #38

Open
2 tasks done
SkyNinja opened this issue Feb 8, 2025 · 3 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@SkyNinja
Copy link

SkyNinja commented Feb 8, 2025

Prerequisites

Playnite version

10.35.0.16422

Plugin version

1.1.7.34507

Comet version

0.2.0

Gogdl version

1.1.2

Bug description

Upon trying to update my GoG library with this plugin, I get the message Unexpected character encountered while parsing value: C. Path '', line 0, position 0.

This is some kind of authentication error, as manually signing out and back in via the extension settings seems to fix it.

Relevant log

08-02 06:04:58.939|DEBUG|GogOssLibrary#GogOssLibrary:Found 7 installed GOG games.
08-02 06:05:05.128|ERROR|GogOssLibrary#GogOssLibrary:Failed to import linked account GOG games details.
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: C. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Playnite.Common.Serialization.FromJson[T](String json) in C:\projects\playnite\source\Playnite\Common\Serialization.cs:line 336
   at Playnite.Common.DataSerializer.FromJson[T](String json) in C:\projects\playnite\source\Playnite\Common\Serialization.cs:line 80
   at Playnite.SDK.Data.Serialization.FromJson[T](String json) in C:\projects\playnite\source\PlayniteSDK\Data\DataSerialization.cs:line 406
   at GogOssLibraryNS.Services.GogAccountClient.GetOwnedGames() in Dev:/playnite-gog-oss-plugin/src/Services/GogAccountClient.cs:line 274
   at GogOssLibraryNS.GogOssLibrary.<GetLibraryGames>d__31.MoveNext() in Dev:/playnite-gog-oss-plugin/src/GogOssLibrary.cs:line 303
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GogOssLibraryNS.GogOssLibrary.GetGames(LibraryGetGamesArgs args) in Dev:/playnite-gog-oss-plugin/src/GogOssLibrary.cs:line 393
08-02 06:05:13.001|INFO |HowLongToBeat#PluginDatabaseObject`4:RefreshRecent() started
08-02 06:05:13.001|INFO |HowLongToBeat#PluginDatabaseObject`4:RefreshRecent found 0 game(s) that need updating
08-02 06:05:13.075|INFO |HowLongToBeat#<>c__DisplayClass65_0:Task Refresh() - 00:00.06 for 0/0 items
08-02 06:05:13.168|INFO |LibraryManagement#<>c__DisplayClass11_0:Task SetGenres() - 00:00.06 for 0/0 items
08-02 06:05:13.243|INFO |LibraryManagement#<>c__DisplayClass15_0:Task SetFeatures() - 00:00.06 for 0/0 items
08-02 06:05:13.311|INFO |LibraryManagement#<>c__DisplayClass19_0:Task SetTags() - 00:00.05 for 0/0 items
08-02 06:05:13.387|INFO |LibraryManagement#<>c__DisplayClass27_0:Task SetTags() - 00:00.06 for 0/0 items
08-02 06:05:13.406|INFO |SuccessStory#PluginDatabaseObject`4:RefreshRecent() started
08-02 06:05:13.406|INFO |SuccessStory#PluginDatabaseObject`4:RefreshRecent found 0 game(s) that need updating
08-02 06:05:13.475|INFO |SuccessStory#<>c__DisplayClass28_0:Task Refresh() - 00:00.05 for 0/0 items
08-02 06:05:46.463|DEBUG|GogOssLibrary#CliWrapCommandExtensions:Executing command: C:\Games\gogoss\comet.exe -V
08-02 06:05:49.395|DEBUG|GogOssLibrary#CliWrapCommandExtensions:Executing command: C:\Games\gogoss\gogdl.exe --auth-config-path null -v
08-02 06:06:06.841|DEBUG|GogOssLibrary#ProcessStarter:Starting process: cmd, /K C:\Games\gogoss\comet.exe -h, C:\Games\gogoss, False
08-02 06:06:41.365|DEBUG|GogOssLibrary#ProcessStarter:Opening URL: https://github.com/hawkeye116477/playnite-gog-oss-plugin/issues/new?assignees=&labels=bug&projects=&template=bugs.yml&pluginV=1.1.7.34507&playniteV=10.35.0.16422&cometV=0.2.0&gogdlV=1.1.2

Screenshots

No response

@SkyNinja SkyNinja added the bug Something isn't working label Feb 8, 2025
@hawkeye116477
Copy link
Owner

Well, I can't reproduce that for now.

@aspiringlily
Copy link

I have this as well, plus it seems to print all the text from the front page of gog.com into the log? like 7000 lines worth.

19-02 17:02:33.064|INFO |MainViewModelBase:Importing games from GOG OSS plugin.
19-02 17:02:37.136|ERROR|Serialization:Failed to deserialize GogOssLibraryNS.Models.GetOwnedGamesResult from json:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: C. Path '', line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Playnite.Common.Serialization.FromJson[T](String json) in C:\projects\playnite\source\Playnite\Common\Serialization.cs:line 330
19-02 17:02:37.158|DEBUG|Serialization:Consent
STORE
ABOUT
COMMUNITY
SUPPORT
SIGN IN
0
......
6300+ deals up to -95%
Deals ending in: 33:57:24
Browse
Highlights
Now on sale
Silent Hill 4: The Room
-30%
$9.99
$6.99
Add to cart
GOOD OLD GAME

hawkeye116477 added a commit that referenced this issue Feb 20, 2025
@hawkeye116477
Copy link
Owner

hawkeye116477 commented Feb 20, 2025

This is some kind of authentication error, as manually signing out and back in via the extension settings seems to fix it.

I assume perhaps something corrupted tokens.json file which contains needed authentication data.

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

3 participants