SmackException NoResponseException Android xmpp连接

时间:2016-06-14 07:25:35

标签: android xmpp

您好我正在创建一个聊天应用程序。我想从VCard中读取数据>我使用以下代码..

private VCard getVCard(String dialogId){

        VCard card = new VCard();
        ProviderManager.addIQProvider("vCard", "vcard-temp:x:update", new VCardProvider());
        try {
            card.load(ChatService.mConnection, dialogId);
        } catch (SmackException.NoResponseException e) {
            e.printStackTrace();
        } catch (XMPPException.XMPPErrorException e) {
            e.printStackTrace();
        } catch (SmackException.NotConnectedException e) {
            e.printStackTrace();
        }

        return card;
    }

哪个工作了一段时间,但现在它无法正常工作。我面临以下错误。

 org.jivesoftware.smack.SmackException$NoResponseException: 
No response received within reply timeout. Timeout was 5000ms (~5s). Used filter: 
IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=8DEYf-18)), : 
fromFilter (OrFilter: (FromMatchesFilter (full): 919879879871@www.chatapp.com)).
 at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:229)
 at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:213)
 at org.jivesoftware.smackx.vcardtemp.VCardManager.loadVCard(VCardManager.java:125)
 at org.jivesoftware.smackx.vcardtemp.packet.VCard.load(VCard.java:575)
 at com.android.chat.ui.fragments.Homefragment.getVCard(Homefragment.java:618)
 at com.android.chat.ui.fragments.Homefragment.access$900(Homefragment.java:85)
 at com.android.chat.ui.fragments.Homefragment$DownloadContactList.insertIntoDB(Homefragment.java:672)
 at com.android.chat.ui.fragments.Homefragment$DownloadContactList.access$800(Homefragment.java:630)
 at com.android.chat.ui.fragments.Homefragment$DownloadContactList$1.onSuccess(Homefragment.java:647)
 at com.android.chat.ui.fragments.Homefragment$DownloadContactList$1.onSuccess(Homefragment.java:640)
 at com.android.chat.core.TCChatService.getChatDialogs(TCChatService.java:387)
 at com.android.chat.ui.fragments.Homefragment$DownloadContactList.doInBackground(Homefragment.java:640)
 at com.android.chat.ui.fragments.Homefragment$DownloadContactList.doInBackground(Homefragment.java:630)
 at android.os.AsyncTask$2.call(AsyncTask.java:288)
 at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 at java.lang.Thread.run(Thread.java:841)

请帮我解决这个问题。

0 个答案:

没有答案