Could not find a navigation controller for segue. Random Crash for years now...

I've been seeing this crash happening for a few years now. It's rare and unreproducible. The App's storyboard is large and it can occur on any segue and randomly it seems

Could not find a navigation controller for segue 'some-segue-on-storyboard'. Push segues can only be used when the source controller is managed by an instance of UINavigationController.

I've tried various things to prevent it. Double checked it was on the main thread to keep the UI happy and assumed all this time that it was just an iOS glitch/bug that Apple would get around to fixing. That or it is a side effect of low memory.

Anyone got any suggestions for how to fix or what to investigate?

Same here - any luck with this?

Nothing. Pleased to hear it isn't just me!

I am also seeing this crash. I do not know a fix. For us, the crash started appearing after we made a change to how some of our segues are hooked up. So it seems pretty clear that we caused the regression, but it still only occurs very rarely so we cannot reliably reproduce it.

Another year goes by and I'm still searching for an answer to this one...

This is interesting. I have an Application (in the AppStore) that has been round for some time. It has a MapView and when you tap on a button a segue pushes a new view on top of the map view. I've raised the minimum supported OS level from iOS 12 to iOS 13. And now the behaviour has changed such that the view is pushed, displayed and immediately backs itself out... and the action of the button to repeat no longer works.

I have changed the iPhone behaviour to now be a popover which is working.

Could not find a navigation controller for segue. Random Crash for years now...
 
 
Q