0

all.

On the last week we are facing a problem in messages order, in Facebook Messenger.

When user is interacting with our bot, on most of the cases Messenger send random messages that it has sent before in the conversation. This old messages are not triggered by our bot, they simply appear, which makes us to think it is a Messenger thing. After a while, when user leave the conversation for some seconds and get back to it later, the bot is ok again. Sometimes user has to say "hi" to bot, so it gets back to the right point of conversation.

It also happens with messages that were sent by user, not only by our bot.

We have never get this problem using it on web platform. It seems to occur only in Android devices (Android massenger app), until this point.

When we check the conversation from the fan page side, it is all ok, and it is hard to determine where the problem occured just by looking from the fan page perspective. It seems there is no problem. But if you are the one who is interacting with the bot is very bad, it is like a "crazy" conversation for the end user.

It is a different case from the listed on other topics. We have an information thread that sends lots of messages, and in this case for example, it has never failed in order. It just happens when there is an user-bot interaction.

Is anybody here facing this kind of problem with messages order?

Thank you in advance.

Daniel Faria
  • 1
  • 1
  • 1
  • I have not seen this behavior before. What makes you sure your bot is not sending the messages? If you can share your code maybe someone can help. – Jon Church May 11 '17 at 21:10
  • Do you mean messages are _send to_ the user - or that your webhook _receives_ user messages multiple times? The latter can easily happen if your bot does not respond to the incoming webhook request with 20 OK within the define timeframe. In that case, Facebook wil assume you did not receive the data correctly, and send it again shortly after. – CBroe May 12 '17 at 10:22
  • Thank you for attention, guys. – Daniel Faria May 13 '17 at 00:38
  • We think our bot is not sending these messages because the duplicated message simply disappears if you leave conversation, or write something to the bot. If bot was sending these messages, they would't disappear. It is like the message was not there, but the user sees it. If bot was sending that message, its thread would also be changed. It doesn't happen because bot doesn't change its original thread. – Daniel Faria May 13 '17 at 00:55
  • These messages appear out of context, and suddenly (sometimes if your wait some seconds, sometimes if you say "hi" to bot, sometimes you have to delete conversation and then say hi when you are back) disappear from conversation. Another thing is: if bot was sending them, it would be possible to check them from the fan page perspective, and it doesn't happen, because the duplicated message actually doesn't exist. – Daniel Faria May 13 '17 at 00:57
  • Another important thing is that messages sent by user are also duplicated sometimes. It is not possible for bot doing this, because they came from Messenger side. For us it is a different case from the other duplicated messages reported before. – Daniel Faria May 13 '17 at 00:57

1 Answers1

0

we have seen the same behavior in android

On further investigation, we found that the messages which we assumed are delivered to the users were actually not delivered.

What we did was started listening to delivery notification and read receipts documentation link. We saved every message at our end and then mapped with seq number and it turns out that there is connectivity issues in android for fb messenger (reference).

When fb messenger is running in background and there is poor network connection then messages are not being received. This is what I have observed when I have poor network connection.

Kunal Parekh
  • 419
  • 3
  • 9
  • Thanks, Kunal. We assume messages are received because bot continues its thread in the right way. What happens is that Messenger gives some of these messages back, but it stays just in user's Messenger, because bot doesn't consider them on its thread. And when user leaves conversation and goes back to it, they don't exist anymore. We think if it was a delivery problem, bot's thread would be affected as well, and it is not.I left some comments above explaining it better. Does it make sense for you? – Daniel Faria May 15 '17 at 16:58
  • @DanielFaria we have not seen this behavior yet. Have you considered a scenario of user deleting the messages which was sent to bot but not delivered and then delivered at a later stage (local cache not being cleared) ? can you also try reproducing this scenario on [m.me](https://m.me) instead of app ? I believe app has connection glitches. – Kunal Parekh May 16 '17 at 04:25
  • we did not consider this scenario, as it frequently happens with me while using my own bot. I mean, I do not delete the messages and it happens all the time. It has never occured in m.me. It only seems to happen while user is using Messenger in Android. It makes things difficult to monitor, because looks like an independent thing, not related to our bot. – Daniel Faria May 17 '17 at 05:32