Hello,
I’m currently trying to use the Convai SDK with a WebGL Unity build, but I’m encountering a critical error in the browser console: Uncaught ReferenceError: ConvaiClient is not defined.
It seems like the WebGL build is expecting a JavaScript module or interop function that isn’t available. Could you please confirm whether the Convai SDK officially supports WebGL, and if so, what additional setup (e.g., JS libraries or manual scripts) is required to make it work properly?
Update: My issues has been resolved actually. I just had to remove another scene that I had in the “Scenes in build”
Hello, I’m facing the same error. Whenever I send text to the AI NPC, the game lags and I get the same error in then console:
Uncaught ReferenceError: ConvaiClient is not defined
An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it.
I have followed this tutorial (Building for WebGL), and I’m only building the demo convai scene without any changes. I’m using Unity 2022.3.11f1, and developing/building from a Mac.
Actually, today I’m running into the same issue again, despite having my demo convai scene as the only one in “Scenes in build”. I tested multiple wifi networks, and my issue persists. I get the same errors as before:
[Warning][Character]: [ConvaiGRPCWebAPI] UpdateActionConfig called, but no active NPC.
Uncaught ReferenceError: ConvaiClient is not defined
An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it.
Yes, I tried to add a custom character to the scene, then it broke. Then I went back to my previous working commit (with the unchanged demo scene) and it didn’t work as well.
I did some further testing, and now Convai works fine even with the custom character on localhost when I “Build and run”. But when I publish the game, Convai doesn’t work even on the basic characters, and I get the errors I mentioned above.
[Warning][Character]: [ConvaiGRPCWebAPI] UpdateActionConfig called, but no active NPC.
Uncaught ReferenceError: ConvaiClient is not defined
An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it.
May I also ask, how do I enable Full With Stacktrace for my published build? I’ve only found instructions on how to do it for the local build (which isn’t facing any issues at the moment).