maxisoft / ASFFreeGames

Collect free steam games while asf is running
GNU Affero General Public License v3.0
134 stars 3 forks source link

Games don't add up #27

Closed zieluu1 closed 1 year ago

zieluu1 commented 1 year ago

I did everything right, I entered the command freegames, the program replied that it received 6 free games but they were not added to steam, unless it's not supposed to be added to stea, can someone help me??

chuvak889 commented 1 year ago

I keep getting errors. I think something bugged in the plugin.

JourneyOver commented 1 year ago

Yea sadly getting errors now as well..

error is as followed:

 Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 2, position 4.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   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.JsonSerializer.Deserialize[T](JsonReader reader)
   at ArchiSteamFarm.Web.WebBrowser.UrlGetToJsonObject[T](Uri request, IReadOnlyCollection`1 headers, Uri referer, ERequestOptions requestOptions, Byte maxTries, Int32 rateLimitingDelay)
   at ArchiSteamFarm.Web.WebBrowser.UrlGetToJsonObject[T](Uri request, IReadOnlyCollection`1 headers, Uri referer, ERequestOptions requestOptions, Byte maxTries, Int32 rateLimitingDelay)

hopefully @maxisoft is still around and active, so he can hopefully fix and update whatever is going on.

woctezuma commented 1 year ago

It is a parsing error. The error happens at one of these two lines:

https://github.com/maxisoft/ASFFreeGames/blob/74ff23cf8d01e24cad4e5b2ec7c90d03f6230661/ASFFreeGames/Reddit/RedditHelper.cs#L118

https://github.com/maxisoft/ASFFreeGames/blob/74ff23cf8d01e24cad4e5b2ec7c90d03f6230661/ASFFreeGames/ASFFreeGamesPlugin.cs#L88

maxisoft commented 1 year ago

Hello :wave:,

I'll try to discuss the issues in a two-part follow-up.


:question: About the original issue

I think the original issue is something related to https://github.com/maxisoft/ASFFreeGames/issues/3#issuecomment-1162793868

About found X free games on reddit

The found 22 free games on reddit message means that the internal parser has found 22 addlicense entries on reddit. That doesn't mean there is 22 free games going to be added for sure. For instance a game fee offer may have expired or it's a dlc for a paid game that you don't own.

There are three possible scenarios:

So I'll leave this issue open for some time to ensure (according to the comments) that the plugin is working as intended: for instance, for today Field of Glory II Limited Free Promotional Package - Jun 2023 should be added to one's game library. If it's not the case, it's definitely an issue :exclamation:


:bug: About the recent errors

I keep getting errors. I think something bugged in the plugin.

Yea sadly getting errors now as well..

error is as followed:

 Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 2, position 4.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   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.JsonSerializer.Deserialize[T](JsonReader reader)
   at ArchiSteamFarm.Web.WebBrowser.UrlGetToJsonObject[T](Uri request, IReadOnlyCollection`1 headers, Uri referer, ERequestOptions requestOptions, Byte maxTries, Int32 rateLimitingDelay)
   at ArchiSteamFarm.Web.WebBrowser.UrlGetToJsonObject[T](Uri request, IReadOnlyCollection`1 headers, Uri referer, ERequestOptions requestOptions, Byte maxTries, Int32 rateLimitingDelay)

hopefully @maxisoft is still around and active, so he can hopefully fix and update whatever is going on.

I believe those errors occur when reddit servers are showing 5xx internal errors which serve a html page instead of json payload hence the errors :confused:.

As I think it's another issue I'll open a new issue ticket to track that :memo:.