larryaasen / upgrader

A Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
MIT License
531 stars 262 forks source link

Upgrade PopUp doesn't appear on Closed Testing #319

Open gokuhsalas opened 11 months ago

gokuhsalas commented 11 months ago

I created an app to test the Upgrader package before I include it in my full app. Company name has been changed for "company_name" The app was created:

The main.dart hasn't been changed at all, so it is basically this: https://github.com/larryaasen/upgrader/blob/master/example/lib/main.dart

The thing is that after publishing the app as a Closed Testing on PlayStore, PlayStore shows my App by name and I can see all the results. In the About version of the app can be seen among other things:

The app has the same version for every available device. Below this is the upgrader log (and the pubspec.lock) when i run it in debug mode (it says it cannot find the id but the "lookupById url" contains the correct url of the PlayStore App. Any idea of how to fix this so that the Upgrader alert shows? Is it because it is in Closed Testing and it only works in Production? The link to PlayStore below doesn't work because I have manually changed the company domain since we haven't announced yet to be making an app.

I/flutter (20098): upgrader: instantiated. I/flutter (20098): upgrader: initialize called I/flutter (20098): upgrader: build UpgradeAlert I/flutter (20098): upgrader: initializing I/flutter (20098): upgrader: languageCode: en I/flutter (20098): upgrader: default operatingSystem: android BV7100_EEA_M800_V1.0_03_20230711V20 I/flutter (20098): upgrader: operatingSystem: android I/flutter (20098): upgrader: isAndroid: true, isIOS: false, isLinux: false, isMacOS: false, isWindows: false, isFuchsia: false, isWeb: false I/flutter (20098): upgrader: package info packageName: com.company_name.test_for_upgrader I/flutter (20098): upgrader: package info appName: test_for_upgrader I/flutter (20098): upgrader: package info version: 1.0.8 I/flutter (20098): upgrader: countryCode: IE I/flutter (20098): upgrader: languageCode: en I/flutter (20098): upgrader: lookupById url: https://play.google.com/store/apps/details?id=com.company_name.test_for_upgrader&gl=IE&hl=en&_cb=1692087802563867 I/flutter (20098): upgrader: instantiated. I/flutter (20098): upgrader: build UpgradeAlert I/flutter (20098): upgrader: Can't find an app in the Play Store with the id: com.company_name.test_for_upgrader

pubspec.lock:

upgrader:

dependency: "direct main"
description:
  name: upgrader
  sha256: "41a8cfff761fd9c880225ae5f7a84ddf6a7be6d9a441bf82dc8dd22126226c54"
  url: "https://pub.dev"
source: hosted
version: "8.1.0"
larryaasen commented 11 months ago

This is the code that produces the message: Can't find an app in the Play Store with the id

      if (response.statusCode < 200 || response.statusCode >= 300) {
        if (debugLogging) {
          print(
              'upgrader: Can\'t find an app in the Play Store with the id: $id');
        }
        return null;
      }

What was the response.statusCode?

Can you include the actual company name here for diagnosis?

gokuhsalas commented 11 months ago

Ok, I edited the print and got error 404. Also, I tried to search for the app on other devices and it straight up doesn't appear (probably for being a closed testing release). The link also doesn't show the app if the google account associated is not invited.

I will have to ask if I have permission to give the name of the company but in any case, the link wouldn't work for anyone not invited to the closed testing.

I would think Upgrader would find the app if it the Google Play Store in my phone is logged with an allowed user but it seems it doesn't