QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
397 stars 359 forks source link

Quick blox chat The operation couldn’t be completed. com.quickblox.chat error -1004 #1326

Closed MohanNB closed 1 year ago

MohanNB commented 2 years ago

** "[ChatStorage] dialog.join error: The operation couldn’t be completed. (com.quickblox.chat error -1004.)"

"[ChatViewController] dialog.join error: The operation couldn’t be completed. (forbidden error 403.)"

"[ChatStorage] dialog.join error: Cannot create/join room when already creating/joining/joined." t**

Environment details

Info Value
iOS Version e.g. 13.0 above
Quickblox iOS SDK version e.g. 2.17.11
Xcode Version e.g. Xcode 12.1
Repro with our demo sample e.g. does it happen with our demo sample?

Did this work before? yes

Expected behavior

"[ChatStorage] dialog.join error: The operation couldn’t be completed. (com.quickblox.chat error -1004.)"

"[ChatViewController] dialog.join error: The operation couldn’t be completed. (forbidden error 403.)"

"[ChatStorage] dialog.join error: Cannot create/join room when already creating/joining/joined."

While join the group chat getting empty chat history or not able join on dialogs .

Actual behavior

Used code before join group 👍

QBChat.instance.addDelegate(self) chatManager.delegate = self if QBChat.instance.isConnected == false { self.chatManager.connect() } self.chatManager.updateStorage()

self.dialogs = self.chatManager.storage.dialogsSortByUpdatedAt()

some time getting empty response : self.dialogs

**"[ChatStorage] dialog.join error: The operation couldn’t be completed. (com.quickblox.chat error -1004.)"

"[ChatViewController] dialog.join error: The operation couldn’t be completed. (forbidden error 403.)"

"[ChatStorage] dialog.join error: Cannot create/join room when already creating/joining/joined."**

USED CODE getting failed some dialogs list :

func chatManager(_ chatManager: ChatManager, didUpdateChatDialog chatDialog: QBChatDialog) {

// reloadContent(false)

    dialogs = chatManager.storage.dialogsSortByUpdatedAt()
    SVProgressHUD.dismiss()
}

func chatManager(_ chatManager: ChatManager, didFailUpdateStorage message: String) {
    //SVProgressHUD.showError(withStatus: message)
    vsprint("ERROR QBLOK Update Storage ===== ")
}

func chatManager(_ chatManager: ChatManager, didUpdateStorage message: String) {

// reloadContent(false) dialogs = chatManager.storage.dialogsSortByUpdatedAt() vsprint("didUpdateStorage chatDialog ===== (dialogs.count)") SVProgressHUD.dismiss() }

To enable full logs use the following code: yes I'm following it

[QBSettings setLogLevel:QBLogLevelDebug]; [QBSettings enableXMPPLogging];

ghost commented 1 year ago

Hello, please check if the issue is reproduced on our samples https://docs.quickblox.com/docs/code-samples#chat-samples