crisp-im / crisp-sdk-ios

:package: Crisp iOS SDK, add a chat in any iOS app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/ios-sdk/
Other
44 stars 19 forks source link

Error occurred while opening a chat controller #61

Closed DrashtiJaviya-Openxcell closed 1 year ago

DrashtiJaviya-Openxcell commented 3 years ago

iOS SDK version: Crisp (1.0.6, 1.1.0)

For some users, Crisp Chat SDK is giving the following error:

[error] (Server)Invalid WebsiteId

[error] A websocket error occurred. [“Connection closed by server. Code=1000, type=protocolError”]

We follow the below steps for Integration

  1. Set Website in didFinishLaunchingWithOptions

CrispSDK.configure(websiteID: crispWebsiteId)

  1. set Token Id before opening chat controller

CrispSDK.setTokenID(tokenID: "\(userID)-\(WebServiceHandler.shared().objUserModel.crispToken ?? "")")

Also, We tried to set again websiteId, token, Email, and Nickname before present chat controller

self.present(ChatViewController(), animated: true, completion: nil)

For the iOS application, we tried with two versions and both had the same response.

Crisperror2 CrispError3 We are facing this issue only for some users and here we mention one of our user details. All other users are working fine. This means for all other users, we are able to chat from the application without getting any errors.

nesium commented 1 year ago

Hi there,

It’s been a while since this issue was reported, and we’ve launched a new major version of the Crisp SDK since then. The updates might have resolved the issue you encountered.

We’d appreciate it if you test the latest version to see if the issue persists. Feel free to reopen this issue with more details if needed.

Thanks for your support!