Giter Site home page Giter Site logo

edsnider / latestversionplugin Goto Github PK

View Code? Open in Web Editor NEW
149.0 149.0 38.0 91 KB

LatestVersion Plugin for Xamarin and Windows apps

License: MIT License

C# 100.00%
appstore latestversion nuget playstore plugin xamarin xamarin-forms xamarin-plugin

latestversionplugin's People

Contributors

edsnider avatar jerome-liger avatar markmcavoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

latestversionplugin's Issues

Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK

I am getting this:

Android.Util.AndroidRuntimeException: 'Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?'

when using CrossLatestVersion.Current.OpenAppInStore

Bug

Plugin Version: 2.1.0
Platform (e.g., Android v33):
Emulator

Expected behavior

Actual behavior

Steps to reproduce the issue

Feature Request

Description:

Intermittent app crash SocketException No such host is known

Bug

Plugin Version: 1.1.2
Platform: iOS 13.6.1
Device/Hardware: iPad 6th Gen, WiFi

This was reported by Apple and my app was rejected because of it. I wasn't able to reproduce the issue locally so I'm not sure if it is dependent upon a server being down or anything like that. I looked at your code and it's got a catch (Exception) so I don't understand why this caused a crash. I'm suspicious of the RedirectHandler in there - maybe itunes.apple.com returned a 3xx response? In any case, I have no idea what the issue is or how to fix it.

Stack trace SIGABRT: SocketException No such host is known

ConnectHelper.ConnectAsync (System.String host, System.Int32 port, System.Threading.CancellationToken cancellationToken)
HttpConnectionPool.CreateConnectionAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
HttpConnectionPool.WaitForCreatedConnectionAsync (System.Threading.Tasks.ValueTask`1[TResult] creationTask)
HttpConnectionPool.SendWithRetryAsync (System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken)
RedirectHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task`1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts)
LatestVersionImplementation.GetLatestVersionNumber (System.String appName)
LatestVersionImplementation.GetLatestVersionNumber ()
LatestVersionImplementation.IsUsingLatestVersion ()

When connected to WiFi but router has no internet endless waiting for result

Bug

Plugin Version: 1.1.2
Platform (e.g., Android v21): Android 6.0 (23), Android 10 (29)
Device/Hardware: Samsung SM-G900F, Samsung SM-G970F

Expected behavior

IsUsingLatestVersion() to return any value

Actual behavior

When phone is connected to WiFi but router has no internet IsUsingLatestVersion() never returns value.

Steps to reproduce the issue

  • Connect to WiFi with no internet access.
  • Try to await IsUsingLatestVersion()

Feature Request

Description: Add timeout parameter to IsUsingLatestVersion()

Retrieve build number

Thanks for the plugin, a method to retrieve the build number will be a good new functionality

Jurassic ToConcatenatedString

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

Bug

I use in xamarin.android but i have a error Jurassic ToConcatenatedString.

The static method Jurassic.TypeConverter.ToConcatenatedString(System.Object) does not exist.'

I need help please.
Thanks

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

Expected behavior

Actual behavior

Steps to reproduce the issue

Feature Request

Description:

Android: Exception thrown when checking on startup

Bug

Plugin Version: 2.1.0
Platform (e.g., Android v21): Android 9.0/API 28
Device/Hardware: Pixel 4 Emulator

Expected behavior

Version check works

Actual behavior

Version check throws exception:

**Plugin.LatestVersion.LatestVersionException:** 'Error comparing current app version number with latest. Version name=2.1.2 and lastest version= .'

This has just started occurring on emulator debugging this morning. Debugging on actual Android device seems to work OK still.

Steps to reproduce the issue

  • Call CrossLatestVersion.Current.IsUsingLatestVersion() on startup in App.xaml.cs

Error checking version on iOS

Bug

Plugin Version: 1.1.2 and 2.0.0-beta.76
Platform: iOS
Device/Hardware: iPhone 6

Expected behavior

Getting the latest version should return a boolean

Actual behavior

Exception is thrown.

Error looking up app details in App Store. BundleIdentifier=<Removed for security reasons, but matches what is in appstoreconnect>
  at Plugin.LatestVersion.LatestVersionImplementation.LookupApp () [0x0017f] in <b9443c4023a448e79dd79a7c32c8f968>:0 
  at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber () [0x00065] in <b9443c4023a448e79dd79a7c32c8f968>:0 
  at Plugin.LatestVersion.LatestVersionImplementation.IsUsingLatestVersion () [0x00077] in <b9443c4023a448e79dd79a7c32c8f968>:0 
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <624bcc4ce53347508a7b8fa821d78da4>:0 
  at System.Json.JsonArray.get_Item (System.Int32 index) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.Json/src/System/Json/JsonArray.cs:36 
  at Plugin.LatestVersion.LatestVersionImplementation.LookupApp () [0x0011d] in <b9443c4023a448e79dd79a7c32c8f968>:0 

Steps to reproduce the issue

try
{
    var latest = await CrossLatestVersion.Current.IsUsingLatestVersion();
}
catch (Exception x)
{
    return;
}

Huawei

Feature Request

Description: Is Huawei support planned any time in the near future? Currently the redirect goes to Google Play Store.

AppStore only shows option to Uninstall or Open

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): Android v29
Device/Hardware:

Expected behavior

After checking for a new update (and one is required), then the App Store should give me the option to update.

Actual behavior

After checking for a new update (and one is required), then the App Store only shows me Uninstall and Open options. Is this behaviour expected because I am debugging in Visual Studio?

Steps to reproduce the issue

           if (!await CrossLatestVersion.Current.IsUsingLatestVersion())
            {
                string latestVersionNumber = await CrossLatestVersion.Current.GetLatestVersionNumber();

                await DisplayAlertOk("New Version Available", $"A new version is available. Please update to v{latestVersionNumber}  now.");

                CrossLatestVersion.Current.CountryCode = "gb";
                await CrossLatestVersion.Current.OpenAppInStore();
            }

Feature Request

Description:

Error comparing current app version number with latest

Bug

Exception Unhandled. If the phone has no internet connection the app will crash trying to compare versions.

Plugin Version: 1.1.2
Platform (e.g., Android v21):
Device/Hardware: iPhone X

Expected behavior

Actual behavior

Unhandled Exception:

Plugin.LatestVersion.LatestVersionException: Error comparing current app version number with latest. Bundle version=1.0 and lastest version= . occurred

Steps to reproduce the issue

Put device into Airplane Mode

Feature Request

Description:

Potential memory leak HttpClient/feature enhancement

Feature Request

Description: You are creating a new HttpClient every time a request is made to a server and never disposing it. Best practice is to reuse the HttpClient instance, but if you're not reusing it, it should be disposed.

Suggestions:

Do something like this (adding a LatestVersionPlugin.Init() function that should be called in the app startup) and use the IHttpClientFactory.

OR make HttpClient or an IHttpClientFactory a static variable shared by the library.

OR wrap the new HttpClient call in a using block.

Plus, allow HttpClient or IHttpClientFactory to be passed in as a parameter and managed by the calling application. This is my preference as I have one shared HttpClient in my app, but not all developers will care to manage theirs in the same way so I think it should be optional. Just doing this would fix any potential memory leak so if this is the only change per this issue, I'd be happy.

Docs (sort of - aspnetcore docs)

Error : LatestVersionException: Version string portion was too short or too long. Parameter name: input

LatestVersionException : Version string portion was too short or too long. Parameter name: input

Bug

Plugin Version: 1.1.1
Platform: Android (7.0, 8.0.0 and 9)
Device/Hardware: Galaxy S7, Pixel 2 XL and Galaxy S8
Reported on Appcenter
App Version : 2.3.8 (400274)

Exception Message
Error comparing current app version number with latest. Version name=2.3.8 and lastest version= .

Exception StackTrace
at Plugin.LatestVersion.LatestVersionImplementation.IsUsingLatestVersion () [0x000c9] in

Plugin.LatestVersion.LatestVersionException: Version string portion was too short or too long. Parameter name: input

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: 1.1.2
Platform (e.g., Android v21): Android 9
Device/Hardware: Galaxy S8

Expected behavior

Not raise an exception

Actual behavior

Error:
LatestVersionImplementation.IsUsingLatestVersion () C:\projects\latestversionplugin\src\Plugin.LatestVersion.Android\LatestVersionImplementation.cs:42

My published app has version "1.0.14-beta"
In my development, I changed my app to "1.0.10-beta" to check if it could detect the published version as newer, but I'm getting the exception below:

Plugin.LatestVersion.LatestVersionException: Version string portion was too short or too long. Parameter name: input

Method CrossLatestVersion.Current.GetLatestVersionNumber() is returning "Varies with device" string, not my published version number...

iOS: Unexpected character '\u001f'. At line 1, column 0.

Bug

Plugin Version: 1.1.2
Platform: iOS 15.2.1
Device/Hardware: iPhone 13 Pro Max

Expected behaviour

Nuget package should successfully return true or false after invoking CrossLatestVersion.Current.IsUsingLatestVersion()

Actual behaviour

Here is the exception data from appcenter

{
  "exception": {
    "type": "Plugin.LatestVersion.LatestVersionException",
    "message": "Error comparing current app version number with latest. Bundle version=2.4.0 and lastest version= .",
    "stackTrace": "  at Plugin.LatestVersion.LatestVersionImplementation.IsUsingLatestVersion () <0x1029a4800 + 0x003e4>",
    "innerExceptions": [
      {
        "type": "Plugin.LatestVersion.LatestVersionException",
        "message": "Error parsing content from the App Store. Url=http://itunes.apple.com/lookup?bundleId=com.microdea.imagecapture.",
        "stackTrace": "  at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber (System.String appName) <0x1029a4f10 + 0x007e0> in <d8fe6846439c4b4fade134342e5fa68c#12240c99c68fafebfd560ebebfda195e>:0 \n  at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber () <0x1029a4cc0 + 0x00163> in <d8fe6846439c4b4fade134342e5fa68c#12240c99c68fafebfd560ebebfda195e>:0 \n  at Plugin.LatestVersion.LatestVersionImplementation.IsUsingLatestVersion () <0x1029a4800 + 0x001b7> in <d8fe6846439c4b4fade134342e5fa68c#12240c99c68fafebfd560ebebfda195e>:0 ",
        "innerExceptions": [
          {
            "type": "System.ArgumentException",
            "message": "Unexpected character '\u001f'. At line 1, column 0.",
            "stackTrace": "  at System.Runtime.Serialization.Json.JavaScriptReader.ReadCore () <0x1029ae4f0 + 0x00420> in <da436375c8b643fe8ffbba67e091c8f5#12240c99c68fafebfd560ebebfda195e>:0 \n  at System.Runtime.Serialization.Json.JavaScriptReader.Read () <0x1029ae470 + 0x00017> in <da436375c8b643fe8ffbba67e091c8f5#12240c99c68fafebfd560ebebfda195e>:0 \n  at System.Json.JsonValue.Load (System.IO.TextReader textReader) <0x1029ac150 + 0x0003b> in <da436375c8b643fe8ffbba67e091c8f5#12240c99c68fafebfd560ebebfda195e>:0 \n  at System.Json.JsonValue.Parse (System.String jsonString) <0x1029acac0 + 0x0003b> in <da436375c8b643fe8ffbba67e091c8f5#12240c99c68fafebfd560ebebfda195e>:0 \n  at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber (System.String appName) <0x1029a4f10 + 0x006f3> in <d8fe6846439c4b4fade134342e5fa68c#12240c99c68fafebfd560ebebfda195e>:0 ",
            "wrapperSdkName": "appcenter.xamarin"
          }
        ],
        "wrapperSdkName": "appcenter.xamarin"
      }
    ],
    "wrapperSdkName": "appcenter.xamarin"
  },
  "device": {
    "sdkName": "appcenter.ios",
    "sdkVersion": "3.3.5+3621e27fb",
    "wrapperSdkVersion": "3.4.3",
    "wrapperSdkName": "appcenter.xamarin",
    "model": "iPhone14,3",
    "oemName": "Apple",
    "osName": "iOS",
    "osVersion": "15.2.1",
    "osBuild": "19C63",
    "locale": "en_US",
    "timeZoneOffset": -300,
    "screenSize": "2778x1284",
    "appVersion": "2.4.0",
    "appBuild": "24005",
    "wrapperRuntimeVersion": "12.6.0"
  }
}

Steps to reproduce the issue

  • await CrossLatestVersion.Current.IsUsingLatestVersion();

Android support does not seem to include Amazon Fire devices

Bug

Plugin Version: 1.1.2
Platform (e.g., Android v21): Amazon Fire OS 4.5.5.3
Device/Hardware: Amazon Fire tablet

Expected behavior

As per non-Amazon Android devices

Actual behavior

Exceptions thrown, including HTTPRequestException and AndroidRuntimeException (the latter with the detail "Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this what you really want?")

Steps to reproduce the issue

Build and deploy to Amazon Fire device. Then run as usual

Feature Request

Description:

Test whether app came from store?

How can we know if the app came from the store?

We would like to include logic to test for the latest version if the app came from the store, but if the app is running on a debug build, or is distributed for testing via app center/testflight, we don't want to do the store version check.

Return version number of installed app on device

Feature Request

Description:
GetLatestVersionNumber returns the version number of app in app store. In addition, pls provide version number of app installed on device as it is helpful for displaying purpose.

Change version number place in AF_initDataCallback

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();

Enhancement - Retrieve release notes from App Stores

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

Feature Request

Description: In addition to retrieving the app's version number, add functionality to retrieve the app's release notes.

I've downloaded the source and added support for this to Android and iOS but I don't develop UWP apps. Here's what I came up with that works well with our app's release notes formatting:

Interface addition:

Task<string> GetLatestReleaseNotes();

Android release notes retrieval:

var content = responseMsg.Content == null ? null : await responseMsg.Content.ReadAsStringAsync();

var versionMatch = Regex.Match(content, "<div[^>]*>Current Version</div><span[^>]*><div[^>]*><span[^>]*>(.*?)<").Groups[1];

if (versionMatch.Success)
{
	version = versionMatch.Value.Trim();
}

var releaseNotesMatch = Regex.Match(content, "<h2[^>]*>What&#39;s New</h2>.*<div.*itemprop=\"description\"[^>]*><span([^>]*>)(.+?)</span>").Groups[2];

if (releaseNotesMatch.Success)
{
	var newLines = Environment.NewLine + Environment.NewLine;
	releaseNotes = releaseNotesMatch.Value.Trim().Replace("<br><br>", newLines).Replace("<br>", newLines);
}

iOS release notes retrieval:

var http = new HttpClient();
var response = await http.GetAsync($"http://itunes.apple.com/lookup?bundleId={_bundleIdentifier}");
var content = response.Content == null ? null : await response.Content.ReadAsStringAsync();
var appLookup = JsonValue.Parse(content);

var newLines = Environment.NewLine + Environment.NewLine;

return new App
{
	Version = appLookup["results"][0]["version"],
	Url = appLookup["results"][0]["trackViewUrl"],
	// Convert single line returns to double line returns without changing existing double line returns
	ReleaseNotes = ((string)(appLookup["results"][0]["releaseNotes"])).Replace("\n\n", "<br>").Replace("\n", newLines).Replace("<br>", newLines)
};

New parameters GetLatestVersionNumber(appName, storeLocation)

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:
Platform (e.g., Android v21):
Device/Hardware:

Expected behavior

Actual behavior

Steps to reproduce the issue

Feature Request

Description:
Currently you can only call CrossLatestVersion.Current.GetLatestVersionNumber() as is or specify a appname, this however causes an issue when the app is only available in a specific country.

e.g If my app is available on the Thailand store and the look up is being called on the US store it will simply return an empty result set.

It would be handy if we could add more parameters to handle situations like this.

Im unable to get GetLatestVersionNumber of the play store. It is always showing empty or null

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

Bug

Im unable to get GetLatestVersionNumber. It is always showing empty or null
Plugin Version: 2.1.0
Platform (e.g., Android v21): Andriod 11
Device/Hardware:

Expected behavior

Actual behavior

Steps to reproduce the issue

Feature Request

Description:

MAUI Support

Is support for MAUI planned? Currently the plug-in is installing, but code execution fails.

Bug

Plugin Version: 2.1.1-beta.107
Platform (e.g., Android v21):
Device/Hardware:

Expected behavior

Return value.

Actual behavior

Exception: This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.

Steps to reproduce the issue

  • Install in MAUI Project
  • Call await CrossLatestVersion.Current.IsUsingLatestVersion()

Feature Request

Description: Support for MAUI

Unable to connect to Play Store to check for updates

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: 1.1.2
Platform (e.g., Android v21): Android API 26 (8.0.0)
Device/Hardware: Samsung Galaxy S9 SM-G960U1

Expected behavior

App should be able to connect to Google Play to see if there is a newer version of the app available and prompt the user to download the latest version

Actual behavior

App update check fails and an exception is raised

Steps to reproduce the issue

  • Call CrossLatestVersion.Current.IsUsingLatestVersion() in a try-catch
  • The following exception is caught:
    Plugin.LatestVersion.LatestVersionException: Error comparing current app version number with latest. Version name=1.0.8 and lastest version= . ---> System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: SecureChannelFailure (Unable to read data from the transport connection: Connection reset by peer.) ---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer

Supported Android version number shown as 10.0+

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

Bug

At date of reading (26th September 2018), the documentation at https://github.com/edsnider/latestversionplugin#supported-platforms-and-versions shows
"Xamarin.Android | Yes | 10.0+"

That 10.0+ is presumably incorrect.

Expected behavior

A version number that is correct.

Actual behavior

Android version number shown as 10.0+

Steps to reproduce the issue

Read https://github.com/edsnider/latestversionplugin#supported-platforms-and-versions

iOS: OpenAppInStore() does not work

Bug

When I call await CrossLatestVersion.Current.OpenAppInStore(); on my Iphone SE it opens the store but it says "Cannot connct to App Store"

Plugin Version: newest
Platform (e.g., Android v21):
Device/Hardware: IPhone SE

Expected behavior

navigates to the app.

Actual behavior

plugin always returns true iOS

Bug

Plugin Version: latest
Platform (e.g., iOS 12.1, 13.5.1):
Device/Hardware: iPhone 6, iPhone 7

Expected behavior

Display alert message if is not using latest version

Actual behavior

Doesn't display anything.

Steps to reproduce the issue

Just use CrossLatestVersion.Current.IsUsingLatestVersion() end upload app to the App Store.
The problem appears right in a production, if I do the same actions locally - alert displays.

Feature Request

Description: So I tried to invert my if statement for testflight to check if the alert is actually not an iOS specific problem. No, that's good, the problem is like plugin returns "true" from CrossLatestVersion.Current.IsUsingLatestVersion(), even the using version is not latest. With Android is no such problem, even on production. So my assumption is that plugin is always returning true on prod iOS. Don't know how that is possible. Maybe someone have to deal with the same problem?

Error Comparing Versions On Android

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:
Platform (e.g., Android version 8.1):
Device/Hardware: Infinix X606C

Expected behavior

return IsUsingLatestVersion using this code
bool isLatest = await CrossLatestVersion.Current.IsUsingLatestVersion();

Actual behavior

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

Steps to reproduce the issue

bool isLatest = await CrossLatestVersion.Current.IsUsingLatestVersion();

Feature Request

Description:

GetLatestVersionNumber throws an exception

Bug

Plugin Version: 2.1.1-beta.107
Platform: Android 12 (31-S)
Device/Hardware:

Expected behavior

CrossLatestVersion.Current.GetLatestVersionNumber() does not return the version number, instead it throws a Jurassic.JavaScriptException.

Actual behavior

{Plugin.LatestVersion.LatestVersionException: Fehler beim Parsen von Inhalten aus dem Play Store. Url=https://play.google.com/store/apps/details?id=com.ist.saleboard.mobile&hl=en. ---> Jurassic.JavaScriptException: TypeError: undefined cannot be converted to an object at Jurassic.TypeConverter.ToObject (Jurassic.ScriptEngine engine, System.Object value, System.Int32 lineNumber, System.String sourcePath, System.String functionName) [0x00037] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0 at (wrapper dynamic-method) Jurassic. Compiler.MethodGenerator.anonymous(Jurassic.Compiler.ExecutionContext,object[]) at Jurassic.Library.UserDefinedFunction.CallLateBound (System.Object thisObject, System.Object[] argumentValues) [0x00014] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0 at Jurassic. Library.FunctionInstance.CallWithStackTrace (System.String path, System.String function, System.Int32 line, System.Object thisObject, System.Object[] argumentValues) [0x0000f] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0 at (wrapper dynamic-method) Jurassic. Compiler.MethodGenerator.anonymous(Jurassic.Compiler.ExecutionContext,object[]) at Jurassic.Library.UserDefinedFunction.CallLateBound (System.Object thisObject, System.Object[] argumentValues) [0x00014] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0 at Jurassic. Library.FunctionInstance.CallWithStackTrace (System.String path, System.String function, System.Int32 line, System.Object thisObject, System.Object[] argumentValues) [0x0000f] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0 at (wrapper dynamic-method) Jurassic. Compiler.MethodGenerator.eval(Jurassic.Compiler.ExecutionContext) at Jurassic.Compiler.GlobalOrEvalMethodGenerator.Execute (Jurassic.ScriptEngine engine, Jurassic.Compiler.RuntimeScope parentScope, System. Object thisObject) [0x00030] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0 at Jurassic.ScriptEngine.Evaluate (Jurassic. ScriptSource source) [0x000a7] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0 at Jurassic.ScriptEngine.Evaluate (System.String code) [0x00007] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0 at Plugin. LatestVersion.LatestVersionImplementation.GetLatestVersionNumber () [0x001ff] in <7361502664264164a28b556feec777a7>:0 --- Ende der inneren Ausnahme Stack Trace --- at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber ()

Description:

Exception with IsUsingLatestVersion

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)

GetLatestVersionNumber() not working in Android version of 1.1.1

Bug

Plugin Version: 1.1.1
Platform (e.g., Android v21):

Description: I installed version of 1.1.1 But GetLatestVersionNumber() not working on this version. I updated regex to "<div[^>]>Current Version<span[^>]><div[^>]><span[^>]>(.*?)<" now it is working but in nuget not working. Please update nuget

Help Tutorial

Do you have any more detailed tutorials or small sample design? I have not really understood how to implement to check an application in google play.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.