其他分享
首页 > 其他分享> > android – 导致这个堆栈跟踪的原因是什么? (gtalkservice&jivesoftware.smack)

android – 导致这个堆栈跟踪的原因是什么? (gtalkservice&jivesoftware.smack)

作者:互联网

下面的详细信息,但基本上我正在试图了解我的Droid上发生了什么错误.

细节:
我正在努力加快C2DM的速度.我正在测试使用Urban Airship的Push Notification服务(目前为止IMO非常酷)通过C2DM向Android上运行的应用程序发送通知.

我的Droid(运行Android 2.2.2)不显示通知,每次我认为在设备上收到通知时,我都会看到写入LogCat的堆栈跟踪.

我不知道是什么产生了堆栈跟踪.我知道每次我通过Urban Airship的网站向设备发送推送通知时都会生成它.

我非常确定我已经正确配置了我的C2DM,Urban Airship和Android应用程序,因为我可以在Android模拟器上使用相同的应用程序和Google帐户成功接收和显示通知.仅供参考 – Android应用程序是Urban Airship的示例Android推送应用程序,使用我的配置信息进行编辑.

由于它在Android模拟器中工作并且在我的实际设备上失败,我假设我的设备有一些导致它失败的东西.因此,对下面的堆栈跟踪感兴趣.

11-11 16:15:28.894: E/TalkProvider(4433): query db caught 
11-11 16:15:28.894: E/TalkProvider(4433): java.lang.IllegalArgumentException: the bind value at index 2 is null
11-11 16:15:28.894: E/TalkProvider(4433):   at android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:234)
11-11 16:15:28.894: E/TalkProvider(4433):   at android.database.sqlite.SQLiteQuery.bindString(SQLiteQuery.java:182)
11-11 16:15:28.894: E/TalkProvider(4433):   at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:48)
11-11 16:15:28.894: E/TalkProvider(4433):   at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1345)
11-11 16:15:28.894: E/TalkProvider(4433):   at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:330)
11-11 16:15:28.894: E/TalkProvider(4433):   at com.google.android.gsf.talk.TalkProvider.queryInternal(TalkProvider.java:1740)
11-11 16:15:28.894: E/TalkProvider(4433):   at com.google.android.gsf.talk.TalkProvider.query(TalkProvider.java:1436)
11-11 16:15:28.894: E/TalkProvider(4433):   at android.content.ContentProvider$Transport.query(ContentProvider.java:163)
11-11 16:15:28.894: E/TalkProvider(4433):   at android.content.ContentResolver.query(ContentResolver.java:245)
11-11 16:15:28.894: E/TalkProvider(4433):   at com.google.android.gsf.gtalkservice.DatabaseHelper.getOffTheRecordCursor(DatabaseHelper.java:756)
11-11 16:15:28.894: E/TalkProvider(4433):   at com.google.android.gsf.gtalkservice.ChatSession.queryOtrCursor(ChatSession.java:206)
11-11 16:15:28.894: E/TalkProvider(4433):   at com.google.android.gsf.gtalkservice.ChatSession.<init>(ChatSession.java:168)
11-11 16:15:28.894: E/TalkProvider(4433):   at com.google.android.gsf.gtalkservice.ChatMgr.createChatSession(ChatMgr.java:264)
11-11 16:15:28.894: E/TalkProvider(4433):   at com.google.android.gsf.gtalkservice.ChatMgr.processIncomingMessage(ChatMgr.java:721)
11-11 16:15:28.894: E/TalkProvider(4433):   at com.google.android.gsf.gtalkservice.ChatMgr.processPacket(ChatMgr.java:521)
11-11 16:15:28.894: E/TalkProvider(4433):   at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader.java:1860)
11-11 16:15:28.894: E/TalkProvider(4433):   at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:451)
11-11 16:15:28.894: E/TalkProvider(4433):   at org.jivesoftware.smack.PacketReader.access$200(PacketReader.java:91)
11-11 16:15:28.894: E/TalkProvider(4433):   at org.jivesoftware.smack.PacketReader$3.run(PacketReader.java:154)
11-11 16:15:28.894: E/Smack/Packet(4433): [PacketReader] listenerThread: caught exception
11-11 16:15:28.902: E/Smack/Packet(4433): notify conn error. close connection!
11-11 16:15:28.902: E/Smack/Packet(4433): java.lang.NullPointerException
11-11 16:15:28.902: E/Smack/Packet(4433):   at com.google.android.gsf.gtalkservice.ChatSession.queryOtrCursor(ChatSession.java:208)
11-11 16:15:28.902: E/Smack/Packet(4433):   at com.google.android.gsf.gtalkservice.ChatSession.<init>(ChatSession.java:168)
11-11 16:15:28.902: E/Smack/Packet(4433):   at com.google.android.gsf.gtalkservice.ChatMgr.createChatSession(ChatMgr.java:264)
11-11 16:15:28.902: E/Smack/Packet(4433):   at com.google.android.gsf.gtalkservice.ChatMgr.processIncomingMessage(ChatMgr.java:721)
11-11 16:15:28.902: E/Smack/Packet(4433):   at com.google.android.gsf.gtalkservice.ChatMgr.processPacket(ChatMgr.java:521)
11-11 16:15:28.902: E/Smack/Packet(4433):   at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader.java:1860)
11-11 16:15:28.902: E/Smack/Packet(4433):   at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:451)
11-11 16:15:28.902: E/Smack/Packet(4433):   at org.jivesoftware.smack.PacketReader.access$200(PacketReader.java:91)
11-11 16:15:28.902: E/Smack/Packet(4433):   at org.jivesoftware.smack.PacketReader$3.run(PacketReader.java:154)
11-11 16:15:28.902: D/Smack(4433): [XMPPConn] close connection, notifyClosed=false

解决方法:

我做了一些谷歌搜索,并能够从2010年开始追踪described in this Google Group post的解决方法.该问题似乎与Google Talk应用程序有关,建议的解决方法如下:

“I went into Talk and turned off auto-sign in, then I signed out. I
tested again and I was able to receive the message inside my
application.”

一旦我这样做,我就可以在没有堆栈跟踪的设备上接收推送通知.如果有人可以添加有关为什么会发生这种情况的任何信息,我会感兴趣.

标签:urbanairship-com,android,push-notification,android-c2dm
来源: https://codeday.me/bug/20190902/1793322.html