GCM重复的报文报文、GCM

2023-09-04 09:01:16 作者:劫·

我有一个基于谷歌云消息传递的应用程序,它运作良好。现在,突然之间(今天)一切开始有我们从未见过的一个问题。用于设备之间发送的每个消息中,接收装置将获得它的两倍。第一个将几乎立即到达(发送的少于3秒内)。第二个到达,几分钟后。有在测试两个装置,但问题是相同的哪一个是所述发送/接收器。因此,如果一个设备发送一些消息给对方,对方就会得到它们pretty的多即刻 - 但随后在稍后的时间,它会收到它们的消息的它已经接收到第二拷贝信息的一连串

I have an app based on Google Cloud Messaging and it was working well. Now (today) all of a sudden it started having a problem we've never seen before. For each message sent between devices, the receiving device will get it twice. The first will arrive almost instantly (within less than 3 seconds of sending). The second arrives a few minutes later. There are two devices in the test, the problem is the same whichever one is the sender/receiver. So if a device sends a few message to the other, the other will get them pretty much instantly--but then at a later time, it will receive a barrage of messages which are the second copies of the messages it has received.

我已经把断点,以确保发送设备是不是罪魁祸首:邮件的发送一次(即Web服务发送被调用一次 - 和code的后端,它运行在谷歌应用程序引擎,并没有改变的年龄)。然而,该消息在某种程度上被传递到接收设备的两倍。通过使用断点我也确信我们自己的code对接收方概不负责:验证了 GCMIntentService ::的onMessage()确实被调用两次,每次发送的邮件。

I have put in breakpoints to make sure that the sending device wasn't the culprit: the message was sent exactly once (i.e. the web service for sending was called exactly once--and the code for the backend, which runs on Google App Engine, hasn't changed for ages.) However, the message somehow gets delivered to the receiving device twice. By using breakpoints I also made sure our own code on receiving side isn't responsible: it is verified that GCMIntentService::onMessage() indeed gets invoked twice for each sent message.

我们还相信在我们的数据库中的注册ID是最新的。在这一点上我很为难,需要思想做任何进一步的进展。因此,任何想法?

We also made sure the registration id in our database is the latest. At this point I'm stumped and need ideas to make any further progress. So any ideas?

推荐答案

https://groups.google.com/forum/#​​!topic/android-gcm/EHZUTEJMeyw

检查高于官方GCM线程。每个人都遇到此问题。谷歌的错!

Check the official GCM thread above. Everyone is experiencing this issue. Google's fault!