robhogan / react-native-paho-mqtt

react-native-paho-mqtt
91 stars 32 forks source link

AMQJS0004E Ping timed out. #4

Closed hobbysistemas closed 7 years ago

hobbysistemas commented 7 years ago

After running app in android device or simulator, it send the first ping req and the ping resp does not arrives to the app. the app sends another ping req and the mosquitto sends the ping resp but it does not arrives and the alert AMQJS0004E Ping timed out is shown. Using mosquitto, with authentication, linux ubuntu 16, react native through websockets on port 8083

I tried to use the same mosquitto instance directly from browser, using hivemq mqtt web client and everything works, even from the linux command line...

It is clear on mosquitto log that it answers with PING RESP but this never rechas the react native app end point.

Any help?

Thanks

Imo

definitelycarter commented 7 years ago

Facing the same issue here.

AdamChrist commented 7 years ago

+1

robhogan commented 7 years ago

Thanks all - I'm looking into this now. See also discussion at https://github.com/eclipse/paho.mqtt.javascript/issues/106

robhogan commented 7 years ago

I believe this is fixed by https://github.com/rh389/react-native-paho-mqtt/commit/8185b64928c5d0f87111b1e99dfbc423163d270d, released as 0.1.0 (CC @MattyK14). Let me know how you get on!

MattyK14 commented 7 years ago

Seems to be working well on both iOS & Android!