Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ClientDisconnectedError: MQTToTClient got disconnected" and "IgCookieNotFoundError: Cookie "sessionid" not found" errors after logout #58

Closed
kashirin-dm opened this issue Mar 27, 2021 · 5 comments

Comments

@kashirin-dm
Copy link

Hello.
I always get these errors after client.logout():

ClientDisconnectedError: MQTToTClient got disconnected. at SafeSubscriber._next (C:\PROJ\IG\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:154:30) at SafeSubscriber.__tryOrUnsub (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:205:16) at SafeSubscriber.next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:143:22) at Subscriber._next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:89:26) at Subscriber.next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:66:18) at Subject.next (C:\PROJ\IG\node_modules\rxjs\internal\Subject.js:60:25) at MQTToTClient.setDisconnected (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:330:30) at Object.disconnect (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:98:26) at TLSSocket.<anonymous> (C:\PROJ\IG\node_modules\mqtts\dist\transport\tls.transport.js:36:52) at TLSSocket.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

IgCookieNotFoundError: Cookie "sessionid" not found at State.extractCookieValue (C:\PROJ\IG\node_modules\instagram-private-api\dist\core\state.js:142:19) at RealtimeClient.constructConnection (C:\PROJ\IG\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:42:53) at MQTToTClient.payloadProvider [as connectPayloadProvider] (C:\PROJ\IG\node_modules\instagram_mqtt\dist\realtime\realtime.client.js: 92:22) at MQTToTClient.connect (C:\PROJ\IG\node_modules\instagram_mqtt\dist\mqttot\mqttot.client.js:38:42) at MQTToTClient.setDisconnected (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:339:18) at Object.disconnect (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:98:26) at TLSSocket.<anonymous> (C:\PROJ\IG\node_modules\mqtts\dist\transport\tls.transport.js:36:52) at TLSSocket.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

And if I try to log in again WITHOUT RESTARTING the server, I will get this error:

ConnectionFailedError: CONNACK returnCode: 2 errorName: Identifier rejected at Object.next (C:\PROJ\IG\node_modules\instagram_mqtt\dist\mqttot\mqttot.client.js:72:23) at MQTToTClient.continueFlows (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:212:104) at MQTToTClient.handlePacket (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:291:19) at C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:247:43 at Array.forEach (<anonymous>) at MQTToTClient.parseData (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:247:25) at processTicksAndRejections (internal/process/task_queues.js:93:5)

If I try to log in repeatedly, I will get this error every ~10 seconds:

ClientDisconnectedError: MQTToTClient got disconnected. at SafeSubscriber._next (C:\PROJ\IG\node_modules\instagram_mqtt\dist\realtime\realtime.client.js:154:30) at SafeSubscriber.__tryOrUnsub (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:205:16) at SafeSubscriber.next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:143:22) at Subscriber._next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:89:26) at Subscriber.next (C:\PROJ\IG\node_modules\rxjs\internal\Subscriber.js:66:18) at Subject.next (C:\PROJ\IG\node_modules\rxjs\internal\Subject.js:60:25) at MQTToTClient.setDisconnected (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:330:30) at Object.disconnect (C:\PROJ\IG\node_modules\mqtts\dist\mqtt.client.js:98:26) at TLSSocket.<anonymous> (C:\PROJ\IG\node_modules\mqtts\dist\transport\tls.transport.js:36:52) at TLSSocket.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)

How can I restart a session without my server termination?

@nerkoux
Copy link

nerkoux commented Mar 28, 2021

please try adding ; this in the eding
--> client.logout();

@nerkoux
Copy link

nerkoux commented Mar 28, 2021

MQTTclientgotdiscconected error shows that you've logged in your client account somewhere else so this client got disconnect..
Hope this helps.

@kashirin-dm
Copy link
Author

please try adding ; this in the eding
--> client.logout();

#57 - pull request solves this problem. I made changes in node_modules like in this pull request and the problem is gone.

@nerkoux
Copy link

nerkoux commented Mar 30, 2021

please try adding ; this in the eding
--> client.logout();

#57 - pull request solves this problem. I made changes in node_modules like in this pull request and the problem is gone.

Yeah 😃❤️

@Androz2091
Copy link
Owner

awesome. thank you for your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants