jhen0409 / react-native-debugger

The standalone app based on official debugger of React Native, and includes React Inspector / Redux DevTools
MIT License
10.38k stars 810 forks source link

The application crashes when I enable debug #672

Open valery-lavrik opened 2 years ago

valery-lavrik commented 2 years ago

Description With Debug disabled everything works fine. But as soon as I enable Debug, the application immediately collapses without any errors...

I have completely cleaned all the caches

rd %localappdata%\Temp\metro-cache /s /q del %localappdata%\Temp\haste-map* gradlew clean rd node_modules /q /s npm cache clean --force npm start -- --reset-cache

But nothing helps

Version 0.66.4

Output of npx react-native info $ react-native info info Fetching system and libraries information... (node:18324) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) System: OS: Windows 10 10.0.19044 CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz Memory: 1.17 GB / 7.49 GB Binaries: Node: 14.17.5 - C:\Program Files\nodejs\node.EXE Yarn: 1.7.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 23, 26, 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 30.0.2 System Images: android-19 | Google APIs ARM EABI v7a, android-24 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763 Visual Studio: Not Found Languages: Java: 1.8.0_211 - /c/Program Files/Java/jdk1.8.0_211/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.66.4 => 0.66.4 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce 1 launch the application 2 ctrl+m 3 select Debug 4 The application breaks and collapses without errors

GIF: https://gyazo.com/3ef2d1377993b55ecd6a27549eb21267

valery-lavrik commented 2 years ago

I've been looking for a reason for 2 weeks now...

sabun123 commented 2 years ago

This likely has to do with react-native-reanimated v2 since you're using React Native 0.66. The newer versions of react-native-reanimated do not work with react native debugger.

You can read about it here: https://github.com/software-mansion/react-native-reanimated/issues/1220

Your alternative tool to replace this at the moment is Facebook's Flipper for debugging: https://fbflipper.com/

We experienced the same challenge when we upgraded from React Native 0.65 to 0.67.2 (where react-native-reanimated v2 is required).

Srh07 commented 2 years ago

I have the same problem. I just updated to 66.4 and reanimated 2. I hope there will be a solution soon!

Edit: I found out that the debugger still works with reanimated 2.2.4. The crash occurs with version 2.4.1. This also solves another problem with react-navigation/drawer where the drawerPosition: "right" was buggy. Downgrading is not ideal, but at least it's still reanimated v2.

Nantris commented 2 years ago

Probable duplicate of #580. I'm confident the reason for #580 is not reanimated 2.x, because we're not using it.