larryaasen / upgrader

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

In iOS 18, the UpgradeAlert dialog is displayed, but the "Update Now" button is not functional because the appStoreListingURL is empty #449

Open HelmiAshraf opened 1 month ago

HelmiAshraf commented 1 month ago

This issue is observed on iOS 18, while it works fine on Android and iOS 17 or below.

Steps to reproduce:

  1. Use UpgradeAlert in an iOS 18 environment.
  2. Trigger an update check where appStoreListingURL is empty.
  3. Attempt to click the "Update Now" button.
  4. Notice that the button does not redirect to the App Store.

flutter: upgrader: showTheDialog releaseNotes: null
flutter: upgrader: onCanPop called
flutter: upgrader: button tapped: update now
flutter: upgrader: empty appStoreListingURL
flutter: upgrader: showTheDialog onPopInvoked: true
larryaasen commented 1 month ago

@HelmiAshraf Why was appStoreListingURL empty in this case? Since appStoreListingURL was empty, what are your expected results? (Also, if you can provide the entire upgrader log that might be more helpful.)

HelmiAshraf commented 1 month ago

Case 1: Wrong Country Code with Malaysia (English US) When the device is set to Malaysia and the language is English (US), the upgrader package incorrectly detects the countryCode: US instead of MY and current locale: en_US instead of en_MY. This prevents the app from retrieving the correct App Store listing.

Steps to Reproduce:

  1. Set the device to Malaysia with English (US).
  2. Run the app.
  3. Observe that the country code is detected as US instead of MY, and the store listing cannot be retrieved.

Expected Behavior: The app should detect the country code as MY and retrieve the correct store listing.

Actual Behavior: The country code is detected as US, and the store listing cannot be retrieved.

Case 2: ActionKit Errors with Malaysia (English UK) When the device is set to Malaysia with English (UK), the country code is correctly detected as MY, and the store listing is retrieved successfully. However, the logs are filled with ActionKit conversion errors related to <private> parameters.

Steps to Reproduce: Set the device to Malaysia with English (UK). Run the app. Observe that the correct country code (MY) is detected, and the store listing is retrieved, but ActionKit errors appear in the logs.

Failed to index parameter type: <private> in is.workflow.actions.encodemedia: Error Domain=(extension in ActionKit):__C.WFParameter.ToolKitConversionError Code=0

Device Information: iOS Version: 18.0 Upgrader Version: ^11.1.0 Flutter Version: 3.24.2

stuartrapop commented 1 month ago

I am seeing a similar issue in production, but cannot reproduce in testing. I live on the French/Swiss border, so maybe localisation is an issue. How can I print out which store upgrader is trying to access, so that I can complete my issue report.

The upgrader popup shows perfectly in both French and English (depending on the phone settings) with the latest release notes. But when we click on the upgrade now button, nothing happens.

Galaxy A53 5G (my wife's Samsung has the same issue) Android version 14 Upgader version:^11.1.0