Nerixyz / instagram_mqtt

Realtime and Push Notification (FBNS) support for the instagram-private-api
MIT License
244 stars 49 forks source link

Invalid state requested #58

Closed andresespinosapc closed 3 years ago

andresespinosapc commented 3 years ago

I sometimes get this error:

(node:60) Error: Invalid state requested (current: 3, requested: 3)
    at MQTToTClient.next (/usr/ig_chatbot/node_modules/instagram_mqtt/node_modules/mqtts/src/mqtt.base-client.ts:61:19)
    at MQTToTClient.setDisconnected (/usr/ig_chatbot/node_modules/instagram_mqtt/node_modules/mqtts/src/mqtt.base-client.ts:100:14)
    at MQTToTClient.setDisconnected (/usr/ig_chatbot/node_modules/instagram_mqtt/node_modules/mqtts/src/mqtt.client.ts:408:15)
    at /usr/ig_chatbot/node_modules/instagram_mqtt/node_modules/mqtts/src/mqtt.client.ts:210:28
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

I don't know how to reproduce it yet, but I'm trying to.

Have anyone got this error too?

Nerixyz commented 3 years ago

This error is basically saying, the client was disconnected and is set to disconnected again.

andresespinosapc commented 3 years ago

Perfect, that was the problem and I could solve it. Thanks!