Open exhuma opened 5 years ago
same
FWIW, I just tested it on a machine with direct Internet access and it works without any modification of the existing code. So the bot implementation itself seems fine.
Digging through the code, it looks like bots use DDP to connect to the RocketChat server. I've never heard of DDP until today so I was doing some research:
netstat
on my machine where it is working does not yield anything helpful. I can't see it it uses any special portsStill not very lucky until now 🙁
@exhuma Thanks for sharing your issue and persisting with the problem. I'm unable to provide detailed support with Rocket.Chat connection issues, because there's just too much inconsistency between versions. I tried for a long time but it became infeasible as there's ongoing issues of stability with Rocket.Chat's socket connection handlers.
As you may have found, DDP is just a standard for communicating over websocket, like REST for web APIs. The Rocket.Chat SDK is used by the bot to connect over websocket - in their docks this layer is referred to as the "Realtime API", but the dependency is a DDP handler called Asteroid, which is the part that seems to have lost compatibility with Rocket.Chat in recent versions.
I am working on a totally rearchitected version of bBot that has removed this dependency and I've built my own connection layer instead of relying on the Rocket.Chat SDK. Unfortunately my time is very limited right now so progress is slow.
Depending on your needs and level of coding, you could have a look at the new connection util I made (Rocket Control), which has enough for building a simple bot without the full features of bBot. Though I haven't confirmed it's stability with recent versions.
If you need more context to continue working on it, please go ahead and open new issues, I'll do my best to provide some helpful direction.
I'm trying to run a new bot, but I get a connection timeout:
Running a cURL command with the same proxy settings works: