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

debuggerWorker.js:69 TypeError: Cannot convert undefined or null to object #6432

Closed
TonyFTannous-Byd opened this issue Aug 20, 2024 · 9 comments · Fixed by #6437
Closed

debuggerWorker.js:69 TypeError: Cannot convert undefined or null to object #6432

TonyFTannous-Byd opened this issue Aug 20, 2024 · 9 comments · Fixed by #6437
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS

Comments

@TonyFTannous-Byd
Copy link

Description

352525954-22331002-5e09-405b-a1a4-d439aec6f2e6

Steps to reproduce

i use react native 0.75.1, when launching react native debugger, this error displayed and the app crashed

Snack or a link to a repository

https://github.com/software-mansion/react-native-reanimated

Reanimated version

^3.15.0

React Native version

0.75.1

Platforms

Android, iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Missing repro This issue need minimum repro scenario labels Aug 20, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@MatiPl01
Copy link
Member

Hey!

Could you pleas provide more information? Did you use the new (experimental) react native debugger, chrome debugger or some other debugging tool?

Can you provide a repro or share the repository?

@TonyFTannous-Byd
Copy link
Author

i user react native debugger https://github.com/jhen0409/react-native-debugger because it support debug request network.
i use react native 0.75.1, and i need to debug my request network. so i used react native debugger with enabled network inspect. because i use @react-navigation/drawer which it use react-native-reanimated 3.15.0. an error occured: Cannot convert undefined or null to object located in /node_modules/react-native-reanimated/src/js-reanimated/index.ts --> _updatePropsJS --> component.props

@MatiPl01
Copy link
Member

Thank you for response. I can reproduce the issue while I am debugging JS remotely with react-native-debugger. I am not sure it we will able to fix that, though, as this debugger doesn't support JSI, which reanimated uses.

From the react-native-debugger README:

⚠️ This app is currently only supported old Remote Debugger, if you're looking for new debugger support (e.g. Hermes / JSI / New Architecture) of React Native Debugger, please follow jhen0409/react-native-debugger#774.

I will look into this issue and check it we can do something.

@MatiPl01 MatiPl01 linked a pull request Aug 21, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Aug 21, 2024
## Summary

The problem was reported in
[this](#6432)
issue and
[this](#6359)
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](https://github.com/jhen0409/react-native-debugger?tab=readme-ov-file)
mentioned in
[this](#6432)
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
Copy link
Member

@TonyFTannous-Byd Could you check if changes I made in the #6437 PR fix your issue? You can make the same changes in node_modules/react-native-reanimated and see if you still see this error.

If you still have some problems, don't hesitate to re-open the issue and ask.

@abdulmoizshaikh
Copy link

abdulmoizshaikh commented Aug 22, 2024

Hi @MatiPl01,
I was facing the same problem as @TonyFTannous-Byd mentioned and opened this ticket

I tried the fix that you have created and merge in this PR 6437

This issue of debuggerWorker.js:69 TypeError: Cannot convert undefined or null to object is fixed now

But now when I connected with debugger my Tab navigation is not working
whereas drawer and stack navigation is working fine.

@MatiPl01
Copy link
Member

Hey @abdulmoizshaikh!

Would you be able to share your code or a small repro showing the issue? Not everything will work while you use remote JS debugging but I will check what we can do if you share some code.

@TonyFTannous-Byd
Copy link
Author

TonyFTannous-Byd commented Sep 21, 2024

hey @MatiPl01
is your fixing (PR 6437) is not merged in the main branch?
because i use the last version of react-native-reanimated ^3.15.3, and the issue still exists when using @react-navigation/drawer

Uploading Screenshot 2024-09-21 at 2.32.21 PM.png…

@MatiPl01
Copy link
Member

Hey @TonyFTannous-Byd!

Yes, it was merged. If you still encounter this problem, can you please open a new issue and describe it more in detail (I mean, include some repro or code snippet that causes this error)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants