Open korzhyk opened 2 years ago
I have the same problem. Looking at logs, it may be an issue with telegram ratelimiting. I was banned for 291 seconds, and on ~60 library crashed. I suppose it doing the same request every second and then telegram decides to just shutoff this connection (which is not documented and not supported by library). Or it was logs from my previous crashes. Who knows :)
Anyway, the best solution I see is to schedule a restart every day or try to catch this exact type of error. I disabled autorestarting on error because I'm too afraid of running into looping error => ratelimit ban. My bot has been working like that, restarting everyday, for a month or so and I only noticed this error when checking logs, it didn't affect the bot's actions
Describe the bug https://github.com/alik0211/mtproto-core/blob/0dec9b0f490035214c3479da2fd7eced624ff7c7/src/rpc/index.js#L552 TypeError: Cannot read properties of undefined (reading 'resolve')
Code example I have just one listener for updates
Expected behavior Promise resolve
Context: