React Native Debugger app version: 0.7.18
React Native version: 0.56-rc.4
Platform: iOS simulator
Is real device of platform: No, simulator
Operating System: macOS 10.13.5
It appears that React Native 0.56 has broken the network inspector. I'm actually not sure if this is an issue with react-native-debugger or Chrome, as it appears that has broken as well. I would be happy to work on a fix if someone could point me in the right direction. Thanks!
The main issue is #244, it should affect the Network Inspect.
+1, Any solution?
I got it to work temporally by adding this to my project:
// https://github.com/jhen0409/react-native-debugger/issues/242
if (__DEV__) {
/* eslint no-undef: 0 */
XMLHttpRequest = GLOBAL.originalXMLHttpRequest
? GLOBAL.originalXMLHttpRequest
: GLOBAL.XMLHttpRequest;
}
react-native 0.56 polyfills the global.Blob which breaks the fetch polyfill's strict check, we have to restore the original Blob when using the latest react-native-debugger with react-native > 0.54
if (__DEV__) {
global.XMLHttpRequest = global.originalXMLHttpRequest ?
global.originalXMLHttpRequest :
global.XMLHttpRequest;
global.FormData = global.originalFormData ?
global.originalFormData :
global.FormData;
global.Blob = global.originalBlob ?
global.originalBlob :
global.Blob;
global.FileReader = global.originalFileReader ?
global.originalFileReader :
global.FileReader;
}
Fixed by #247.
This bug appears to be back with [email protected] this comment fixes it
this is still broken, unfortunately React Native seems to become more and more buggy
I got it to work temporally by adding this to my project:
// https://github.com/jhen0409/react-native-debugger/issues/242 if (__DEV__) { /* eslint no-undef: 0 */ XMLHttpRequest = GLOBAL.originalXMLHttpRequest ? GLOBAL.originalXMLHttpRequest : GLOBAL.XMLHttpRequest; }
Where did you put this code?
@hanssonfredrik anywhere as long as it gets run. I put it in a development config file that is loaded in index.js
After adding the code I can see the request but no responses
Does anyone figures out how to fix it?
After adding the code I can see the request but no responses
+1
Most helpful comment
react-native 0.56 polyfills the
global.Blobwhich breaks the fetch polyfill's strict check, we have to restore the originalBlobwhen using the latest react-native-debugger with react-native > 0.54