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

Objects cannot be copied from console debugger or logged into console using JSON.stringify() #43258

Closed
krisidmisso opened this issue Mar 1, 2024 · 6 comments
Assignees
Labels
Newer Patch Available Resolution: Fixed A PR that fixes this issue has been merged.

Comments

@krisidmisso
Copy link

Description

Objects cannot be copied inside the console debugger (Chrome inspect/DevTools). Even console.log(JSON.stringify(object)) doesnt log the correct string. Both methods copy or log just the first character{ or [

Tried also upgrading RN but the issue is the same as it was for some other versions previously. May be related to facebook/hermes#761

Steps to reproduce

  1. New RN project
  2. Start metro with --experimental-debugger (react-native start --experimental-debugger)
  3. Run i or a (doesnt matter)
  4. After app is opened, press j in the metro terminal to open the debugger or go to chrome://inspect#devices like in the docs
  5. console.log an object. Ie: console.log({a:1, b:'string', c: 'test'})
  6. Try to copy the logged object from the debugger console. Paste it in any text editor or input and see the issue

React Native Version

0.73.1

Affected Platforms

Runtime - Android, Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.3
  CPU: (8) arm64 Apple M1 Pro
  Memory: 124.22 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.19.0
    path: ~/.nvm/versions/node/v18.19.0/bin/node
  Yarn:
    version: 1.22.21
    path: ~/.nvm/versions/node/v18.19.0/bin/yarn
  npm:
    version: 10.2.3
    path: ~/.nvm/versions/node/v18.19.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.13.0
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2021.2 AI-212.5712.43.2112.8609683
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 2.7.8
    path: /opt/homebrew/opt/ruby@2.7/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.1
    wanted: 0.73.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

info React Native v0.73.5 is now available (your project is running on v0.73.1).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.73.5
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.73.5
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".



### Stacktrace or Logs

```text
No error logs, just the described limitation above

Reproducer

https://github.com/krisidmisso/rn-debugger-issue

Screenshots and Videos

No response

Copy link

github-actions bot commented Mar 1, 2024

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.73.5. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@krisidmisso
Copy link
Author

upgrading to the latest stable version doesnt fix the issue, yet

@aurangs7
Copy link

aurangs7 commented Apr 3, 2024

I am using react-native version 0.73.6
This issue is still there.

@cortinico
Copy link
Contributor

related to #43838

@huntie
Copy link
Member

huntie commented Apr 22, 2024

@krisidmisso Thanks for raising this. We've confirmed this was a regression 0.73 and will be pursuing a fix.

@cortinico
Copy link
Contributor

This has been fixed in the latest patches for 0.73 and 0.74

@cortinico cortinico added the Resolution: Fixed A PR that fixes this issue has been merged. label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Newer Patch Available Resolution: Fixed A PR that fixes this issue has been merged.
Projects
None yet
Development

No branches or pull requests

4 participants