Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Sarath-K-S opened this issue Apr 13, 2023 · 18 comments
Labels
Android bug Something isn't working

Comments

@Sarath-K-S
Copy link

Sarath-K-S commented Apr 13, 2023

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
Copy link
Author

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
Copy link
Author

Sarath-K-S commented Apr 13, 2023

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.

@larryaasen
Copy link
Owner

@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:

final storeVersion = versionElement.substring(

@larryaasen larryaasen added bug Something isn't working Android labels Apr 19, 2023
@humanolaranja
Copy link
Contributor

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

@larryaasen
Copy link
Owner

@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.

@humanolaranja
Copy link
Contributor

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

@larryaasen
Copy link
Owner

@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?

@out0f0rder
Copy link

out0f0rder commented Apr 26, 2023

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.

@larryaasen
Copy link
Owner

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?

@out0f0rder
Copy link

out0f0rder commented Apr 27, 2023

@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...

@GhulamZakariya
Copy link

GhulamZakariya commented Apr 27, 2023

hy any update i am getting this error

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

@larryaasen

@larryaasen
Copy link
Owner

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

@out0f0rder
Copy link

@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 :(

@larryaasen
Copy link
Owner

@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.

@StarProxima
Copy link

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

@Sarath-K-S
Copy link
Author

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

@youssefalaaramadan
Copy link

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

@larryaasen

@larryaasen
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants