Quick troubleshooting checklist

  • Is your channel key and configuration correct?
  • Are you using the latest version of the SDK?
  • Have you enabled logging to capture errors?
  • Are you using the Managed Stripping Level property?
  • Is your JWT token valid and not expired?

Common issues and solutions

Initialization failure

  • Symptom: SDK fails to initialize.
  • Possible Causes: Incorrect channel key, missing permissions, network issues.
  • Solution: Double-check your channel key, ensure all required permissions are set, and check your network connection.

Authentication errors

  • Symptom: Users cannot authenticate or are logged out unexpectedly.
  • Possible Causes: Expired or invalid JWT token.
  • Solution: Ensure your backend generates valid JWTs and handles token refresh.

Package update issues

  • Symptom: Package updates aren't appearing after upgrading the SDK.
  • Possible Causes: Unity's Package Manager stores downloaded packages in a local cache, which can prevent it from detecting updated versions.
  • Solution: Clear the Package Manager cache:
    1. Close the Unity Editor.
    2. Delete the cached package files.
    3. Reopen Unity to download fresh copies.
    For detailed instructions, see Unity's guide on Deleting the Package Manager cache.

IL2CPP stripping

  • Symptom: SDK initializes in Unity Editor, but fails on mobile devices.
  • Possible Causes: SDK is being stripped by IL2CPP
  • Solution: A link.xml file must be included in the Unity Assets folder with the following contents:
<linker>       <assembly fullname="Unity.Zendesk" preserve="all"/>       <assembly fullname="Unity.Zendesk.MessagingCore" preserve="all"/></linker>

Android JNI package errors

  • Symptom: SDK fails to build on Android.
  • Possible Causes: Unity Editor Build Target is set to Android, but the necessary Android JNI package is not included in the project.
  • Solution: Look for the 'Android JNI' or com.unity.modules.androidjni package in Package Manager, and enable the package to include it in your project.

Logging best practices

  • Enable logging during development and troubleshooting:

    C#

    using Zendesk.Runtime.Logging;
    ZendeskLogger.SetEnabled(true);

    You can check the state of the Logger by using:

    C#

    ZendeskLogger.IsLogEnabled();
  • Collect logs and include them when contacting Zendesk support.


Reporting Issues

When contacting Zendesk support, please include:

  • SDK version
  • Unity version and device model
  • Steps to reproduce the issue
  • Relevant logs (with logging enabled)
  • Screenshots or screen recordings if possible
  • A demo app that reproduces the issue, if applicable

Demo game

Zendesk provides a demo game, Match 3, that showcases SDK features such as basic implementation and JWT authentication. You can download the game from the iOS App Store or Google Play Store.