latestversionplugin icon indicating copy to clipboard operation
latestversionplugin copied to clipboard

Change version number place in AF_initDataCallback

Open elteka opened this issue 1 year ago • 4 comments

Bug

Plugin Version: master Platform (e.g., Android v21): Android Device/Hardware: Android

Expected behavior

Class LatestVersion.android.cs Method GetLatestVersionNumber() retrieve the last version in Play Store

Actual behavior

Class LatestVersion.android.cs Method GetLatestVersionNumber() can't convert javascript unexpected value to object and throw Exception

Steps to reproduce the issue

  • CrossLatestVersion.Current.IsUsingLatestVersion(); or
  • CrossLatestVersion.Current.GetLatestVersionNumber();

Feature Request

Description: I solve this bug changing GetLatestVersionNumber() method, line 81, changing key: 'ds:4' for key: 'ds:5'

original line var scripts = doc.DocumentNode.Descendants() .Where(n => n.Name == "script" && n.InnerText.Contains("AF_initDataCallback({key: 'ds:4'")) .ToArray();

changed line var scripts = doc.DocumentNode.Descendants() .Where(n => n.Name == "script" && n.InnerText.Contains("AF_initDataCallback({key: 'ds:5'")) .ToArray();

elteka avatar Aug 23 '22 15:08 elteka

This ticket duplicates Issue # 42, which does actually have a fix checked in for it. The nuget package hasn't been updated yet though...

wtheronjones avatar Aug 24 '22 06:08 wtheronjones

Ticket #42 was fixed in version 2.1.1-beta107, but that version stop working a few days ago

elteka avatar Aug 24 '22 12:08 elteka

The version 2.1.1-beta has parsing error.

marcelovargas avatar Aug 29 '22 18:08 marcelovargas

I can confirm the FIX reported at the top of this article, under "Feature Request", DOES work !!!

var scripts = doc.DocumentNode.Descendants() .Where(n => n.Name == "script" && n.InnerText.Contains("AF_initDataCallback({key: 'ds:5'")) .ToArray();

Can someone make a new version of the NuGet package, please?

Auto72 avatar Sep 01 '22 15:09 Auto72