NPC Connection error on iOS

Hello, I am having issues getting my NPC to connect from the iPhone I am using convai 4.0, The app load but when I press on an NPC I get a connection error I have encloused a few logs that I could get. I must say tha tin the unity editor the npcs connect and work fine, maybe someone here can help me.

Xcode-unity-iphone.log (1.7 MB)

09042026_084914_116_iPhone.log (728.8 KB)

09042026_080104_775_iPhone.log (116.0 KB)

Hello,

Could you please download libraries for build target?

I have done it, should I compile again in unity and redeploy to app store?

Yes, please.

OK be back as soon as I retest

1 Like

So I made the change but now the App is crashing I have included the iPhone Log and the .ips file from the iphone

09042026_103434_301_iPhone.log (284.1 KB)

ips.log (116.4 KB)

Thanks for sharing, I’ve informed my teammates.

any suggestions on what to do?

They will investigate and get back to you.

1 Like

Analysis Report: A Voice of God iOS Build & Runtime Issues
Prepared by Lee for the Developer
Date: April 9, 2026
App: AVoiceOfGod (Unity 6.3 + Convai SDK 4.0 + LiveKit)


Executive Summary

I have performed 60+ Unity Cloud Build iterations over several days to stabilize the iOS version.

The primary blocker I am facing is a native crash (EXC_CRASH / SIGBUS, Type 309 Jetsam) on the main thread inside Unity’s graphics / Burst / MLIR pipeline (llvm::APInt mlir::ElementsAttr::getSplatValuellvm::APInt() const).

This crash occurs after launch, usually within 15–25 seconds, before or during NPC selection. It is not a LiveKit/Convai connection issue — it is a Unity 6.3 + IL2CPP + Burst + stripping conflict on iOS.

All earlier issues I encountered (test-framework errors, IL2CPP linker symbols, missing microphone permission popup, audio session timing races) have been resolved. The latest .ips crash file (AVoiceOfGod-2026-04-09-102644.ips) and iPhone log confirm I am back to the same MLIR/Burst graphics crash.


App & Environment Details

  • Unity Version: 6000.3.10f1 (e35f0c77bd8e)

  • Convai SDK: 4.0.0 (with LiveKit WebRTC)

  • Build Pipeline: Unity Cloud Build → TestFlight

  • Target Device: iPhone 12,5 (iOS 26.3.1 beta)

  • Current Crash: SIGBUS on main thread (UnityPlayerLoop / UIApplicationMain)


Root Cause (from latest crash files)

  • Faulting Thread: Main thread (com.apple.main-thread)

  • Exception: EXC_CRASH (SIGBUS)

  • Key Symbol in Register x2: llvm::APInt mlir::ElementsAttr::getSplatValuellvm::APInt() const

  • This points to Unity 6.3’s graphics pipeline + Burst compiler when IL2CPP stripping interacts with MetalPerformanceShadersGraph and shader/asset data.

  • The app reaches the main menu / NPC carousel but crashes before stable voice interaction can begin.


Timeline of Issues & Fixes I Applied

Phase Main Problem I Faced Key Fixes I Applied Outcome
Early Test-framework / manifest errors Removed com.unity.test-framework, cleaned manifest & lock Build succeeded, new linker errors
Mid IL2CPP symbols missing, stub not visible CloudBuildPostProcess.cs (v1–v22) with dual-target injection Linker errors fixed
Mid No mic permission popup + connection error Forced NSMicrophoneUsageDescription, NSLocalNetworkUsageDescription, ATS via PlistDocument Popup now appears
Late SIGBUS / Jetsam Type 309 (MLIR/Burst) link.xml (nuclear), [Preserve] attributes, stripping level changes, Bitcode=NO Temporary stability, crash returns
Latest (v22) Same MLIR/Burst crash v22 post-process (privacy keys + stub + Bitcode=NO) + Minimal stripping Build succeeds, keys present, still crashes

Files & Scripts I Currently Have in Use (Working Combination)

Please keep these exactly as-is:

  1. Assets/Editor/CloudBuildPostProcess.csv22 (the version Grok gave me last)

    • Forces ConvaiAudioStub.mm into both targets

    • Sets iOS 18.5 + Bitcode=NO

    • Injects microphone & local network privacy keys + ATS arbitrary loads

  2. Assets/Scripts/ConvaiAudioSessionManager.cs

    • Contains coroutine delay + DontDestroyOnLoad for audio session timing
  3. Player Settings → iOS → Other Settings → Optimization

    • Managed Stripping Level: Minimal

    • Strip Engine Code: unchecked

We have already fixed this issue. We will release an update.

How long before you release the fix, I am really stuck until this is fixed and am under deadline

any update on the fix and it’s release?

Hey, thanks for your patience!

I’m sharing the Build Post-Processing setup that should resolve your issue.
ConvaiIosBuildPostProcessor.cs (4.1 KB)

You can place this script file under:
Convai/Editor/

Also, please make sure of the following:

  1. Add Microphone permission usage in Player Settings.
  2. Verify that the required library files are already present inside:
    Assets/Convai/Plugins/client-sdk-unity-livekit/Runtime/Plugins

Let me know if you run into any issues while setting this up. I’m happy to help further.

Thank You Sir, I am testing it now and will let you know

1 Like

Hi Sir, I got this error when I compiled the game and tried to speak to the npc:

[Error][Transport]: [ProtocolGateway] Handler threw for type ‘bot-llm-text’:
Unable to find a constructor to use for type Convai.Infrastructure.Protocol.Messages.BotTranscriptionPayload.
A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute.

Where do you get this error in the editor or on an iOS device? Can you share more details, like the character ID?

One character id is 4a19c574-240a-11f1-8e46-42010a7be02c. I am getting this error from the iPhone Log which I have uploaded

10042026_073726_501_iPhone.log (308.3 KB)

any thoughts as to what is wrong from additional test I can see the Mic is active but the NPC acts like it does not hear me

Could you please upgrade the plugin?