After successfully logging in and logging out, I was getting the following error. This PR solves the problem.
ClientDisconnectedError: MQTToTClient got disconnected.
at SafeSubscriber._next (/Users/mseven/Desktop/insta.js/node_modules/instagram_mqtt/dist/realtime/realtime.client.js:154:30)
at SafeSubscriber.__tryOrUnsub (/Users/mseven/Desktop/insta.js/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.next (/Users/mseven/Desktop/insta.js/node_modules/rxjs/internal/Subscriber.js:143:22)
at Subscriber._next (/Users/mseven/Desktop/insta.js/node_modules/rxjs/internal/Subscriber.js:89:26)
at Subscriber.next (/Users/mseven/Desktop/insta.js/node_modules/rxjs/internal/Subscriber.js:66:18)
at Subject.next (/Users/mseven/Desktop/insta.js/node_modules/rxjs/internal/Subject.js:60:25)
at MQTToTClient.setDisconnected (/Users/mseven/Desktop/insta.js/node_modules/mqtts/dist/mqtt.client.js:330:30)
at Object.disconnect (/Users/mseven/Desktop/insta.js/node_modules/mqtts/dist/mqtt.client.js:98:26)
at TLSSocket.<anonymous> (/Users/mseven/Desktop/insta.js/node_modules/mqtts/dist/transport/tls.transport.js:36:52)
at TLSSocket.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1223:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
IgCookieNotFoundError: Cookie "sessionid" not found
at State.extractCookieValue (/Users/mseven/Desktop/insta.js/node_modules/instagram-private-api/dist/core/state.js:142:19)
at RealtimeClient.constructConnection (/Users/mseven/Desktop/insta.js/node_modules/instagram_mqtt/dist/realtime/realtime.client.js:42:53)
at MQTToTClient.payloadProvider [as connectPayloadProvider] (/Users/mseven/Desktop/insta.js/node_modules/instagram_mqtt/dist/realtime/realtime.client.js:92:22)
at MQTToTClient.connect (/Users/mseven/Desktop/insta.js/node_modules/instagram_mqtt/dist/mqttot/mqttot.client.js:38:42)
at MQTToTClient.setDisconnected (/Users/mseven/Desktop/insta.js/node_modules/mqtts/dist/mqtt.client.js:339:18)
at Object.disconnect (/Users/mseven/Desktop/insta.js/node_modules/mqtts/dist/mqtt.client.js:98:26)
at TLSSocket.<anonymous> (/Users/mseven/Desktop/insta.js/node_modules/mqtts/dist/transport/tls.transport.js:36:52)
at TLSSocket.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1223:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Hi,
After successfully logging in and logging out, I was getting the following error. This PR solves the problem.