iOS SDK: “Something went wrong” when presenting Messenger for some identified users (fixed by logout/login) | Community
Skip to main content
Question

iOS SDK: “Something went wrong” when presenting Messenger for some identified users (fixed by logout/login)

  • Oct 23, 2026 6:31 PM UTC
  • 1 reply
  • 29 views

Few of our identified users on iOS see “Something went wrong” when user opens the Messenger.  Calling Intercom.logout() and then logging the user in again fixes it. We cannot reproduce it on demand, and no error reaches our app.

Environment

  • Intercom iOS SDK via SPM - 19.5.7. Some affected builds were on 19.7.2.
  • iOS version: > iOS 15
  • Identity verification: enabled. We call Intercom.setUserHash after loginUser(with:).
  • Setup: setApiKey at launch, loginUser(with: ICMUserAttributes) with userId, email and company after sign-in, then Intercom.present() from a Settings → “Chat with us” row.

Expected
Intercom.present() shows the Messenger for a logged-in user.

Actual
The Messenger opens with a “Something went wrong” error screen.

Observations

  • Logging out of our app (which calls Intercom.logout()) and logging back in fixes it loginUser’s completion handler returned no error that we could observe.

Lifecycle, in the order our code runs it

  • At launch and after sign-in, we call Intercom.setApiKey(_:forAppId:).
  • After sign-in, we log the user in:let company
    attrs.companies = [company]
    attrs.customAttributes = meta   // bundle id, locale, currency, timezone, plan detail
    Intercom.loginUser(with: attrs) { result in ... }
  • Right after that call, we call Intercom.setUserHash(hmac). The hash is set after login.
  • In the loginUser completion handler:
    • On .success, we call Intercom.updateUser(with:) to sync attributes.
    • On .failure, we retry up to 3 times. Each retry calls Intercom.logout() and then loginUser again. After 3 failures we log the error and give up. The user stays in whatever state the SDK was left in.
  • Push: we call Intercom.setDeviceToken(_:) about 2 seconds after APNs registration.
  • When the user taps “Chat with us”, we call Intercom.present().
    • We don’t check isUserLoggedIn first.
    • We don’t check whether the earlier login succeeded.
  • On sign-out, we call Intercom.logout().

Questions

  1. Is there an Intercom-side incident, or a known issue?
  2. What conditions show “Something went wrong” instead of a surfaced error? Is there a way to read the underlying error?
  3. Can a stale cached session or identity-verification hash cause this? Must setUserHash be called before loginUser?
  4. Should we check Intercom.isUserLoggedIn before present(), and is there a supported way to force a session refresh?

1 reply

Forum|alt.badge.img+3

Hey ​@Dev-Only Access, Ryan from the Support team here - hope you’re doing good! 😀

Thanks for the detailed report, this helped narrow things down. Answering your questions below:

  1. Is there an Intercom-side incident, or a known issue?
       No incident on our side. "Something went wrong" is actually a generic error screen we use for several different underlying failures, so it's worth ruling out the two issues below first.
  2. What conditions show "Something went wrong" instead of a surfaced error? Is there a way to read the underlying error?
       present() needs to be called only after loginUser's onSuccess callback has fired. If present() runs while that login is still in progress, it fails silently with this message since the SDK isn't ready to render yet, and that failure never goes through loginUser's completion handler, which is why you saw nothing there. Documented here: https://www.intercom.com/help/en/articles/6705301-use-the-messenger-in-your-mobile-app. There isn't a way to read the underlying error client side in that case. If it persists after the fixes below, send me your app ID and a user example and I can check the request logs for one of those sessions.
  3. Can a stale cached session or identity-verification hash cause this? Must setUserHash be called before loginUser?
       Yes, setUserHash must be called before loginUser, not after. Official docs: https://developers.intercom.com/installing-intercom/ios/identity-verification. Separately, your retry logic calls logout() immediately before the next loginUser attempt. We've confirmed this specific pattern causes problems, since the next login can start before logout has actually taken effect and gets treated as already registered. Adding a short delay, or waiting for logout to complete, avoids this.
  4. Should you check isUserLoggedIn before present(), and is there a supported way to force a session refresh?
       Yes, gate your "Chat with us" row (or the present() call itself) on a successful loginUser callback, or check isUserLoggedIn first, rather than calling present() unconditionally. We don't have a separate "force refresh" API beyond calling logout() then loginUser() again.

Recommended fix, in order: reorder setUserHash to run before loginUser, add a short delay or completion check between logout() and your retry's loginUser call, and gate present() on login success. If you still see this after those changes, share your app ID and i’ll dig into the logs.