Androz2091 / insta.js

💬 Object-oriented library for sending and receiving messages via Instagram
138 stars 42 forks source link

IgResponseError while trying to login the client #54

Open dcts opened 3 years ago

dcts commented 3 years ago

When trying to log in the client with the basic example I get a IgResponseError thrown by line 370 in Client.js. This is most likely connected to this issues in the instagram-private-api.

(node:17054) UnhandledPromiseRejectionWarning: IgResponseError: GET /api/v1/direct_v2/inbox/?visual_message_return_type=unseen&thread_message_limit=10&persistentBadging=true&limit=20 - 560 -; 
    at Request.handleResponseError (/home/dcts/code/insta.js/node_modules/instagram-private-api/dist/core/request.js:125:16)
    at Request.send (/home/dcts/code/insta.js/node_modules/instagram-private-api/dist/core/request.js:53:28)
    at async DirectInboxFeed.request (/home/dcts/code/insta.js/node_modules/instagram-private-api/dist/feeds/direct-inbox.feed.js:21:26)
    at async Client.login (/home/dcts/code/insta.js/src/structures/Client.js:385:23)
(node:17054) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17054) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Yesterday there was another error caused by ig.realtime.connect(), but this one occures even before that. So basically there are 2 errors currently:

As I see it, these errors are caused by the original repos dilame/instagram-private-api and Nerixyz/instagram_mqtt and can only be fixed by debugging the errors inside these repositories.