Repository navigation
[in_app_purchase_storekit] add warm up test to preaction - #13661
Conversation
… tests On iOS 27 simulators, the first process to use SKTestSession on a never-used simulator gets its StoreKit connection classified as sandbox before the test configuration has been pushed to the device, so every StoreKit 2 purchase hangs on an Apple Account sign-in and times out (Apple FB24651858 / 186670057, listed as a known issue in the iOS 27.3 release notes). Any later process on the same device works, which is why the tests pass on reused simulators and fail on CI's fresh ones. Add a Test pre-action to the Runner scheme that runs one non-purchase test in a throwaway process before the real test host launches. This is Apple's documented workaround (seed the configuration on the device first), automated for xcodebuild, which ignores the scheme's StoreKit configuration setting that makes it work from the IDE. Fixes flutter/flutter#195494
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the |
There was a problem hiding this comment.
Code Review
This pull request adds a pre-action shell script to the Xcode scheme Runner.xcscheme to warm up StoreKit testing on cold simulators. The review feedback suggests adding defensive checks to the script to ensure environment variables like $PROJECT_DIR, $BUILD_DIR, $TARGET_DEVICE_IDENTIFIER, and $TMPDIR are set before executing xcodebuild or writing logs.
|
Test exemption: the files changed are part of the test itself |
…r#196812) flutter/packages@4c6a7d3...9af69be 2026-11-17 [email protected] [in_app_purchase_storekit] add warm up test to preaction (flutter/packages#13661) 2026-11-17 [email protected] Roll Flutter from d8bd864 to 2f09f96 (27 revisions) (flutter/packages#13695) 2026-11-17 [email protected] [url_launcher] Convert implementation to Kotlin (flutter/packages#13663) 2026-11-17 [email protected] [cupertino_ui] Prevent null-check crash during CupertinoTextSelectionToolbar pagination (flutter/packages#13659) 2026-11-17 [email protected] [ci] Allow backfilling missed releases via workflow_dispatch (flutter/packages#13612) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Basically, when you run StoreKitTest tests, it opens a connection to the Storekit daemon, then it pushes the storekit configuration a few ms later. The daemon, however, decides at connection time if we're in the testing environment or the sandbox. So on first run, there's no configuration on device yet, so it tries to connect to the sandbox. The tests hang for 60 secs cuz on device you get a Sign In to Apple popup. However subsequent tests will pass, because now the config exists on the device.
So, this pr adds a test pre-action to the Runner scheme that runs one non-purchase test in a throwaway process before the real test host launches.
this is an Apple bug for sure. It actually shows up finally in the 27.3 patchnotes
Heres a passing led run https://ci.chromium.org/b/8665196748563787521
Fixes flutter/flutter#195494
Pre-Review Checklist
[shared_preferences]///).