react-native
react-native copied to clipboard
react-native version 0.75.3 Hermes logs not working properly: Not expanding the object
Description
In React Native version 0.75.3, Hermes engine logs are not working as expected. Specifically, when logging objects, the objects are not expanding fully, making it difficult to debug and inspect object properties.
Steps to reproduce
Steps to Reproduce:
-
Update the react-native version from 0.74.2 to 0.75.3.
-
Enable Hermes in iOS and Android both
-
Create a component that logs an object in the console, for example:
const obj = { name: 'John', age: 30, details: { city: 'New York' } }; console.log(obj); -
Run the app on an Android device or emulator (
npx react-native run-android). -
Open the debug console to view the Hermes logs.
Expected behavior:
- The logged object should expand, allowing inspection of its nested properties.
Actual behavior:
- The object is not expanding in the console, only showing a collapsed version, preventing inspection of deeper object properties.
React Native Version
0.75.3
Output of npx react-native info
System:
OS: macOS 15.0
CPU: (8) arm64 Apple M1
Memory: 126.66 MB / 8.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.3.0
path: ~/.nvm/versions/node/v22.3.0/bin/node
Yarn:
version: 3.6.4
path: /opt/homebrew/bin/yarn
npm:
version: 10.8.3
path: ~/.nvm/versions/node/v22.3.0/bin/npm
Watchman:
version: 2024.04.29.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.0
path: /opt/homebrew/lib/ruby/gems/3.3.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.0
- iOS 18.0
- macOS 15.0
- tvOS 18.0
- visionOS 2.0
- watchOS 11.0
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2412.12266719
Xcode:
version: 16.0/16A242d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.12
path: /usr/bin/javac
Ruby:
version: 3.3.3
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.75.3
wanted: 0.75.3
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Screenshots and Videos
https://github.com/user-attachments/assets/ff412bed-0cb8-4b70-ab1a-762ea5f07dd5
| :warning: | Missing Reproducible Example |
|---|---|
| :information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
| :warning: | Missing Reproducible Example |
|---|---|
| :information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
Hey @aurangs7! We previously included a Hermes fix in 0.74.1 that I believe is related to this issue. I'd recommend checking that Hermes is updated correctly via CocoaPods/Gradle.
Note that object inspection will be thoroughly fixed from React Native 0.76 in our new React Native DevTools stack.
facing the same issue with react native 0.75.3
Hi @huntie Thank you for the response. This issue is real, I tried it on 3 projects, running on react-native 0.75.3 and having debugging issues. Facing below issues:
- Chrome DevTools window does not show logs after some time
- After some time the objects are not expanding / The debugger not showing logs
I have to close and open the DevTools window again to get the logs and after some time it also does not respond.
If possible, try opening the DevTools window for some time and then try expanding the logs.
I am also getting this, not sure if it is related to redux states logs or for every log.
Same here! (I am alternatively using reactotron to see the logs now)
Hi @huntie, Hope you are doing well. Do we have any updates here? Anything required from my end to solve this?
Hi @huntie Thank you for the response. This issue is real, I tried it on 3 projects, running on react-native 0.75.3 and having debugging issues. Facing below issues:
- Chrome DevTools window does not show logs after some time
- After some time the objects are not expanding / The debugger not showing logs
I have to close and open the DevTools window again to get the logs and after some time it also does not respond.
If possible, try opening the DevTools window for some time and then try expanding the logs.
hey @aurangs7 have you found any solutions to this?
Hi @huntie Thank you for the response. This issue is real, I tried it on 3 projects, running on react-native 0.75.3 and having debugging issues. Facing below issues:
- Chrome DevTools window does not show logs after some time
- After some time the objects are not expanding / The debugger not showing logs
I have to close and open the DevTools window again to get the logs and after some time it also does not respond. If possible, try opening the DevTools window for some time and then try expanding the logs.
hey @aurangs7 have you found any solutions to this?
For now, I am using Reactotron as mentioned by @yungblud
I think I am facing a similar problem. When I print the Date object to the console with console.log, I see an empty object. but if I call Date.toLocaleString() function, I can see the date as a string. I am using latest version of react native(0.77.1)
When I print the Date object to the console with console.log, I see an empty object. but if I call Date.toLocaleString() function, I can see the date as a string.
@cetfu Did you find any solution for this? I am getting the same issue on react native 0.79.2 with new react native debugger.
i didn't tried again. i forgot