-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{name: "SocketProtocolError", message: "Socket hung up", code: 1006} #48
Comments
Thanks for the report. Could you please check what version of \cc @jondubois |
@zalmoxisus @mingkang1993 the dependency |
i've got a same error:
my |
@Markortiz Do you also get "...stringify is not a function" on the server side? Some corporate networks can block plain WebSocket traffic; the solution is to serve it over HTTPS. Another thing that you can try is check that you're using the latest versions of https://www.npmjs.com/package/socketcluster and https://www.npmjs.com/package/socketcluster-server Annother thing to check are your settings to make sure that it's connecting to the correct server URL. |
@jondubois I'm just trying to run my react-native on local, here attached error screenshot: Its still appear after updating |
@Markortiz Did you run |
@jondubois I fix it by deleting Thanks for the help! :) |
@Markortiz did you open Remote DevTools? In case you're running a local server (which is recommended), don't forget to specify the host and port for the extension by clicking the Settings button there. |
@zalmoxisus yes, I'm using and I cant see any activities on Redux Devtools |
Did you specified host and port on both the extension and import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'remote-redux-devtools';
const composeEnhancers = composeWithDevTools({ realtime: true, port: 8000 });
const store = createStore(reducer, /* preloadedState, */ composeEnhancers(
applyMiddleware(...middleware),
// other store enhancers if any
)); Just in case also run |
@zalmoxisus thanks for your help! |
I also ran into this when attempting to connect on an iOS device, and it was caused by a mismatch between the dev server's configuration and the store enhancer. I had: devTools({hostname: '10.0.0.4', port: 8000}) and $ remotedev-debugger --hostname=localhost --port=8000 --injectserver=reactnative Once I made the hostname of the shell command match, all worked :) |
I am experiencing the same WS error ( WebSocket connection to 'ws://localhost:8181/socketcluster/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED The relevant lines in my store look like this: import {composeWithDevTools} from 'remote-redux-devtools';
/* ... */
// DevTools setup
const composeEnhancers = composeWithDevTools({realtime: true, port: 8181});
const store = createStore(
rootReducer,
initState,
composeEnhancers(applyMiddleware(thunk))
); Per the above posts, I am using None of this works even if I set the tools to use local hosting on any port or even when I attempt to match hostnames between the web server and the devtools. |
@darth-cheney, make sure your server is available on |
I am using I'm wondering now if this is at all even possible, since my webserver is Django and I cannot simply import a remotedev-server to start myself |
@darth-cheney, if you don't use npm i -g remotedev-server && remotedev --port=8181 or if you don't want to install it globally: npm i --save-dev remotedev-server && ./node_modules/bin/remotedev --port=8181 It's not trivial to integrate it in an atom package, see zalmoxisus/atom-redux-devtools#1. |
Ok I'll try to keep this as the last post, since it's veered off topic. Initially, I tried the default ( import {composeWithDevTools} from 'remote-redux-devtools';
/* ... */
const store = createStore(
rootReducer,
initState,
composeWithDevTools(applyMiddleware(thunk))
); Additionally, I had However, nothing worked in either |
Make sure to set plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development')
})
] You can just set You might also want to try our examples. If you're using it for React Native, there's React Native Debugger, which already includes both the server and Feel free to provide more info, I'd happy to help. |
Yup, I'm an idiot. Needed to set Thanks @zalmoxisus, this is working now. Much appreciated. |
@darth-cheney no probs. I added the info to the README. |
@zalmoxisus Man I've been at this for hours and cannot get this package to work with react-native run-android. As soon as I added I get the error described above while building my app or even using the remotedev packages' The error comes from socketcluster-server\scserver.js. |
@SSTPIERRE2 Which version of Node.js are you using?
|
@jondubois Thanks for the quick reply! I'm running Node 9.2, Windows 8.1, have Visual C++ 2015, just installed GCC, socketcluster-client ^9.0.0, and uws to no avail. I can't even use the remotedev command by itself, I just get get the C++ compile error. |
@SSTPIERRE2 It's likely related to the I'm on Linux so it's hard for me to test. |
Hmm I still see the same uwebsockets compile error =/ |
Hey guys.. I guess i'm a little late here, but just in case people have the same problem in the future. |
did not fix the issue. |
The text was updated successfully, but these errors were encountered: