Skip to content

(RN77-NA) Bug(iOS): Push and immediate pop promise rejected #8022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
gosha212 opened this issue May 15, 2025 · 0 comments
Open
1 task done

(RN77-NA) Bug(iOS): Push and immediate pop promise rejected #8022

gosha212 opened this issue May 15, 2025 · 0 comments

Comments

@gosha212
Copy link
Contributor

What happened?

  push = async () => {
    return Navigation.push(this.props.componentId, {
      component: {
        id: 'ChildId',
        name: Screens.Pushed,
      },
    })
      .then((pushId) => new Promise<string>((resolve) => setTimeout(() => resolve(pushId), 100)))
      .then((pushId) => {
        this.setState({
          pushPromiseResult: `push promise resolved with: ${pushId}`,
        });
        return pushId;
      })
      // When time out is removed the pop promise is rejected. <============ here is the problem
      .then((popId) => new Promise<string>((resolve) => setTimeout(() => resolve(popId), 500)))
      .then((popId) => Navigation.pop(popId))
      .then((popId) => {
        this.setState({
          popPromiseResult: `pop promise resolved with: ${popId}`,
        });
      })
      .catch((err) => console.log(err));
  };

What was the expected behaviour?

No response

Was it tested on latest react-native-navigation?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

React Native Navigation version:
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version:
Device model:
iOS version:

@d4vidi d4vidi changed the title Bug(iOS): Push and immediate pop promise rejected (RN77-NA) Bug(iOS): Push and immediate pop promise rejected May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant