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

WebSocket connection to 'ws://localhost:8081/debugger-proxy?role=debugger&name=Chrome' failed: Invalid frame header

Open cgreening opened this issue 10 years ago • 46 comments

Seem to have started getting this random error when debugging with chrome, it will debug for a while and then die with the error:

WebSocket connection to 'ws://localhost:8081/debugger-proxy?role=debugger&name=Chrome' failed: Invalid frame header

screenshot 2016-03-24 15 10 20

We're using version 0.22 on the Mac with iOS

cgreening avatar Mar 24 '16 15:03 cgreening

Also having this issue

gwhite-dayspring avatar Mar 24 '16 21:03 gwhite-dayspring

+1 I restart my computer, and its gone.

tal952 avatar Mar 29 '16 16:03 tal952

Same. Version 0.22 on Mac with iOS.

robclouth avatar Apr 07 '16 09:04 robclouth

so has this been fixed? I'm running http server in node, listening on port 3001 and after react-native recieves any error (like parse Error for example) I need to restart it and react-android app no longer connects to that node server. I end up with just that message in debugger: "WebSocket connection to 'ws://localhost:8081/debugger-proxy?role=debugger&name=Chrome' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED" I set up adb connection over wifi, 'adb devices' shows my phone and app starts normally - but doesnt connect over 3001

EDIT: react-native-cli: 0.2.0 react-native 0.24.1

HeWasntOffByMuch avatar Apr 29 '16 13:04 HeWasntOffByMuch

Also having same issue

rupeshdeotale97 avatar May 06 '16 11:05 rupeshdeotale97

try running 'adb reverse tcp:8081 tcp:8081' in terminal to access the development server from the device

alexandrunicolae avatar May 17 '16 21:05 alexandrunicolae

Same issue here on 0.24 version for iOS

bitfused avatar Jun 23 '16 00:06 bitfused

same issue, react native 0.26.3

ws2356 avatar Jul 03 '16 05:07 ws2356

I have the same issue when using Chrome, but it won't happen if I use https://github.com/jhen0409/react-native-debugger.

ultragtx avatar Jul 03 '16 05:07 ultragtx

Experiencing the same issue with react-native: 0.28.0

EDIT: found a fix - https://medium.com/@davidguandev/lets-build-a-react-native-application-4190839a4f5c#.2jswlrano

millerm avatar Jul 10 '16 00:07 millerm

@millerm are you referring to the ATS configuration in xcode ?

If so, it doesn't solve it for me. OSX / React native 0.28

Edit: --> I found a quick workarround that works for now by opening chrome in incognito mode

Exilz avatar Jul 10 '16 17:07 Exilz

Perhaps it's antivirus? https://github.com/facebook/react-native/issues/7413

hendrikswan avatar Jul 12 '16 10:07 hendrikswan

Have the same issue

RN 0.28 MAC OS

KGALLET avatar Jul 13 '16 13:07 KGALLET

A colleague of mine had the same issue on node version 6.x. He downgraded to the same version I'm running, v5.9.1, and it resolved his issue.

hendrikswan avatar Jul 13 '16 14:07 hendrikswan

Yup, I can confirm that Node 6.3 was the problem for me.

I downgraded as @hendrikswan suggested, but to version 6.2 and everything has been running without problems for a few hours.

Exilz avatar Jul 14 '16 17:07 Exilz

Downgrading of Node from 6.3.0 to 6.2.2 didn't work for me; Issue still persists.

phil-travelbytes avatar Jul 15 '16 06:07 phil-travelbytes

Maybe downgrade further?

On Fri, 15 Jul 2016 at 08:47 Phillip Kingston [email protected] wrote:

Downgrading of Node from 6.3.0 to 6.2.2 didn't work for me; Issue still persists.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/6627#issuecomment-232875006, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQsNZ1PwiqFnsXzGdPXWjsgYg-pg-w9ks5qVyz-gaJpZM4H4D2Z .

hendrikswan avatar Jul 15 '16 06:07 hendrikswan

I think this might be "fixed" in RN 0.30 which uses ws 1.1.1, which doesn't try to install native helper modules by default and should work more consistently across V8 versions.

ide avatar Jul 15 '16 07:07 ide

Can someone confirm if RN 0.30 fixes this?

julienvincent avatar Jul 24 '16 10:07 julienvincent

Have the same thing

ts-ign0re avatar Jul 26 '16 08:07 ts-ign0re