React-native: Regression: Remote JS debugger blocked by CORS

Created on 30 Mar 2019  路  4Comments  路  Source: facebook/react-native

馃挜 Regression Report

Remote JS debugging on iOS (only) is blocked by CORS issue.
It works when running project on simulator. I tried running on multiple iOS devices they all failed.

Screen Shot 2019-03-30 at 4 12 59 PM

Last working version

Worked up to version: 0.58.6

Stopped working in version: ^0.59.1

To Reproduce

  • Init a new project with react-native cli
  • Run iOS project on a device
  • Open remote JS debugging from developer menu
  • Open browser console to see the error message

Expected Behavior

Remote JS logs should appear in the browser console.

Code Example

This happens on a cli template project.

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
      Memory: 706.42 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.12.0 - /usr/local/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 25, 26, 27, 28
        Build Tools: 26.0.3, 27.0.3, 28.0.3
        System Images: android-26 | Google APIs Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.2 => 0.59.2 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Thanks for your attention in this matter!

Bug Regression Locked

Most helpful comment

This is a real regression, reported by a few people in OSS and also some of my internal teams. There is great reproduction steps and detail in this issue already, but my colleague @nhewu can add his own experience and detail with 0.59.8. Cc @dratwas @grabbou

All 4 comments

This is not related to React Native. It is a policy and related to browser. To pass this warning try;

  • React Native Debugger

https://github.com/jhen0409/react-native-debugger

Thanks for the suggestion! That works well as a replacement. It does seem like something changed in v0.59 since I no longer get CORS issues when I downgrade. Feel free to close this if you feel it is not relevant here. It does look like a regression to me though. Cheers

This is a real regression, reported by a few people in OSS and also some of my internal teams. There is great reproduction steps and detail in this issue already, but my colleague @nhewu can add his own experience and detail with 0.59.8. Cc @dratwas @grabbou

This is fixed with @react-native-community/cli v1.9.10. Thanks!

Was this page helpful?
0 / 5 - 0 ratings