ProxymanApp / ProxymanApp/Proxyman

Debugging React Native on Android breaks when using Proxyman

Open
#1,407 37 comments 0 reactions 1 assignee View on GitHub

@NghiaTranUIT is already working on this.

Since Oct 21, 2022.

✅ Done bug
Dominant language
No language data
Stars
7k
Forks
237
PR merge metrics
No merged PRs in 30d

Description

Description

When using Proxyman as a proxy for an Android device's traffic while running a React Native application in development mode, if React Native debugging is disabled, the app does not work. React will stop with the fatal error Failed to connect to debugger! Timeout while connecting to remote debugger.

When this occurs you can see the websocket traffic in Proxyman: localhost_10-20-2022-15-28-04.proxymanlog.zip

It appears that Proxyman is intercepting the websocket requests which I believe React Native uses for debugging. Something isn't quite working correctly though.

Screen Shot 2022-10-20 at 3 31 58 PM

Steps to Reproduce

  1. Setup Proxyman as a proxy for an Android emulated or physical device
  2. Launch a React Native app in development mode npx react-native start
  3. Ensure the Android device has 8081 forwarded to the local dev machine adb reverse tcp:8081 tcp:8081
  4. Run the app on the Android emulated/physical device
  5. Open the React Native dev menu adb shell input keyevent 82
  6. Enable debugging

Current Behavior

Application restarts in debugging mode, but immediately fails with:
Failed to connect to debugger! Timeout while connecting to remote debugger.

Expected Behavior

Application restarts in debugging mode and works without any errors.

Environment

  • App version: Proxyman 3.11.0 (31100)
  • macOS version: macOS Monterey 12.6 (21G115)
  • Android version: 12 (via Android emulator), 13 (via Pixel 4a)
  • React Native version: 0.63.4

Additional notes

This does not affect iOS when using either the iOS simulator or a physical iOS device. In this case I've noticed that websocket traffic does not show up at all in Proxyman; perhaps this is why iOS doesn't have the same issue?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.