AnsweredAssumed Answered

IllegalArgumentException on load VCard with VCardManager Smack Android

Question asked by Stefan hennemann on Feb 23, 2016
Latest reply on Feb 24, 2016 by Stefan hennemann

Hi there,


I got a problem with loading a VCard from another user in smack for android. For example I am loading this VCard like this:


vcard = manager.loadVCard("");


This throws the following error:


  Caused by: java.lang.IllegalArgumentException: Must have a local (user) JID set. Either you didn't configure one or you where not connected at least once

                                                                             at org.jivesoftware.smack.filter.IQReplyFilter.<init>(

                                                                             at org.jivesoftware.smack.AbstractXMPPConnection.createPacketCollectorAndSend(Abst

                                                                             at org.jivesoftware.smackx.vcardtemp.VCardManager.loadVCard(

                                                                             at de.opiatefuchs.connection.Connection.loadVCard(

                                                                             at de.opiatefuchs.connection.Connection$5.doInBackground(

                                                                             at de.opiatefuchs.connection.Connection$5.doInBackground(

                                                                             at android.os.AsyncTask$


                                                                             at android.os.AsyncTask$SerialExecutor$

                                                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(

                                                                             at java.util.concurrent.ThreadPoolExecutor$



I am definetely connected, that´s not the problem. At the old VCard a vcard was able to be loaded with vcard.load(connection,userJabberId); How should this be done via the VCardManager? Loading through VCard instead of VCardManager is deprecated, so how should I do this?