latestversionplugin icon indicating copy to clipboard operation
latestversionplugin copied to clipboard

Exception with IsUsingLatestVersion

Open grounch opened this issue 3 years ago • 20 comments

If this issue is for a new feature, please skip the "Bug" section and fill out the "Feature Request" section at the bottom.

Bug

Plugin Version: 2.1.0 Platform (e.g., Android v21): Multiple Android phone brands in multiple os version (10,11,12...)

Expected behavior

IsUsingLatestVersion working fine

Actual behavior

getting lot of error logged with such stacktrace:

Error comparing current app version number with latest. Version name=22.2.2.88285 and lastest version= .

at Plugin.LatestVersion.LatestVersionImplementation.IsUsingLatestVersion () [0x000e8] in :0

Steps to reproduce the issue

Happens since last update of the app version which happened today. Error happens when having the previous app version installed (22.2.1) and updating to new one (22.2.2). Hard to reproduce as need to have previous version from the store installed before doing the update.

Is there some cache that's not wiped out at update or what else could trigger this exception?

https://play.google.com/store/apps/details?id={_packageName}&hl=en returns the latest version number (with my package name)

grounch avatar May 24 '22 21:05 grounch

I am also getting the same issue in Android app. My app checks if user is using the latest version or not. If not a latest version it won't allow login and user need to install the latest version first in order to login into the app.

image

This is a blocker for my app right now. @edsnider : Would you please quickly look into this issue?

EDIT: FYI - Google has completely changed the Play Store UI. This may be the reason this Brocken?

Thank you.

AshaMandaliyaGohil avatar May 27 '22 04:05 AshaMandaliyaGohil

I have same issue here. I use the version checker to deside between connecting to prod or dev/test. Due to this error our users are current unable to login at all :(

The problems started appearing sporatically over the last week or so, but this morning it is consistently appearing.

Hope you can deploy a quick fix without upgrading the Nuget!

Edit: Issue is only related to Android, so assume something changed on Google Play

larsfsonderskov avatar May 27 '22 08:05 larsfsonderskov

we've got the same thing

Pro-4-Soft avatar May 27 '22 17:05 Pro-4-Soft

I have the same issue. After looking at the repo code there was a regex code that finding some certain div for the version from the play store. But after google play store update the web site it seems that the div for version number has been remove so that's why the latest version is always empty string.

I suggest you guys create the versioning on your own server that's best we can do right now.

image

NelBarnatia avatar May 29 '22 00:05 NelBarnatia

I am also getting the same issue in Android app. My app checks if user is using the latest version or not. If not a latest version it won't allow login and user need to install the latest version first in order to login into the app.

image

This is a blocker for my app right now. @edsnider : Would you please quickly look into this issue?

EDIT: FYI - Google has completely changed the Play Store UI. This may be the reason this Brocken?

Thank you.

Indeed the play store UI update is the culprit they removed the div that this plug in has on its regex expression.

NelBarnatia avatar May 29 '22 00:05 NelBarnatia

Indeed the data we get as response for https://play.google.com/store/apps/details?id=(package_name)&hl=en is completely different from before. The version number is still returned, but it's lost in the middle of other data and have no title as was before "current version". Not sure i know how to dig in the response to retrieve this version number.

grounch avatar May 30 '22 13:05 grounch

I was able to make it work for me by changing the regex expression in https://github.com/edsnider/latestversionplugin/blob/2a3aa6bb55b3dfc3b6085043218bfb8c90ab1a0c/src/LatestVersion.android.cs#L72 to this ",\\[\\[\\[\"(\\d\\.\\d\\.\\d\\.\\d)\"\\]\\]".

issamben7 avatar Jun 07 '22 12:06 issamben7

I have stopped using the plugin. Instead I have placed a .json file on a google file service, where I store the state of each version.

Brgds Lars Fogtmann Sønderskov www.evotag.io CVR: 38992031 (IR Squad APS)

On Tue, 7 Jun 2022 at 14:21, issamben7 @.***> wrote:

I was able to make it work for me by changing the regex expression in https://github.com/edsnider/latestversionplugin/blob/2a3aa6bb55b3dfc3b6085043218bfb8c90ab1a0c/src/LatestVersion.android.cs#L72 to this ",\[\[\["(\d\.\d\.\d\.\d)"\]\]".

— Reply to this email directly, view it on GitHub https://github.com/edsnider/latestversionplugin/issues/42#issuecomment-1148592147, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWUBFRXMAMHTT3VTKQLFDDVN45FLANCNFSM5W25D3BQ . You are receiving this because you commented.Message ID: @.***>

larsfsonderskov avatar Jun 07 '22 12:06 larsfsonderskov

@edsnider are support and maintenance ended on this plugin?

grounch avatar Jun 09 '22 07:06 grounch

@issamben7 did you tested your regex in production environment already so i can use it over a fork on my next release?

gsgou avatar Jun 11 '22 14:06 gsgou

let me know when this one is resolved

wtheronjones avatar Jun 14 '22 22:06 wtheronjones

@gsgou I implemented it on my app and tested it, but I never deployed it into production since we decided to store the version on a dedicated server to avoid problems in the future.

issamben7 avatar Jun 15 '22 13:06 issamben7

Anyone has any notice about this bug ? Is it resolved ? Thanks.

olivertech avatar Jun 24 '22 14:06 olivertech

The new beta version seems to have solve the issue on Android. Thanks to those who worked on it

grounch avatar Jul 07 '22 21:07 grounch

is the nuget package updated yet?

wtheronjones avatar Jul 11 '22 22:07 wtheronjones

when will the nuget package be updated?

wtheronjones avatar Aug 24 '22 06:08 wtheronjones

You can have the nuget with these modifications in the beta version here : https://www.nuget.org/packages/Xam.Plugin.LatestVersion/2.1.1-beta.107

With VS NPM, just check "Include Prerelease" and update to 2.1.1-beta.107

Jerome-Liger avatar Aug 24 '22 06:08 Jerome-Liger

I still have the problem with version 2.1.1-beta.107, though the error says lastest version=' instead of lastest version= .

Hjord avatar Sep 13 '22 07:09 Hjord

Confirmed, I see the same problem Error comparing current app version number with latest. Version name=5.0.0 and lastest version= using the beta, and it's not fixed in the normal (non-beta) release either.

vchelaru avatar Sep 22 '22 18:09 vchelaru

@vchelaru there is a PR but is not getting merged 3w now. You can follow up the conversation and maybe leave a comment: https://github.com/edsnider/latestversionplugin/pull/49

gsgou avatar Sep 22 '22 19:09 gsgou