React-native: undefined is not a constructor (evaluating 'new window.WebSocket('ws://' + hostname+':'+port+'/devtools')')

Created on 15 Mar 2017  路  4Comments  路  Source: facebook/react-native

Hey,

I'm using RN 0.39.0 and it was working fine, but yesterday I started getting this error: "undefined is not a constructor (evaluating 'new window.WebSocket('ws://' + hostname+':'+port+'/devtools')')" , it points to the setupDevtools.js:25 file.

Im using a real android device and if I turn on Debug JS Remotely option the issue disappears.

Locked

Most helpful comment

Closing this issue.

All 4 comments

Try..catch around and see if you get more info in caught error.
I had similar problem - new URL(url) was throwing error like yours only with Debug JS Remotely turned off. Well, URL() doesn't exist if remote debugging is off.

Hey, thanks for reporting this issue!

It looks like your description is missing some necessary information. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!

Closing this issue.

I meet the same issue at react-native 0.49.5 in dev mode on iOS simulator

Was this page helpful?
0 / 5 - 0 ratings