smack-experimental:4.2.0 produces SmackException$NoResponseException

After changing SMACK version in gradle from 4.2.0-rc3 to 4.2.0 I have a problem to login to jabber server.

compile ‘org.igniterealtime.smack:smack-tcp:4.2.0’

compile ‘org.igniterealtime.smack:smack-core:4.2.0’

compile ‘org.igniterealtime.smack:smack-android:4.2.0’

compile ‘org.igniterealtime.smack:smack-extensions:4.2.0’

compile ‘org.igniterealtime.smack:smack-experimental:4.2.0’

If I comment smack-experimental:4.2.0 and use “old” version for experimental:

compile ‘org.igniterealtime.smack:smack-experimental:4.2.0-rc3’

everything is fine.

This works:

compile ‘org.igniterealtime.smack:smack-tcp:4.2.0’

compile ‘org.igniterealtime.smack:smack-core:4.2.0’

compile ‘org.igniterealtime.smack:smack-android:4.2.0’

compile ‘org.igniterealtime.smack:smack-extensions:4.2.0’

compile ‘org.igniterealtime.smack:smack-experimental:4.2.0-rc3’

Error log:

ServiceDiscoveryManager: Exception while discovering info for feature urn:xmpp:http:upload:0 of conference…com node: null

org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 30000ms (~30s). Waited for response using: IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=li1rk-12)), : fromFilter (OrFilter: (FromMatchesFilter (full): conference…com)).

at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:2 53)

at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:2 08)

at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.discoverInfo(ServiceDisco veryManager.java:540)

at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.discoverInfo(ServiceDisco veryManager.java:506)

at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.findServicesDiscoverInfo( ServiceDiscoveryManager.java:773)

at org.jivesoftware.smackx.httpfileupload.HttpFileUploadManager.discoverUploadServ ice(HttpFileUploadManager.java:175)

at org.jivesoftware.smackx.httpfileupload.HttpFileUploadManager$2.authenticated(Ht tpFileUploadManager.java:114)

at org.jivesoftware.smack.AbstractXMPPConnection.callConnectionAuthenticatedListen er(AbstractXMPPConnection.java:1228)

at org.jivesoftware.smack.AbstractXMPPConnection.afterSuccessfulLogin(AbstractXMPP Connection.java:572)

at org.jivesoftware.smack.tcp.XMPPTCPConnection.afterSuccessfulLogin(XMPPTCPConnec tion.java:377)

at org.jivesoftware.smack.tcp.XMPPTCPConnection.loginInternal(XMPPTCPConnection.ja va:442)

at org.jivesoftware.smack.AbstractXMPPConnection.login(AbstractXMPPConnection.java :491)

at com…android.chat.xmpp.ConnectionManager.login(ConnectionManager.java:118)

Problem is in:

XMPPTCPConnection - login

That exception just shows that HttpFileUploadManager was unable to discover an service, it should not cause login() failures.

That’s the only response I have in console.

This not working for me:

compile ‘org.igniterealtime.smack:smack-experimental:4.2.0’

So I’m using:

compile ‘org.igniterealtime.smack:smack-experimental:4.2.0-rc3’

Thanks for your response!

Still not sure why I’m getting this error because I’m not using HttpFileUploadManager at all. I don’t need it. experimental 4.2.0 don’t work but experimental 4.2.0-rc3 works just fine.

It’s auto initialized. You can disable unused Smack components that are in the classpath with SmackConfiguration.addDisabledSmackClass().

Hi Flow,

Yes that is it! Problem solved in one line of code:

SmackConfiguration.addDisabledSmackClass(“org.jivesoftware.smackx.httpfileupload .HttpFileUploadManager”);

Thanks!

Can you please tell me is this how Smack works from now? I have to disable all unused Smack components manually?

I could not find it in Smack documentation. If I knew about addDisabledSmackClass I’ll not bother you with this questions.

Thanks again.