App is crashing When I try to create a new group

I have recently purchased the plan of COMETCHAT PRO. I’m facing an issue when I create Group it crashes immediately. However if i launch the app again the group was created.

Using Xcode 11.5
iOS 13.5.1

Below are the error details:
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value: file /Users/nishanttiwari/Documents/Nishant/dev/cometchat-pro-ios-sdk/CometChatSDK/CometChatPro/Manager/XMPP/XMPPController.swift, line 187

This is works fine in your sample application but not in my own app (the code is exactly same).

Help needed. This issue is getting serious now. I have to delete the app and install again and it works fine and i was able to create groups but after sometime is starts crashing again on group creation

Hi @zj99

Can you please let me know the version of SDK you are using also what are the steps and code you have used to create a group. As this would help us to find the exact root cause of it. It may be due to some implementation issue. Please let us know so that we can help you out

Hi @nishant.tiwari

I’m using latest Cometchat Pro SDK (2.0.11-Xcode11.4). I have used the Library code you provided on your github repo.
If I install the app first time and creates group it works fine, if i close the app opens it again and create group again then it starts crashing however the group was created when i checked by opening the app again.

Hi @zj99

As you said that the code is working in sample app but not in our app so it would be great if you could provide us your code snippet so that we can check. As i tried again in the sample app as well as in separate app to test but wasn’t able to replicate it. Please provide the code snippet so that we can investigate further.

Hello @zj99,

Please let us know if you’re still facing the issue with the same. Also, we suggest you use SDK v2.0.12-Xcode11.4 and UI Kit Library v2.0.6.

Thanks.

@nishant.tiwari @pushpsen.airekar I’m using the latest SDK and latest Library. The code is exactly same as your app. I just drag and drop the library folder in my app that’s it. I haven’t changed the Library code.

Hi @zj99,

I can see you are having issues in our SDK. Can you please provide us the complete crash log so that I can have a look into the issue. Thanks

Regards,
Jeet Kapadia

1 Like

@jeet.kapadia I just only got that crash log which I shared above in my question. I’m not getting any further details. It just prints this error log and crash

1 Like

@zj99
change in Podfile to

pod ‘CometChatPro’

then update your pods. Had the same issue with joinGroup method. It looks that CometChat SDK has a linking issue in the version you are using.

2 Likes

@patryk.strzemiecki Thanks. I’ll try it and update here soon

1 Like

@nishant.tiwari @pushpsen.airekar If i use this pod ‘CometChatPro’, ‘2.0.12-Xcode11.4’ in POD file then it crashes on group creation with same logs i added above but when i use pod ‘CometChatPro’ it doesn’t crash. It must be something with linking or something else that you need to figure out. By using pod ‘CometChatPro’ i think I’m getting older version instead of new one.

Hi @zj99

Okay, we are checking at our end using the pod ‘CometChatPro and also again by using the pod ‘CometChatPro’, ‘2.0.12-Xcode11.4’. So that we replicate the issue. Will update you on this. Thanks for letting us know if there are any other issues that you are facing please do let us know we would love to have a look at it.

Hi @zj99,

We have released a new version 2.0.13 in which we have added extra check and optimized the code. Please try installing it and let us know if you are still facing the same issue. Here is the link of the setup guide

Let us know if you face any other issue. We will be happy to assist you.

Regards
Jeet Kapadia

4 Likes

@jeet.kapadia Hi thanks. I’ll update the SDK and will let you know here about it

4 Likes

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