react-native-debugger icon indicating copy to clipboard operation
react-native-debugger copied to clipboard

Appending files w/ URIs to FormData doesn't work if Network Inspect is enabled

Open kmarple1 opened this issue 3 years ago • 0 comments

React Native Debugger app version: 0.13.0 React Native version: ^0.66.4 Platform: iOS Is real device of platform: No Operating System: macOS

This is a duplicate of https://github.com/jhen0409/react-native-debugger/issues/38, which was closed without resolution. Five years later, it still appears to be a problem.

The main problem is not that the debugger doesn't support inspecting these requests, but that it actively breaks them. Any time you append a file that includes a URI to FormData, it sends [Object object] instead of the binary file if network inspect is enabled. The only solution seems to be disabling network inspect.

This raises a warning in the debugger, the network doc it links to is extremely cryptic. The only mention of URIs is:

  • React Native FormData supports the uri property. You can use files from CameraRoll, but originalFormData isn't supported.

It seems this has been a problem since 2017, so it seems like it should at least have an open issue.

kmarple1 avatar Oct 06 '22 13:10 kmarple1