-
Notifications
You must be signed in to change notification settings - Fork 169
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
Purchases.purchasePackage(package) takes too long #693
Comments
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out! |
Hi, this is happening from Apple's end. This is most likely from a iOS sandbox user with a lot of receipts so it is causing a delay. I recommend you try making a new sandbox user, this should remove the delay. |
Hello, this is happening in production. We are not using sandbox users. |
Could you share debug logs when you reproduce the issue?
Could you describe what exactly takes 8 seconds? Is it the time from the user entering AppStore credentials or accepting the purchase until the time your flutter app receives the confirmation? Or the time between accepting the purchase and receiving the "purchase success" alert from iOS? |
Hello, I'm having the exact same problem. When I click the button to make the purchase, in Android works perfectly, in iOs it takes ~4 to 5 seconds to show the Apple payment modal. It doesn't show any error on the console. Lib version: 4.12.0 Flutter doctor:
|
It would be helpful if you could attached debug logs as well as the code you're using to call |
I used
|
@NachoSoto hey! Do you have any updates on this? I'm still having this problem (same log as before) |
My guess is the delay happens between the "adding payment" and "updated transaction" logs. Can you confirm that? |
Is there any update on this? seeing this in dev |
The delay on iOS is really too long. As a palliative solution, I block the UI with a loader and call the I also tested if it was possible to get the in app purchase screen from the hierarchy of components above, using an observable notification, but as it is native code it is not a simple task to detect when it is launched on the screen, and there isn't another method that triggers any action at the exact moment the native bottom sheet payment is shown. |
It happens for me for both production and new sandbox user. After calling the purchasePackage function it takes ~ 7 seconds until iOS payment page loads. Since it takes a lot of time to load and complete the purchase the abandonment rate is very high and people do not complete payment!! |
I just tested this and the delay is less than 1 second both on simulator (iOS 16.4) and on device (iOS 17.0 beta 1). When you reproduce this, could you pause the debugger on Xcode and send us a trace of what all the threads look like? |
I just randomly saw this from a completely different app (not even Flutter). I confirmed that the delay happens after we call Also confirmed this happens even without our SDK, same delay on both StoreKit 1 and StoreKit 2. I just filed |
@NachoSoto Thanks for the update |
@NachoSoto this is not a random delay, it is a consistent delay. We just updated from flutter_purchases: 4.11.1 to 5.3.0. The older version was not slow, the new version is slow. We are forced to upgrade soon but my company is concerned about this delay causing churn. |
@NachoSoto I am facing the same issue. The await for purchase package never completes |
I’d appreciate it if you could provide any additional details to help us debug this 🙏 |
@NachoSoto This is the logs that I get
Even if the purchase says completed, the await never completes |
Can you send us the complete logs, including from SDK initialization? |
|
I also have |
Do you mind filing a separate issue for that so we can keep this about slow StoreKit calls? |
Sure @NachoSoto. I dont think it is slow, it never seems to be complete. I waited for 25 mins. |
Yup, seems like a separare issue. |
@NachoSoto I think this might be related since the issues discussed in the thread here is exactly what we are facing |
Hello, I have the same issue only on IOS. I use React native SDK. The paiement popup are opening in less than 1 second on android but on IOS it's take 8 seconds ! I want to release my app but I can't do it with this delay. Do you have idea ? |
This is a known iOS issue, especially on sandbox. I recommend filing more feedbacks directly with Apple. The more duplicate they get, the higher the chances they'll address it. |
I just sent the version on Testflight and the delay is always so long! I'm going to send to production like this, hope I don't lose too many customers :/ |
Are there ANY flutter users for which this bug ONLY occurs in TestFlight (sandbox users) and not in production apps? This issue is exactly like this one for the in_app_purchases plugin, except that OP claims it works fine in production. I am releasing at app in a few weeks and can not have this long a wait for purchases! Any headway or more info on this? @HaleyRevcat @NachoSoto |
Are there any updates on this issue? I encountered the same on iOS 17, iPhone XS Max :( |
I sent an update to my users and now stuck with this nonsense. How the hell can this happen |
I am having an issue where it gets to the Purchases.purchasePackage method and the app reaches out to Apple's end and never gets a response back. Passing in aPackage parameter that I've console logged and it has a package being sent. Getting this error: tcp_input [C1.1.1.1:3] flags=4 seq=3,963,150,005, ack=0, win=0 state=8 rcv_nxt=3,963,150,005, snd_una=3,069,187,791 tcp_input [C1.1.1.1:3] flags=4 seq=3,963,150,005, ack=0, win=0 state=0 rcv_nxt=3,963,150,005, snd_una=3,069,187,791 tcp_input [C1.1.1.1:3] flags=4 seq=3,963,150,005, ack=0, win=0 state=0 rcv_nxt=3,963,150,005, snd_una=3,069,187,791 Has anyone ever gotten this before? |
I am facing the same issue. Happens only on Apple iPhone. I have transferred my app to another App Store developer account, and have transferred my app to another Revenuecat account. Issue started to happen in same day. No update released and no other changes in the day. I have taken all required actions for transferring app. Webhook works fine. Users can purchase, webhook send to data to my server. But the method does not respond in client side. |
Environment
flutter doctor
`[✓] Flutter (Channel stable, 3.7.12, on macOS 13.0.1 22A400 darwin-x64, locale en-GB)
• Flutter version 3.7.12 on channel stable at /Users/mac/Code/Flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4d9e56e694 (4 weeks ago), 2023-04-17 21:47:46 -0400
• Engine revision 1a65d409c7
• Dart version 2.19.6
• DevTools version 2.20.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/mac/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /Library/Internet
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_361-b09)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.12.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed)
• Android Studio not found; download from
https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for
detailed instructions).
[✓] VS Code (version 1.78.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.64.0
[✓] Connected device (3 available)
• iPhone 14 Pro Max (mobile) • 0BC2EBC6-CF53-4D82-96C2-16475ED01166 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
• macOS (desktop) • macos • darwin-x64 •
macOS 13.0.1 22A400 darwin-x64
• Chrome (web) • chrome • web-javascript •
Google Chrome 113.0.5672.126
[✓] HTTP Host Availability
• All required HTTP hosts are available`
purchases-flutter
4.12.0
iOS 16.4
How often the issue occurs- every one of your customers is impacted? Only in dev?
DEV AND PROD
Debug logs that reproduce the issue
Steps to reproduce, with a description of expected vs. actual behavior
Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Describe the bug
Our flutter/ios app is taking ~8 seconds to load the iOS payment page, on android it is instantaneous. The purchase goes through after the delay but the response also taker longer. This has barred us from deploying the app to apple store.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: