I am trying to to debug the react native app, If I don\'t try to debug JS remotely then everything is fine, but when I try to debug JS remotely I do get this error.
try to change your URL of Chrome from http://localhost:8081/debugger-ui/ to http://192.168.XXXX.XXXX.xip.io:8081/debugger-ui/
source: https://github.com/facebook/react-native/issues/17618
I had this error too. The reason for me was the opened debugger tab in chrome from previous session. So when I closed it everything works fine now :)
I installed chrome CORS extension and enabled the CORS then it worked, Even If I open chrome with disable security manually then also it didn't worked for me until I install the extension.
Close emulator.
Close node console which get opened after executing command react-native run-android.
Start emulator again.
Run project again.
Hope this help.
i just cleared my browser cache and my app cache and its working now this error appears when you have
I had same error, I just closed the browser and refreshed my simulator. It may open the browser window again with debugging window. But it takes care of the error. If not I suggest terminating your simulator and running the build commands again.