Group creation failed

SDK 2.0.2

Group creation failed with exception: Nickname must not be null or blank.

my group object:
Group(System.currentTimeMillis().toString() + “_”
+ creatorId,
groupName, CometChatConstants.GROUP_TYPE_PRIVATE,
“”, uri, desc)

1 Like

E/CometChat: {UID=my_uid_from_my_system, method=createGroup, stacktrace=java.lang.IllegalArgumentException: Nickname must not be null or blank.
at org.jivesoftware.smack.util.StringUtils.requireNotNullOrEmpty(StringUtils.java:263)
at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:277)
at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:495)
at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:430)
at com.cometchat.pro.core.XMPPConnectionService.joinGroup(XMPPConnectionService.java:549)
at com.cometchat.pro.core.CometChat$29.onResponse(CometChat.java:1239)
at com.cometchat.pro.core.ApiConnection.handleApiResponse(ApiConnection.java:1054)
at com.cometchat.pro.core.ApiConnection.access$000(ApiConnection.java:49)
at com.cometchat.pro.core.ApiConnection$2.onResponse(ApiConnection.java:1040)
at com.google.firebase.perf.network.zzh.onResponse(com.google.firebase:firebase-perf@@19.0.2:22)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)

after I tried to logout and then login again, the group was successfully created.

And I just realized that the groups which were failed to create appeared in my conversation list

1 Like

Hello @hilmyas
So what we believe happened here was that the API to create the group was successful and the group was created successfully. However, once any group is created, as the creator of the group is by default made a member of the group, we need to subscribe to our web-sockets for that group for the creator. We believe in your case, the group was created successfully and while the connection to the web-sockets was being established, there was some internet fluctuation and thus the web-socket connection could not be established. This is a rare case and it should not cause any problems as we do check and subscribe to the web-sockets every time the network is back and thus as soon as the network is back the connection would be established and the owner/creator of the group would be able to receive real-time messages for the same group.
Can you please confirm if this caused the app to crash or was this something just visible in the logs…?
If this caused the app to crash we will definitely look into this and resolve this within the SDK in the next release.
Awaiting reply

no crash, it was just an error message in the logs. thank you for your support

1 Like

@hilmyas,
Thank you for the information. It’s just a failure log and it has been handled via the SDK so you don’t have to worry regarding this.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.