eclipse / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.15k stars 467 forks source link

Error: AMQJS0007E Socket error: Unknown socket error. #105

Open santong opened 7 years ago

santong commented 7 years ago

I'm using the client on react-native. But It disconnected immediately and get this error when I try to connect the third-party server. I wonder know why but there is no further information.

Is there anybody could tell why or how to solve this? Thank you!

jpwsutton commented 7 years ago

The Paho Javascript client requires the browser Websocket implementation as it is designed for a browser primarily. Check out our test harness to see how we get it to work in node.js: https://github.com/eclipse/paho.mqtt.javascript/blob/master/src/test/client-harness.js

jonathangaldino commented 7 years ago

I'm having the same issue. Just using the index.html at utility folder. How can I proceed?

carljoachim commented 6 years ago

Same issue here, while using https://github.com/rh389/react-native-paho-mqtt . Did anyone find a fix for this? Or managed to get an MQTT server up and running with React Native?

ArbazYousuf commented 6 years ago

@cjrorvik same issue here did you find any solution? i am using same package.

pradhul commented 5 years ago

I am also having this same issue in mobile client. Getting this error at random times with rabbitmq disconnection.

"react-native": "0.55.4", "react-native-paho-mqtt": "^0.1.1",

simaattar commented 5 years ago

For me, after turning off my VPN, problem solved. The root cause of this error is that you are not connected to the server.

spit4520 commented 3 years ago

When in development I can connect to my HMQ broker with no issues at all over a WS using the uri: ws://${var}.rest.of.addr/ws but when I am in production mode with a full bundle the broker suddenly fails and will not resolve the uri at all. It won't even attempt to connect to the broker. Any ideas?

benjaminle9x commented 3 years ago

For me, after turning off my VPN, problem solved. The root cause of this error is that you are not connected to the server.

For me, I retained a message on a topic and when my mobile app subscribe to it, my app still receives that message at first then gets this error message after a while. So is VPN not the root of this problem?

jatin-bhuva commented 5 months ago

For me, after turning off my VPN, problem solved. The root cause of this error is that you are not connected to the server.

For me, I retained a message on a topic and when my mobile app subscribe to it, my app still receives that message at first then gets this error message after a while. So is VPN not the root of this problem?

Same issue for me, any solution?