Skip to content

Dismissing multiple sheets to present different sheet freezes app #3779

@KaiOelfke

Description

@KaiOelfke

Description

From TCA 1.21.0 there's a regression when dismissing two (probably two or more, but I didn't test this) sheets to present another sheet. While all sheets get dismissed and the other gets presented the app freezes and must be force quit.

This does not happen with TCA 1.20.2 and lower. I can't reproduce it in vanilla SwiftUI or with SwiftUINavigation. It also happens with Perception 1 and TCA main.

The following warnings are in the Xcode console:

Failed to complete already running transition on <_TtGC7SwiftUI29PresentationHostingControllerVS_7AnyView_: 0x12d80f400>.
Trying to dismiss the presentation controller while transitioning already. (<_UIFormSheetPresentationController: 0x10292e510>)

This happens with Xcode 26 and iOS 26 (device, sim). I didn't test other Xcode or iOS versions so far.

You can find my sample with TCA, SwiftUINav and vanilla attached to test it yourself.

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior

Sheets get dismissed, new sheet gets presented. App does not freeze.

Actual behavior

Sheets get dismissed, new sheet gets presented. App freezes.

Reproducing project

MultiSheet.zip

The Composable Architecture version information

1.21.0

Destination operating system

iOS 26

Xcode version information

Xcode 26

Swift Compiler version information

swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
Target: arm64-apple-macosx15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working due to a bug in the library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions