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

groupCollapsed is not available in the console polyfill when debugging in JSC (iOS) #21446

Closed
Eyesonly88 opened this issue Oct 2, 2018 · 2 comments
Labels
Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Eyesonly88
Copy link
Contributor

Environment

React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
      Memory: 132.79 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
      Yarn: 1.6.0 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
      Android SDK:
        Build Tools: 26.0.3, 27.0.3, 28.0.2
        API Levels: 21, 22, 23, 24, 25, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.1 => 16.5.1 
      react-native: 0.57.1 => 0.57.1 

Description

The console polyfill doesn't have the groupCollapsed function when debugging using Safari.
This makes the console log very spammy as we can't collapse any console log calls.

Reproducible Demo

  • Run the hello world app for ios react-native run-ios
  • Use Safari to open the JSContext for the app
    image
  • Type console.groupCollapsed in the console and you will get undefined
    image

Notes

  • I did some digging to find the polyfill and looks like its this
    groupEnd: consoleGroupEndPolyfill,
  • Some might ask, why would you want to debug using Safari instead of Chrome?
    because not having to "Debug JS remotely" is crash free and much faster.
@stale
Copy link

stale bot commented Dec 31, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 31, 2018
@stale
Copy link

stale bot commented Jan 20, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jan 20, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Jan 21, 2019
facebook-github-bot pushed a commit that referenced this issue Jan 22, 2019
Summary:
`groupCollapsed` is used to group logs but collapsed which is very useful when the console has many logs (e.g. when using `redux-logger`).

For developers who prefer to debug iOS apps using Safari JSC, the `groupCollapsed` was not polyfilled.

Fixes #21446
Pull Request resolved: #21457

Differential Revision: D13761796

Pulled By: cpojer

fbshipit-source-id: e7c4f1ff4728c6a7f6ffd6cc629f7fbc1aa67e87
matt-oakes pushed a commit to matt-oakes/react-native that referenced this issue Feb 7, 2019
Summary:
`groupCollapsed` is used to group logs but collapsed which is very useful when the console has many logs (e.g. when using `redux-logger`).

For developers who prefer to debug iOS apps using Safari JSC, the `groupCollapsed` was not polyfilled.

Fixes facebook#21446
Pull Request resolved: facebook#21457

Differential Revision: D13761796

Pulled By: cpojer

fbshipit-source-id: e7c4f1ff4728c6a7f6ffd6cc629f7fbc1aa67e87
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants