UIKit Internal bug: Unbalanced call to _endOcclusion, please file a feedback report with any information you have that helps reproduce this bug!

Hi, I'm getting a bug in SwiftUI when dismissing a sheet and then hitting the back button or swiping to go back in a navigation stack. This issue happens inconsistently but causes undesirable behavior where the screen freezes in a partially dismissed state but does not crash. A user can click on another tab and return back and the view will have completed dismissal.

The error seems more likely to happen if the time between dismissing the sheet and navigating backwards is minimal.

I've experimenting using different forms of navigation, NavigationStack using NavigationPaths and NavigationDestinations, NavigationLinks, NavigationViews, etc. The issue persists.

Is there a nice fix or intended fix to this issue coming soon?

Thank you!

Do you get the same results with just the relevant code in a small test project?

If so, please share a link to your test project. That'll help us better understand what's going on.

If you're not familiar with preparing a test project, take a look at Creating a test project.

If you have filed a bug, can you also share the FB number here?

Albert Pascual
  Worldwide Developer Relations.

UIKit Internal bug: Unbalanced call to _endOcclusion, please file a feedback report with any information you have that helps reproduce this bug!
 
 
Q