-
Notifications
You must be signed in to change notification settings - Fork 52
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
Error: MQTToTClient got disconnected #18
Comments
I'll look at it later. But for now, could you turn on debugging. |
I have created .env file in root and I have added this line I checked it again I face same error and there is extra information
what is wrong ? how can I fix it ? thanks |
In command line I see these commands
and about one minute after it , it gets disconnected. if this is the problem 'keepAliveTimeout' how can I increase it ? |
I have increased it but nothing changed ! |
I'm experiencing the same problem. For now, you can try an older version (0.1.x). |
Thanks you , I have used and now my code is
|
You can use |
In a new folder I have installed this version and using example in the tree that you mentioned I created example.ts this is the code
when I launch it using I don't know may be I'm making mistake ! |
After |
Version |
thank you so much , for now I'm testing 1.1 , this is good but on windows some time it break and get back to command line This is my command line : I'm going to test v 2.1 thank you |
Thank you , I have tested 2.1 and seems it is working properly , thank to you and your support :) |
How can I get user_id and send response? there was not send direct message and response in example ! |
Found |
unfortunately , 2.1 is like 2.0 and it got disconnected after about 1 or 2 minutes , |
when I use 1.17 in command line , without raising any error it exit operating beside when I'm using fbns (push in example) I get igSentryBlockError why is it happening and how can I fix it ? |
Disabling getClientConfigUpdateSubscription and getZeroProvisionSubscription works. I don't know why that's the case. |
I'm getting the same error (using 0.2.1). |
I also receive all events twice... 🤔 ig.fbns.push$.subscribe((data) => {
if(data.collapseKey === "direct_v2_message"){
console.log('message received', data.message)
}
}); For one message sent, it logs two "message received" (with the same content). |
after disabling it's working thanks |
I'm using V 1.17 and real time , for now it's working good , try it |
Ah, I'm using the FBNS client. |
Why you don't use real time ? |
Is it better? I need to trigger a function when a message is received, and as I'm making a chatbot I need to keep the bot logged forever. |
Realtime would be in this case more reliable. The notifications are managed by facebook and if you're receiving many messages at once, it will omit some notifications. Realtime on the other hand will most likely still send the messages. And in addition you can get the entire message/image etc. and you don't have to fetch this on your own. |
I tested realtime and that's amazing! 😮 |
What is the right way to keep connection for long time? |
Currently, an error is emitted if the connection is closed unexpectedly. If you call |
So, I need write something like realtime.on('error', err => {
if (disconnect_error) {
//realtime.connect as first times
}
}) yes? And will my handlers working with new connection (as |
I just updated the package (0.2.14). Now, the client reconnects (and subscribes) automatically so you don't have to do anything. |
Vielen Dank, ich hoffe, dass ich keine Probleme haben werde. |
Hey @Nerixyz great work, but i am using 0.2.16 with both Realtime and Fbns . my connection is still disconnecting after some time and not reconnecting what should i do. thanks |
Same for me! It closes the node process... and never reconnects (as the node process is closed). ClientDisconnectedError: MQTToTClient got disconnected.
at SafeSubscriber._next (/home/container/node_modules/instagram_mqtt/dist/realtime/realtime.client.js:152:30)
at SafeSubscriber.__tryOrUnsub (/home/container/node_modules/rxjs/internal/Subscriber.js:205:16)
at SafeSubscriber.next (/home/container/node_modules/rxjs/internal/Subscriber.js:143:22)
at Subscriber._next (/home/container/node_modules/rxjs/internal/Subscriber.js:89:26)
at Subscriber.next (/home/container/node_modules/rxjs/internal/Subscriber.js:66:18)
at Subject.next (/home/container/node_modules/rxjs/internal/Subject.js:60:25)
at MQTToTClient.setDisconnected (/home/container/node_modules/mqtts/dist/mqtt.client.js:329:30)
at Object.disconnect (/home/container/node_modules/mqtts/dist/mqtt.client.js:97:26)
at TLSSocket.<anonymous> (/home/container/node_modules/mqtts/dist/transport/tls.transport.js:20:52)
at TLSSocket.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1220:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) |
There's a "new" alpha version which aims to fix some of these issues by not usign rxjs and instead relying on regular events and streams. The events are fully typed so they will work fine with TypeScript. There should also be autocomplete support (at least in WebStorm) for the events. You can get the alpha version here (it's on the |
I'm testing it, but I made my own parser for iris messages. Is there still a way to receive all iris messages as they are, without being parsed? |
There are Mixins now, you may want to use them (like the other ones do). But what's the problem with the parsing? |
All right 👍
I made my own parser, so it means I have to rewrite it? |
If you still have a need for it, yeah. But the only difference was the handling of |
How about this error? @Nerixyz ? i'm using alpha latest version. |
If you're using the default settings, then the client should reconnect automatically. The error is emitted either way. If the client doesn't reconnect, please paate the debug log here ( |
Hi @Nerixyz thanks for answer, |
Hi @Nerixyz Thanks! i just tested and working before i using await |
Hey @Nerixyz @Androz2091 , i am not able to use the alpha and got following error after installing i am using WebStorm IDE i have also tried NPM but when i install it with npm it gives error instagram-private-api not found at run time but it actually installed |
@jafferkazmi572 You have to update your node to at least v.12. |
Ok Thanks |
The library is working fine and I appreciate you , but when I connect using command line windows with command
first every thing works fine and all events are printing , but after about one minute I face error
Please see this image is taken from command line
https://prnt.sc/qxvzji
thanks
The text was updated successfully, but these errors were encountered: