SwiftUI: Pop back from NavigationLink in TabView crashes tvOS app

I am trying to make a simple tvOS app. I was testing some basic SwiftUI code shown here:

struct ContentView: View {  
    var body: some View {
        TabView {
            NavigationView {
                NavigationLink(destination: Text("Subview")) {
                    Text("Subview")
                }
            }
            .tabItem {
                Text("Main")
            }

            NavigationView {
                Text("Settings")
            }
            .tabItem {
                Text("Settings")
            }
        }
    }
}

ContentView() is called directly from the entry point:

@main
struct MyApp: App {
	var body: some Scene {
		WindowGroup {
			ContentView()
		}
	}
}

When testing this code on my Apple TV (Apple TV 4K, running tvOS 15.0), the app launches successfully. I can switch between tabs and click on the NavigationLink to go to the subview. However, when pressing the back/menu button on the Apple TV Remote, the app closes with the following error:

[Common] Error response from snapshot request action of type 1 gave Error Domain=BSActionErrorDomain Code=1 "(null)"

Is this intended behavior? Looking at the resources and documentation online it appears like NavigationViews nested inside TabViews should work as expected. Any feedback about what the error is trying to explain might be helpful too, as the vague output makes it difficult to determine if this is an issue with my SwiftUI code or if it is a bug with tvOS and SwiftUI.

Thanks!

Replies

This issue seems to be related to TabViews, not to SwiftUI or NavigationView. I have seen this in my Xcode debug output in an app written in Objective-C and without Navigation View - except I got "(response-not-possible)" instead of "(null)".