IjzerenHein / IjzerenHein/react-navigation-shared-element

BUG CRASH: Maximum call stack size exceeded (native stack depth)

Open
#278 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

Hi, I have nested navigator like this:
```
const PollStack = () => {
return



}
```

here is main navigator:
```
{
SplashScreen.hide()
RootNavigation.isReadyRef.current = true
}}>


<>

<>

```

here is navigation call method:
```
RootNavigation.push('MyNoteStack', {
screen: 'MyNoteScreen'
})

=> navigationRef.current.dispatch(StackActions.push(name, params)) //RootNavigation
```

then I got crash:
```
ERROR RangeError: Maximum call stack size exceeded (native stack depth)

This error is located at:
in SharedElementSceneView (at SceneView.tsx:132)
in StaticContainer
in EnsureSingleNavigator (at SceneView.tsx:124)
in SceneView (at useDescriptors.tsx:217)
in RCTView (at View.js:32)
in View (at DebugContainer.native.tsx:27)
in DebugContainer (at NativeStackView.native.tsx:76)
in MaybeNestedStack (at NativeStackView.native.tsx:247)
in RNSScreen (at createAnimatedComponent.js:211)
in AnimatedComponent (at createAnimatedComponent.js:264)
in AnimatedComponentWrapper (at src/index.native.tsx:281)
in MaybeFreeze (at src/index.native.tsx:280)

...
```

Please help

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the nested navigator crash from the issue's PollStack, NavigationContainer, and RootNavigation.push examples. Trace the stack through SharedElementSceneView, SceneView.tsx, useDescriptors.tsx, and NativeStackView.native.tsx, then identify the cause of the native stack overflow and verify that the same navigation call no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.