This bot problem only happens in web.telegram.org , not in the android app.
It is related to the inline buttons with callback. It happens in firefox and chrome.
If you play with my bot @octopocket_bot you can see the problem.
To reproduce the problem those are the steps:
1) the bot sends a message with an inline keyboard with callback buttons
2) the user presses a button
3) the bot receives an update with the callback_query with the button data
4) the bot may optionally update the previous message, but this is irrelevant
So far so good, but after some seconds and without pressing any button..
4) the bot receives another update with the callback_query with the button data
5) after 60 seconds the web client shows Internal server error. Please, try later.
If we see the technical detail there are two types of error :
Method: messages.getBotCallbackAnswer
Url: N/A
Result: {"_":"rpc_error","error_code":-503,"error_message":"Timeout"}
Stack: g@https://web.telegram.org/js/app.js:31:11150
C@https://web.telegram.org/js/app.js:32:24560
@https://web.telegram.org/js/app.js:52:11117
fn/this.$get</m.prototype.$emit@https://web.telegram.org/js/app.js:16:4872
@https://web.telegram.org/js/app.js:52:14419
ln.prototype.recurse/<@https://web.telegram.org/js/app.js:17:26437
@https://web.telegram.org/js/app.js:22:1736
fn/this.$get</m.prototype.$eval@https://web.telegram.org/js/app.js:16:3934
fn/this.$get</m.prototype.$apply@https://web.telegram.org/js/app.js:16:4163
@https://web.telegram.org/js/app.js:22:1716
ie.event.dispatch@https://web.telegram.org/js/app.js:5:2735
ie.event.add/f.handle@https://web.telegram.org/js/app.js:4:31540
Method: messages.getBotCallbackAnswer
Url: N/A
Result: {"_":"rpc_error","error_code":400,"error_message":"MESSAGE_ID_INVALID"}
Stack: g@https://web.telegram.org/js/app.js:31:11150
C@https://web.telegram.org/js/app.js:32:24560
@https://web.telegram.org/js/app.js:52:11117
fn/this.$get</m.prototype.$emit@https://web.telegram.org/js/app.js:16:4872
@https://web.telegram.org/js/app.js:52:14419
ln.prototype.recurse/<@https://web.telegram.org/js/app.js:17:26437
@https://web.telegram.org/js/app.js:22:1736
fn/this.$get</m.prototype.$eval@https://web.telegram.org/js/app.js:16:3934
fn/this.$get</m.prototype.$apply@https://web.telegram.org/js/app.js:16:4163
@https://web.telegram.org/js/app.js:22:1716
ie.event.dispatch@https://web.telegram.org/js/app.js:5:2735
ie.event.add/f.handle@https://web.telegram.org/js/app.js:4:31540
If you need more data to find the bug just tell me.
Btw: if I use and I love Telegram is mainly because the web client you made.
It looks like my issue (https://github.com/zhukov/webogram/issues/1133) is result of that you've reported.
You should call answerCallbackQuery
after callback processing (I didn't found any mention of this, but looks like most clients depends on it to show processing progress). It's still a bug in webogram that it shows the error to a user, but anyway - just call the answerCallbackQuery
:)
@andrey-yantsen , oh, thank you so much!
@andrey-yantsen , yes thanks a lot!
Trying to solve the problem I saw the answerCallbackQuery
but I misunderstood the explanation, I thought that this was for the inline queries (not for inline buttons).
Also as I was updating the message with the callback button I thought that was enough (because in this way there are not so many messages sent to Telegram).
Now with your advice it works like charm.
Just a question do I close this issue?
(I suppose not because you say there's still a bug in webogram)
@8manuel , I think better not to close the issue. Hope this will be fixed soon.
:+1:
Most helpful comment
You should call
answerCallbackQuery
after callback processing (I didn't found any mention of this, but looks like most clients depends on it to show processing progress). It's still a bug in webogram that it shows the error to a user, but anyway - just call theanswerCallbackQuery
:)