upgrader icon indicating copy to clipboard operation
upgrader copied to clipboard

No upgrader alert. PlayStoreResults.redesignedVersion exception. appStoreVersion is getting as null.

Open Sarath-K-S opened this issue 1 year ago • 18 comments

upgrader log,

I/flutter ( 9657): upgrader: instantiated.
I/flutter ( 9657): upgrader: build UpgradeAlert
I/flutter ( 9657): upgrader: initialize called
I/flutter ( 9657): upgrader: initializing
I/flutter ( 9657): upgrader: languageCode: en
I/flutter ( 9657): upgrader: default operatingSystem: android QP1A.190711.020
I/flutter ( 9657): upgrader: operatingSystem: android
I/flutter ( 9657): upgrader: platform: TargetPlatform.android
I/flutter ( 9657): upgrader: isAndroid: true, isIOS: false, isLinux: false, isMacOS: false, isWindows: false, isFuchsia: false, isWeb: false
I/flutter ( 9657): upgrader: package info packageName: com.linways.lms
I/flutter ( 9657): upgrader: package info appName: Linways V4
I/flutter ( 9657): upgrader: package info version: 1.2.0
I/flutter ( 9657): upgrader: countryCode: US
I/flutter ( 9657): upgrader: languageCode: en
I/flutter ( 9657): upgrader: lookupById url: https://play.google.com/store/apps/details?id=com.linways.lms&gl=US&hl=en&_cb=1681408599390912
I/flutter ( 9657): upgrader: PlayStoreResults.redesignedVersion exception: FormatException: Not a properly formatted version string
I/flutter ( 9657): upgrader: blocked: false
I/flutter ( 9657): upgrader: debugDisplayAlways: false
I/flutter ( 9657): upgrader: debugDisplayOnce: false
I/flutter ( 9657): upgrader: hasAlerted: false
I/flutter ( 9657): upgrader: appStoreVersion: null
I/flutter ( 9657): upgrader: installedVersion: 1.2.0
I/flutter ( 9657): upgrader: minAppVersion: null
I/flutter ( 9657): upgrader: isUpdateAvailable: false
I/flutter ( 9657): upgrader: shouldDisplayUpgrade: false
I/flutter ( 9657): upgrader: shouldDisplayReleaseNotes: true

Content of pubspec.lock is as follows

  upgrader:
    dependency: "direct main"
    description:
      name: upgrader
      sha256: beaa9c749efaba55a619c3bb9a549cdeb03439c60bb827ce19a47b6b11fa3258
      url: "https://pub.dev"
    source: hosted
    version: "5.1.0"

Sarath-K-S avatar Apr 13 '23 18:04 Sarath-K-S

Iam using upgrader package for getting update alerts. In android iam getting the following error

PlayStoreResults.redesignedVersion exception: FormatException: Not a properly formatted version string

How can i resolve this issue.

Sarath-K-S avatar Apr 13 '23 18:04 Sarath-K-S

I tried debugging and following is the line of code of iam getting null

final additionalInfoElements = response.getElementsByClassName('hAyfc');

Version is not listed in the class hAyfc. How can i make this class contains my app version. My app currently is in open testing.

Sarath-K-S avatar Apr 13 '23 18:04 Sarath-K-S

@humanolaranja I looked at this issue and storeVersion comes up with Productivity instead of the version 1.3.0.

Play Store: https://play.google.com/store/apps/details?id=com.linways.lms&gl=US&hl=en&_cb=1681408599390912

Any idea why the logic inside PlayStoreSearchAPI.redesignedVersion() would not handle this Play Store listing?

Here is a link to the code: https://github.com/larryaasen/upgrader/blob/d1e5a7721173d1c4ab531a2d3b032651f117ad89/lib/src/play_store_search_api.dart#L258

larryaasen avatar Apr 19 '23 12:04 larryaasen

It looks like something wrong with the store listing

Check out an calculator app when you click in "About this app" link image

With this link you gave, there is no version listed, even in the play store image

The upgrader package will not be able to get the version if there is no version shown in the play store. I don't know why there is no version shown, but this is not related to the package, probably something to fix in the google play console

humanolaranja avatar Apr 24 '23 13:04 humanolaranja

@humanolaranja It is strange that the version number does not show up in that top section. It does, however, show up below in the "Compatibility for your active devices" section.

larryaasen avatar Apr 25 '23 12:04 larryaasen

The PlayStoreSearchAPI.redesignedVersion() just looks to the top section. The Compatibility for your active devices depends on the login, so it's not possible to get this information

humanolaranja avatar Apr 25 '23 13:04 humanolaranja

@Sarath-K-S There is not much that can be done since the Play Store is not displaying the app version number on that page.

Are there any special restrictions on the latest version, such as restricted devices or locations?

larryaasen avatar Apr 26 '23 02:04 larryaasen

At least I suggest to wrap all the nullable field usage with try-catch. Otherwise the upgrader is not usable with catcher or any other error handler. Instead of silent checking (with failure of course) it raises exception through to a top level catcher which shows an exception dialog to an end user.

out0f0rder avatar Apr 26 '23 06:04 out0f0rder

At least I suggest to wrap all the nullable field usage with try-catch. Otherwise the upgrader is not usable with catcher or any other error handler. Instead of silent checking (with failure of course) it raises exception through to a top level catcher which shows an exception dialog to an end user.

@out0f0rder What is not already wrapped in try/catch?

larryaasen avatar Apr 26 '23 11:04 larryaasen

@out0f0rder What is not already wrapped in try/catch?

Well, disregard my message. The issue is related to 3.6 version, where some try-catch were missing.
No idea why 3.6 was installed in my environment. Seems I have to check all the dependecies...

out0f0rder avatar Apr 27 '23 04:04 out0f0rder

hy any update i am getting this error

upgrader: PlayStoreResults.redesignedVersion exception: Bad state: No element

@larryaasen

GhulamZakariya avatar Apr 27 '23 15:04 GhulamZakariya

@out0f0rder Version Lens is a helpful extension for VS Code that shows the latest version for each package. I use it a lot.

larryaasen avatar Apr 28 '23 11:04 larryaasen

@larryaasen

Thank you, I'll give it a try. BTW, I've found a weird dependence conflict: it's catcher depends on device_info_plus 7.0.0 while upgrader depends on 8.0.0 So, this is definitely a catcher issue. Lack of maintainer :(

out0f0rder avatar Apr 28 '23 13:04 out0f0rder

@out0f0rder I tried using device_info_plus 7.0.0 with upgrader and it seems to work fine. I just pushed a change to downgrade the version requirement to 7..0.0.

larryaasen avatar Apr 30 '23 12:04 larryaasen

Perhaps the problem is that the Linways V4 application is in open testing status. I have the same problem with my application, which is in open testing. https://play.google.com/store/apps/details?id=com.nullexp.cube_system

StarProxima avatar May 03 '23 17:05 StarProxima

@GhulamZakariya GhulamZakariya Is your app is also in open testing track?

Sarath-K-S avatar May 15 '23 12:05 Sarath-K-S

Good day, I get that too: upgrader: PlayStoreResults.redesignedVersion exception: Bad state: No element

@larryaasen

youssefalaaramadan avatar Dec 03 '23 10:12 youssefalaaramadan

Please try again using the latest version 10.1.0 of upgrader and see if you are still having issues.

larryaasen avatar Apr 07 '24 12:04 larryaasen