Skip to content

Payment Sheet Crash with Xcode 26.4 on Apple Silicon #2373

@HyperJames

Description

@HyperJames

Calling Stripe.instance.presentPaymentSheet() causes an immediate native SIGABRT / EXC_BAD_ACCESS crash on iOS (both on physical devices and Apple Silicon simulators). The crash originates in the Swift Concurrency engine (libswift_Concurrency.dylib) during PaymentSheetLoader.load when the native SDK attempts to resolve async let parallel network tasks. Xcode's terminal explicitly outputs freed pointer was not the last allocation immediately before the crash.
The crash occurs regardless of whether the initialization uses Deferred Intents (IntentConfiguration) or the Standard Flow (setupIntentClientSecret). All backend Stripe API requests (e.g., /v1/elements/sessions, /v1/payment_methods) return 200 OK prior to the crash, confirming the data parameters are valid.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Setup Intent and an Ephemeral Key for a Customer on the backend.

  2. Initialize the Payment Sheet in Flutter using the Standard Flow:


await Stripe.instance.initPaymentSheet(
  paymentSheetParameters: SetupPaymentSheetParameters(
    customFlow: false,
    merchantDisplayName: 'Test Merchant',
    returnURL: 'https://your-domain.com',
    setupIntentClientSecret: 'seti_12345_secret_abc', 
    customerId: 'cus_12345',                
    customerEphemeralKeySecret: 'ek_test_12345',
    style: ThemeMode.dark,
  ),
);

  1. Call await Stripe.instance.presentPaymentSheet();

  2. Observe a fatal application crash (SIGABRT or EXC_BAD_ACCESS) with the following stack trace.

Expected behavior

The native iOS Payment Sheet bottom modal should render and present to the user without crashing the host application.

Smartphone / tablet

• Device: iPhone 18,1 (Physical) and Mac14,6 (iOS Simulator on Apple Silicon M2 Max)
• OS: iOS 19.x / macOS 26.3.1
• Package version: 10.1.1 (Also reproduced on newer versions)
• Flutter version: 3.41.0

Additional context

The Flutter code executes perfectly up until the UI presentation. Below is the relevant native iOS crash trace showing the Swift Concurrency failure inside PaymentSheetLoader:


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib           0x10383c85c __pthread_kill + 8
1   libsystem_pthread.dylib          0x1054422a8 pthread_kill + 264
2   libsystem_c.dylib                0x18017a910 __abort + 120
3   libsystem_c.dylib                0x18017a898 abort + 128
4   libswift_Concurrency.dylib       0x237969814 swift::swift_Concurrency_fatalErrorv + 28
5   libswift_Concurrency.dylib       0x237969830 swift::swift_Concurrency_fatalError + 28
6   libswift_Concurrency.dylib       0x237969a0c <deduplicated_symbol> + 60
7   libswift_Concurrency.dylib       0x2379213c8 swift::_swift_task_dealloc_specific + 104
8   libswift_Concurrency.dylib       0x23791ce08 asyncLet_finish_after_task_completion + 88
9   StripePaymentSheet               0x10746dd4d partial apply for closure #1 in static PaymentSheetLoader.load(mode:configuration:analyticsHelper:integrationShape:isUpdate:completion:) + 1
10  StripePaymentSheet               0x1070b1a65 thunk for @escaping @isolated(any) @callee_guaranteed @async () -> (@out A) + 1
11  StripePaymentSheet               0x1070b20fd partial apply for thunk for @escaping @isolated(any) @callee_guaranteed @async () -> (@out A) + 1
12  libswift_Concurrency.dylib       0x237920555 completeTaskWithClosure + 1


Xcode console output right before the crash:


[Stripe SDK]: GET "/v1/elements/sessions" 200 req_...
[Stripe SDK]: GET "/v1/payment_methods" 200 req_...
[Stripe SDK]: GET "/v1/customers/cus_..." 200 req_...
V1 LOG ANALYTICS: mc_load_succeeded
freed pointer was not the last allocation


Flutter version:
3.41.0

Xcode version:
Xcode (Apple Silicon) 26.4
Release 17E192
24 Mar 2026
macOS 26.2+
Swift 6.3 (6.3.0.123.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions