Nerixyz / instagram_mqtt

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

Server error on getting new direct message #89

Closed sreza78 closed 2 years ago

sreza78 commented 2 years ago

I got error when trying to get new direct message

Code

await ig.realtime.connect({
  irisData: await ig.feed.directInbox().request()
})

Error

(node:2342890) UnhandledPromiseRejectionWarning: IgResponseError: GET /api/v1/direct_v2/inbox/?visual_message_return_type=unseen&thread_message_limit=10&persistentBadging=true&limit=20 - 500 Internal Server Error; 
    at Request.handleResponseError (/root/app/node_modules/instagram-private-api/dist/core/request.js:125:16)
    at Request.send (/root/app/node_modules/instagram-private-api/dist/core/request.js:53:28)
    at async DirectInboxFeed.request (/root/app/node_modules/instagram-private-api/dist/feeds/direct-inbox.feed.js:21:26)
    at async Object.exports.StartWebhook (/root/app/Instagram/methods.js:253:17)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2342890) 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:2342890) [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.
sreza78 commented 2 years ago

This code works fine for a long time, but it giving error now!

sreza78 commented 2 years ago

FIXED!! it was instagram issue...