The action POP with payload was not handled by any navigator

Ali picture Ali · Feb 21, 2020 · Viewed 6.9k times · Source

I have no idea what is causing this bug in my react native app. I'm using version 5 of the React Navigation library.

enter image description here

It randomly crashes the app sometimes. Google searching hasn't helped me understand what this is. It's very selective though which is a good(or a bad) thing.

So what does this mean and what could be causing it?

Answer

KingAmo picture KingAmo · Aug 3, 2020
if(navigation.canGoBack()) {
  navigation.dispatch(StackActions.pop(1));
}

see https://github.com/react-navigation/react-navigation/issues/7814#issuecomment-599921016