AnsweredAssumed Answered

Exception reloading roster with ejabberd service

Question asked by Santiago Del Valle G on Sep 10, 2015
Latest reply on Oct 21, 2015 by Gustavo

im making a chat app using smack 4.2.0 alpha version with a ejabberd service version 14.07, when i connect to the service i get an exception:

"Exception reloading roster" and "org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). Used filter: IQReplyFilter: iqAndIdFilter ..." ive been looking for the answer but i cant find it, does anyone know how to fix it?

This pice of code goes into an async-task,when connection is made ive tried to: whait for 6 seconds and call roster.reloadAndWait(); but when this is reached the same exception is thrown and i cant figure out what may be the problem.

Thankspublic void connect() throws IOException, InterruptedException, XMPPException, SmackException {

       SASLAuthentication.blacklistSASLMechanism("SCRAM-SHA-1");

       SASLAuthentication.blacklistSASLMechanism("DIGEST-MD5");

       SASLAuthentication.unBlacklistSASLMechanism("PLAIN");

       DomainBareJid serviceName = JidCreate.domainBareFrom(Address);

       XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()

            .setServiceName(serviceName)

            .setHost(Address)

            .setPort(5222)

            .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)

            .build();

        conn = new XMPPTCPConnection(config);

        roster = Roster.getInstanceFor(conn);

        roster.setSubscriptionMode(Roster.SubscriptionMode.accept_all);

        roster.setRosterLoadedAtLogin(true);

        conn.connect();

        conn.login("usuario9", "*****");

}

Outcomes