-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
Steps to reproduce
1.Initiate an automatic subscription product purchase in Storekit2.
2. Initiate the purchase of the same subscribed product again, and then click the "OK" button in the window that pops up in the system indicating that you have subscribed to this product.
3.The listen method called back the purchase of a successful product, resulting in the addition of benefits due to unpaid but successful verification.
Expected results
Storekit2 initiates the purchase of the same subscribed product again, and then clicks the "OK" button in the window that pops up in the system indicating that you have subscribed to this product. The listen method should callback an error.
Actual results
Storekit2 initiates the purchase of the same subscribed product again, and then clicks the "OK" button in the window that pops up in the system indicating that you have subscribed to this product. The listen method should have called back an error, but it did call back the information of successfully purchased orders, resulting in unpaid items going through the verification process.
Code sample
final Stream<List<PurchaseDetails>> purchaseUpdated = _inAppPurchase.purchaseStream;
_subscription = purchaseUpdated.listen((purchaseDetailsList) {
_listenToPurchaseUpdated(purchaseDetailsList);
}, onDone: () async {
_onPurchaseCanceled?.call();
await _onClearObject();
onClose();
}, onError: (error) async {
showToast("Error: $error");
_onPurchaseCanceled?.call();
await _onClearObject();
onClose();
});
Screenshots or Video
Logs
Logs
[Paste your logs here]
Flutter Doctor output
MACBOOK@Wendy-MacBook ios % flutter doctor -v
[✓] Flutter (Channel stable, 3.32.2, on macOS 14.6.1 23G93 darwin-arm64, locale zh-Hans-IN) [787ms]
• Flutter version 3.32.2 on channel stable at /Users/MACBOOK/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 8defaa71a7 (5 周前), 2025-06-04 11:02:51 -0700
• Engine revision 1091508939
• Dart version 3.8.1
• DevTools version 2.45.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0-rc3) [15.9s]
• Android SDK at /Users/MACBOOK/Library/Android/sdk
• Platform android-35, build-tools 36.0.0-rc3
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [2.1s]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [12ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.1) [12ms]
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
[✓] VS Code (version 1.96.3) [11ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.102.0
[✓] Connected device (4 available) [6.2s]
• Wendy-14 (wireless) (mobile) • 00008110-0016315C1AB9401E • ios • iOS 18.5 22F76
• test-iPhone (mobile) • 40a9e15d38795543a7f9069c1a37652567dfd3dd • ios • iOS 16.7.11 20H360
• macOS (desktop) • macos • darwin-arm64 • macOS 14.6.1 23G93 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.142
! Error: Browsing on the local area network for Wendy-13. Ensure the device is unlocked and attached with a cable or associated with the same local area network as
this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for Test-iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as
this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPhone带手机壳的. Ensure the device is unlocked and attached with a cable or associated with the same local area network
as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
! Error: Browsing on the local area network for iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this
Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)