Skip to content
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

Cannot read property 'name' of undefined in "MaterialTopTabView" #11891

Closed
2 of 11 tasks
sagar-tomar-groww opened this issue Mar 13, 2024 · 5 comments
Closed
2 of 11 tasks

Comments

@sagar-tomar-groww
Copy link

Current behavior

We are getting intermittent crash on Bugsnag citing the above errorMessage. When I am trying to reproduce the error, I am not able to right now but it's quite a significant chunk of the total crashes being reported for a specific version. Seems like intermittent issue though, the only catch i noticed about the screens where it's happening is that we are trying to navigate to that screen with "PUSH" as navigation type

STACKTRACE

TypeError Cannot read property 'name' of undefined
node_modules/@react-navigation/material-top-tabs/src/views/MaterialTopTabView.tsx:52:31 onIndexChange
node_modules/react-native-tab-view/src/TabView.tsx:66:6 onIndexChange
node_modules/react-native-tab-view/src/PagerViewAdapter.tsx:165:10 onPageSelected
node_modules/react-native-pager-view/src/PagerView.tsx:87:17 anonymous
(native) apply
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:22:9 invokeGuardedCallbackImpl
(native) apply
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:40:28 invokeGuardedCallback
(native) apply
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:53:24 invokeGuardedCallbackAndCatchFirstError
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:73:2 executeDispatch
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1125:8 executeDispatchesAndReleaseTopLevel
(native) call
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:361:58 forEachAccumulated
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1160:6 anonymous
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:8457:11 batchedUpdatesImpl
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1106:11 batchedUpdates
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1137:2 _receiveRootNodeIDEvent
node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1178:4 receiveEvent
(native) apply
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:428:26 value
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:11 anonymous
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:8 value
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:9 value

--------------------------------------------------------------------------------------------
Screenshot 2024-03-13 at 3 27 31 PM

Expected behavior

There should no crash as such.

Reproduction

Not able to repro

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-tab-view

Environment

  • [] I've removed the packages that I don't use
package version
@react-navigation/native 6.1.6
@react-navigation/bottom-tabs 6.0.5
@react-navigation/material-top-tabs 6.0.2
@react-navigation/native-stack 6.6.2
react-native-safe-area-context 4.5.3
react-native-screens 3.21.0
react-native-gesture-handler 2.9.0
react-native-reanimated 3.5.4
react-native-tab-view 3.5.2
react-native-pager-view 5.4.21
react-native 0.72.5
node 18.15.0
npm or yarn 1.22.18
Copy link

Hey @sagar-tomar-groww! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected.

Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information.

You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro.

Copy link

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • @react-navigation/native (found: 6.1.6, latest: 6.1.16)
  • @react-navigation/bottom-tabs (found: 6.0.5, latest: 6.5.19)
  • @react-navigation/material-top-tabs (found: 6.0.2, latest: 6.6.12)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

@sagar-tomar-groww
Copy link
Author

I have already tried 6.6.12 but since the issue is not properly reproducible but rather intermittent so can't really push 6.6.12 just like that in production.

Checked #10721 but as @satya164 correctly figured out that it'll suppress the root cause of the issue.
@satya164 can someone from the team help us in debugging this and remove this crash as it's impacting our stability numbers.

@sagar-tomar-groww
Copy link
Author

Any update here ?

Copy link

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

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