paho.mqtt.javascript icon indicating copy to clipboard operation
paho.mqtt.javascript copied to clipboard

Error: AMQJS0007E Socket error: Unknown socket error.

Open santong opened this issue 7 years ago • 9 comments

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!

santong avatar May 11 '17 09:05 santong

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

jpwsutton avatar May 12 '17 09:05 jpwsutton

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

jonathangaldino avatar Sep 13 '17 11:09 jonathangaldino

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?

carljoachim avatar Jun 22 '18 11:06 carljoachim

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

ArbazYousuf avatar Aug 01 '18 16:08 ArbazYousuf

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",

pradhul avatar Feb 26 '19 09:02 pradhul

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

simaattar avatar Jun 11 '19 05:06 simaattar

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?

spit4520 avatar Nov 23 '20 21:11 spit4520

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?

benjaminle9x avatar Jun 30 '21 02:06 benjaminle9x

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?

jatin-bhuva avatar Apr 22 '24 11:04 jatin-bhuva