Skip to content

fix: Chrome debugger crash caused by incorrect viewTag #6437

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

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

MatiPl01
Copy link
Member

@MatiPl01 MatiPl01 commented Aug 21, 2024

Summary

The problem was reported in this issue and this discussion seems to report the same problem.

In short, the crash was caused by incorrect check in _getViewInfo in createAnimatedComponent which assigned the _component to the viewTag only for web but not for chrome debugger. I replaced IS_WEB check with shouldBeUseWeb, which also checks whether the current environment is a chrome debugger.

Test plan

  • I created a bare app with npx @react-native-community/cli init ReactNativeDebugger --version 0.75.1
  • Installed latest reanimated and downloaded react-native-debugger mentioned in this issue
  • Launched react-native-debugger and enabled remote debugging with js,
  • When I tried to animate component with animated style, I saw the reported crash

@MatiPl01 MatiPl01 self-assigned this Aug 21, 2024
@MatiPl01 MatiPl01 requested a review from piaskowyk August 21, 2024 14:37
Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHOULD_BE_OK_🫡

@MatiPl01 MatiPl01 enabled auto-merge August 21, 2024 15:01
@MatiPl01 MatiPl01 added this pull request to the merge queue Aug 21, 2024
Merged via the queue into main with commit ce3c1f9 Aug 21, 2024
8 checks passed
@MatiPl01 MatiPl01 deleted the @matipl01/fix-chrome-debugger-crash branch August 21, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debuggerWorker.js:69 TypeError: Cannot convert undefined or null to object
2 participants