Strange errors hapening when I tried the unity demo

So I made a convai account, download the convai sample project for unity,setup the api key, and…
it doesnt work.

So what happen is I open the demo scene from the ‘all features’ section and when I hit play the character loads normally except, there’s an extra error that follows :

DllNotFoundException: grpc_csharp_ext assembly: type: member:(null)
Grpc.Core.Internal.NativeLogRedirector.Redirect (Grpc.Core.Internal.NativeMethods native) (at :0)
Grpc.Core.Internal.NativeExtension…ctor () (at :0)
Grpc.Core.Internal.NativeExtension.Get () (at :0)
Grpc.Core.Internal.NativeMethods.Get () (at :0)
Grpc.Core.GrpcEnvironment.GrpcNativeInit () (at :0)
Grpc.Core.GrpcEnvironment…ctor () (at :0)
Grpc.Core.GrpcEnvironment.AddRef () (at :0)
Grpc.Core.Channel…ctor (System.String target, Grpc.Core.ChannelCredentials credentials, System.Collections.Generic.IEnumerable`1[T] options) (at :0)
Grpc.Core.Channel…ctor (System.String target, Grpc.Core.ChannelCredentials credentials) (at :0)
Convai.Scripts.Runtime.Core.ConvaiNPC.Start () (at Assets/Convai/Scripts/Runtime/Core/ConvaiNPC.cs:155)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at :0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:156)
UnityEngine.UnitySynchronizationContext.Exec () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:84)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:110)

but since I can move the character, I didn’t think too much of it until I tried interracting with the character. When I tried to interract both using mic by pressing T this happened

NullReferenceException: Object reference not set to an instance of an object
Convai.Scripts.Runtime.Core.ConvaiGRPCAPI.GetAsyncDuplexStreamingCallOptions (Service.ConvaiService+ConvaiServiceClient client) (at Assets/Convai/Scripts/Runtime/Core/ConvaiGRPCAPI.cs:319)
Convai.Scripts.Runtime.Core.ConvaiGRPCAPI.StartRecordAudio (Service.ConvaiService+ConvaiServiceClient client, System.Boolean isActionActive, System.Boolean isLipSyncActive, System.Int32 recordingFrequency, System.Int32 recordingLength, System.String characterID, Service.ActionConfig actionConfig, Service.FaceModel faceModel, System.String speakerID) (at Assets/Convai/Scripts/Runtime/Core/ConvaiGRPCAPI.cs:283)
Convai.Scripts.Runtime.Core.ConvaiNPC.StartListening () (at Assets/Convai/Scripts/Runtime/Core/ConvaiNPC.cs:351)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at :0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:156)
UnityEngine.UnitySynchronizationContext.Exec () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:84)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:110)

and if I tried using the text type and press enter this happened

[Error][Character]: System.NullReferenceException: Object reference not set to an instance of an object
at Convai.Scripts.Runtime.Core.ConvaiGRPCAPI.GetAsyncDuplexStreamingCallOptions (Service.ConvaiService+ConvaiServiceClient client) [0x00043] in /home/deck/UnityProjects/CONVAI_TEST/Assets/Convai/Scripts/Runtime/Core/ConvaiGRPCAPI.cs:319
at Convai.Scripts.Runtime.Core.ConvaiGRPCAPI.SendTextData (Service.ConvaiService+ConvaiServiceClient client, System.String userText, System.String characterID, System.Boolean isActionActive, System.Boolean isLipSyncActive, Service.ActionConfig actionConfig, Service.FaceModel faceModel, System.String speakerId) [0x0002e] in /home/deck/UnityProjects/CONVAI_TEST/Assets/Convai/Scripts/Runtime/Core/ConvaiGRPCAPI.cs:201
at Convai.Scripts.Runtime.Core.ConvaiNPC.SendTextDataAsync (System.String text) [0x00054] in /home/deck/UnityProjects/CONVAI_TEST/Assets/Convai/Scripts/Runtime/Core/ConvaiNPC.cs:329
[Stack Trace - Method: MoveNext, at Line: 334 in File: /home/deck/UnityProjects/CONVAI_TEST/Assets/Convai/Scripts/Runtime/Core/ConvaiNPC.cs]
UnityEngine.Debug:LogError (object)
Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger:LogMessage (string,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogLevel,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogCategory,object) (at Assets/Convai/Scripts/Runtime/LoggerSystem/ConvaiLogger.cs:93)
Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger:Error (string,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogCategory,object) (at Assets/Convai/Scripts/Runtime/LoggerSystem/ConvaiLogger.cs:140)
Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger:Error (object,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogCategory) (at Assets/Convai/Scripts/Runtime/LoggerSystem/ConvaiLogger.cs:120)
Convai.Scripts.Runtime.Core.ConvaiNPC/d__104:MoveNext () (at Assets/Convai/Scripts/Runtime/Core/ConvaiNPC.cs:334)
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<Convai.Scripts.Runtime.Core.ConvaiNPC/d__104> (Convai.Scripts.Runtime.Core.ConvaiNPC/d__104&)
Convai.Scripts.Runtime.Core.ConvaiNPC:SendTextDataAsync (string)
Convai.Scripts.Runtime.Core.ConvaiPlayerInteractionManager:HandleInputSubmission (string) (at Assets/Convai/Scripts/Runtime/Core/ConvaiPlayerInteractionManager.cs:54)
Convai.Scripts.Runtime.Core.ConvaiPlayerInteractionManager:HandleSendText () (at Assets/Convai/Scripts/Runtime/Core/ConvaiPlayerInteractionManager.cs:89)
Convai.Scripts.Runtime.Core.ConvaiInputManager:OnSendText (UnityEngine.InputSystem.InputAction/CallbackContext) (at Assets/Convai/Scripts/Runtime/Core/ConvaiInputManager.cs:112)
UnityEngine.InputSystem.LowLevel.NativeInputRuntime/<>c__DisplayClass7_0:<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType,UnityEngineInternal.Input.NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType,intptr) (at /home/bokken/build/output/unity/unity/Modules/Input/Private/Input.cs:120)

I also noticed that the debug says that I faced ‘none’ even tho the NPC is right in front of the player.

This is all I can give for now, I am really interested in this and I hope I can get a response soon,

Thank you :pray:

Hello @Vasiko_Vasiko,

Welcome to the Convai Developer Forum!

We sincerely apologize for the issue you’re experiencing.

Thank you for sharing the details and screenshots. Could you let us know your target build platform? Are you using WebGL?

Looking forward to your response! :blush:

Sorry for the delayed response :pray:

The target platform was windows.

Hello @Vasiko_Vasiko,

Unfortunately, we were unable to reproduce this issue on our end.

I recommend the following steps:

  1. Create a new Unity project.
  2. Download and import the latest Convai SDK version 3.2.2 from the Package Manager.

If the issue persists after trying this, feel free to share more details, and we’ll assist you further! :blush:

1 Like

again, sorry for the long delay.
I forgot to add the detail that despite setting the target build to windows I actually open the project on Linux. The linux device is my own PC

With that in mind I tried to open the project on my workplace PC that runs on windows 11 using Unity 6000.0.23f1 but it still produce the same errors mentioned before.

But for some reason the project opens normally after I tried remaking the project in Unity 2022.3.22f1 (still on the win 11 PC).

For now I will proceed with this setup. as for Unity 6 & Linux problem…
I have no idea but can you probably look into it? I definitely can’t open this project outside of the office everytime I need to update it.

thank you.

Unity 6 works fine on Windows 11 and we have not been able to reproduce this issue. Additionally, we have customers successfully using it without problems.

For Linux-related issues and other gRPC concerns, fixes are expected in our next major update.

Thank you for your patience!