(This is mostly a copy of the Stack Exchange post I made a while back.)
I’ve been running a Google Hangouts bot on Smack 4.1 for a few years on my RaspberryPi. (It uses an @gmail.com account.) The bot was down for a few months due to another issue, which I just fixed. Unfortunately, it now won’t log in to talk.google.com. Should I upgrade to Smack 4.3 or is there another issue here that I need a fix for?
Here’s the error I’m getting now:
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). Used filter: No filter used or filter was 'null'. at org.jivesoftware.smack.SmackException.....
I tried to change the timeout length, but it still says 5000 ms. Here’s the code I’m using to try to log in:
XMPPTCPConnectionConfiguration.Builder configurationBuilder = XMPPTCPConnectionConfiguration.builder(); configurationBuilder.setSecurityMode(ConnectionConfiguration.SecurityMode.required); configurationBuilder.setUsernameAndPassword(userName, password); configurationBuilder.setCompressionEnabled(false); configurationBuilder.setServiceName("gmail.com"); configurationBuilder.setPort(port); configurationBuilder.setHost("talk.google.com"); //gmail.com configurationBuilder.setConnectTimeout(15000); this.configuration = configurationBuilder.build(); SASLAuthentication.registerSASLMechanism(new SASLXOauth2Mechanism()); this.connection = new XMPPTCPConnection(this.configuration); this.connection.setUseStreamManagement(false); this.connection.setUseStreamManagementResumption(false); System.out.println(" Connecting to the Google Hangouts server..."); this.connection.connect(); /* Connect to the XMPP sever */ System.out.println(" Connection to Google Hangouts server made..."); ...
It fails on the call to connect().
Do I need to reconfigure everything to work with Smack 4.3, or will that not help? Is there some completely different solution I should be looking for?