hi, Ive already previously asked a question on stackoverflow which i will link here. didnt get any replys. I cant register a new user in smack 4.1.0
xmpp - openfire issue using smack 4.1.0 on android - Stack Overflow
basically involves registering i pass all the required extra params in a hash map shown below
String date = new SimpleDateFormat(“dd-MM-yyyy”).format(new Date());
attrmap = new HashMap<>(); // as per smack 4.1.0 java docs
attrmap.put(“name”,“empty”);
attrmap.put(“first”, “empty”);
attrmap.put(“last”,“empty”);
attrmap.put(“city”,“empty”);
attrmap.put(“state”, “empty”);
attrmap.put(“zip”,“empty”);
attrmap.put(“url”,“empty”);
attrmap.put(“date”, date);
attrmap.put(“misc”, “empty”);
attrmap.put(“text”, “empty”);
attrmap.put(“remove”, “no”);
then just call createAccount with account manager and i get the following sacktrace
10-01 02:58:54.443 1747-3673/com.example.eoin_a.im_app20 W/System.err﹕ org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: bad-request - modify 10-01 02:58:54.444 1747-3673/com.example.eoin_a.im_app20 W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:2 32) 10-01 02:58:54.444 1747-3673/com.example.eoin_a.im_app20 W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:2 13) 10-01 02:58:54.444 1747-3673/com.example.eoin_a.im_app20 W/System.err﹕ at org.jivesoftware.smackx.iqregister.AccountManager.createAccount(AccountManager. java:272) 10-01 02:58:54.444 1747-3673/com.example.eoin_a.im_app20 W/System.err﹕ at com.example.eoin_a.im_app20.Utils.ConnectionManager.registerDevice(ConnectionMa nager.java:109) 10-01 02:58:54.444 1747-3673/com.example.eoin_a.im_app20 W/System.err﹕ at com.example.eoin_a.im_app20.Models.RegisterModel$1.call(RegisterModel.java:110) 10-01 02:58:54.444 1747-3673/com.example.eoin_a.im_app20 W/System.err﹕ at com.example.eoin_a.im_app20.Models.RegisterModel$1.call(RegisterModel.java:93) 10-01 02:58:54.445 1747-3673/com.example.eoin_a.im_app20 W/System.err﹕ at java.util.concurrent.FutureTask.run(FutureTask.java:237)
I also get the ‘user tried to authenticate with this server using unknown recipient’ message in my logs!
i set my “.setServiceName(“172.31.36.65”)” to be the same ip as my xmpp.domain that i have on my openfire console. although it is written a bit differently
like “ip-172-31-36-65” iam wondering should i enter it in this format in the configuration. as in enter the value as “.setServiceName(“ip-172-31-36-65”)”
I am not too sure at the minute but iam pretty sure the issue is the xmpp domain.
I also set the .Host() value to be the public IP on my server. if anyone can fill me in id appreciate it.