Hello,
I’m using purchases-flutter 4.1.2 (latest at the moment). I’ve set up the entitlements, offerings, products as well as packages as guided in https://docs.revenuecat.com/docs/ios-products
I can get the offerrings and display the packages correctly.
But when I make a call to `Purchases.purchasePackage()` to purchase a package, the call just hangs and doesn’t return at all.
Here’s my dependency list:
```
environment:
sdk: ">=2.17.5 .0.0"
dependencies:
another_flushbar: ^1.10.23
awesome_notifications: ^0.6.21
bloc: ^8.0.2
cached_network_image: ^3.1.0
cloud_firestore: ^3.4.4
easy_localization: ^3.0.0
easy_localization_loader: ^1.0.0
equatable: ^2.0.3
firebase_analytics: ^9.3.1
firebase_auth: ^3.6.3
firebase_core: ^1.20.1
firebase_messaging: ^12.0.2
flow_builder: ^0.0.2
flutter:
sdk: flutter
flutter_bloc: ^8.0.1
flutter_onboard: ^2.0.0
flutter_platform_widgets: ^2.0.0
flutter_svg: ^1.0.0
flutter_typeahead: ^4.0.0
formz: ^0.4.0
google_fonts: ^3.0.1
grouped_list: ^5.1.2
hydrated_bloc: ^9.0.0-dev
lint: ^1.0.0
meta: ^1.7.0
path_provider: ^2.0.2
pattern_formatter: ^2.0.0
provider: ^6.0.1
rxdart: ^0.27.4
scrollable_positioned_list: ^0.3.2
shared_preferences: ^2.0.6
synchronized: ^3.0.0
toggle_switch: ^2.0.1
crypto: ^3.0.2
flutter_keyboard_visibility: ^5.3.0
uuid: ^3.0.4
intl: ^0.17.0
characters: ^1.2.0
sentry_flutter: ^6.1.2
sign_in_with_apple: ^4.0.0
flutter_slidable: ^1.1.0
internet_connection_checker: ^0.0.1+3
device_info_plus: ^4.0.0
package_info_plus: ^1.3.0
timeago: ^3.2.1
local_auth: ^2.1.0
secure_application: ^3.8.0
purchases_flutter: ^4.1.2
modal_progress_hud_nsn: ^0.3.0
dev_dependencies:
bloc_test: ^9.0.2
flutter_launcher_icons: "^0.9.2"
flutter_lints: ^2.0.0
flutter_test:
sdk: flutter
logger: null
mocktail: ^0.3.0
```
And this is the debug log when I try to load the screen and trigger the purchasePackage function:
```
2022-08-22 19:49:37.665783+0700 Runneru8559:16612850] `Purchases] - DEBUG: Vending Offerings from cache
2022-08-22 19:49:37.669501+0700 Runnerg8559:16612850] tPurchases] - WARN: This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
2022-08-22 19:49:37.679191+0700 Runnera8559:16612850] .Purchases] - WARN: This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
2022-08-22 19:49:37.679445+0700 Runneru8559:16612850] tPurchases] - WARN: This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
2022-08-22 19:49:37.679716+0700 Runnerp8559:16612850] Purchases] - WARN: This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
2022-08-22 19:49:37.679962+0700 Runneru8559:16612850] oPurchases] - WARN: This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
2022-08-22 19:49:37.680299+0700 RunnerP8559:16612850] aPurchases] - WARN: This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
2022-08-22 19:49:37.680496+0700 Runnert8559:16612850] uPurchases] - WARN: This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
2022-08-22 19:49:37.680679+0700 Runnere8559:16612850] pPurchases] - WARN: This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
2022-08-22 19:49:37.682355+0700 Runner.8559:16612850] uPurchases] - DEBUG: Offerings cache is stale, updating from network in foreground
2022-08-22 19:49:37.682468+0700 Runnerc8559:16612850] dPurchases] - DEBUG: Offerings updated from network.
2022-08-22 19:49:37.683176+0700 Runnerh8559:16770060] Purchases] - DEBUG: GetOfferingsOperation: Started
2022-08-22 19:49:37.683405+0700 Runneru8559:16770060] GPurchases] - DEBUG: There are no requests currently running, starting request GET subscribers/4R9IChuPBJMxLDVbIZfip7J5AV12/offerings
2022-08-22 19:49:37.685568+0700 Runnerq8559:16770060] iPurchases] - DEBUG: API request started: GET /v1/subscribers/4R9IChuPBJMxLDVbIZfip7J5AV12/offerings
2022-08-22 19:49:38.627514+0700 Runnerr8559:16776577] bboringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2022-08-22 19:49:38.906210+0700 Runnern8559:16770060] gPurchases] - DEBUG: API request completed: GET /v1/subscribers/4R9IChuPBJMxLDVbIZfip7J5AV12/offerings 304
2022-08-22 19:49:38.908744+0700 Runnere8559:16770060] bPurchases] - DEBUG: GetOfferingsOperation: Finished
2022-08-22 19:49:38.908827+0700 Runner58559:16776577] rPurchases] - DEBUG: Skipping products request because products were already cached. products: 8"myapp_45000_1m_1w0", "myapp_499000_1y_2w0"]
2022-08-22 19:49:38.909315+0700 Runnerw8559:16770060] hPurchases] - DEBUG: Serial request done: GET subscribers/4R9IChuPBJMxLDVbIZfip7J5AV12/offerings, 0 requests left in the queue
2022-08-22 19:49:40.950981+0700 Runners8559:16612850] CPurchases] - DEBUG: Vending Offerings from cache
2022-08-22 19:49:40.951716+0700 Runner+8559:16612850] 9Purchases] - INFO: Purchasing Product 'myapp_45000_1m_1w0' from package in Offering 'default'
2022-08-22 19:49:40.954935+0700 Runner-8559:16612850] cPurchases] - DEBUG: PaymentQueue updatedTransaction: myapp_45000_1m_1w0 0
2022-08-22 19:49:40.955110+0700 Runner18559:16612850] aPurchases] - WARN: There is a problem with the SKPaymentTransaction missing a transaction date - this is an issue with the App Store. Unix Epoch will be used instead.
Transactions in the backend and in webhooks are unaffected and will have the correct timestamps. This is a bug in StoreKit 1. To prevent running into this issue on devices running iOS 15+, watchOS 8+, macOS 12+, and tvOS 15+, you can set `usesStoreKit2IfAvailable` to true when calling `configure`.
2022-08-22 19:49:40.955829+0700 Runner 8559:16612850] tPurchases] - WARN: There is a problem with the SKPaymentTransaction missing a transaction identifier - this is an issue with the App Store.Transactions in the backend and in webhooks are unaffected and will have the correct identifier. This is a bug in StoreKit 1. To prevent running into this issue on devices running iOS 15+, watchOS 8+, macOS 12+, and tvOS 15+, you can set `usesStoreKit2IfAvailable` to true when calling `configure`.
objce8559]: Class _PathPoint is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x12e16ebb8) and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x14c305210). One of the two will be used. Which one is undefined.
objcR8559]: Class _PointQueue is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x12e16eb90) and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x14c305238). One of the two will be used. Which one is undefined.
2022-08-22 19:51:30.917345+0700 Runnerr8559:16778768] fboringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
```