[SOLVED] WebGL builds error when signing, even from a clean project

This all started when testing a webgl build in a game that is quite far along in development where webGL builds worked fine previously.

Now whenever I try to connect to the game using authentication kit I have a pop up error in the browser which reads:

An error occurred in the Unity content in this page. See your browser Javascript console for more info. The error was: TypeError cannot read properties of undefined (reading ‘length’) at lengthBytes at UTF8…’.

I’ve tried creating a new clean project to test AuthenticationKit on it’s own by running the Introduction scene (MacOS, moralisweb3sdk_v1_2_10, unity 2020.3.4 & 2021.3.4), it still doesn’t work and it should be easy for you to recreate the error as far as I can tell.

It would be great to get some support on this and we’ve had to halt development on our game until we know this can be resolved.

Many thanks

Can you follow the steps here in a new project. Have you tried another browser? Otherwise try those steps in a slightly older game kit version e.g. 1.2.9.

Also make sure your server is awake. If you haven’t updated it in a while, be sure to do so (from Moralis admin page > refresh icon).

Hey @alex I’ve already tried following those steps. Also the same problem occurred using 1.2.1 which is a lower version.

Would it be possible to submit a barebones project with just the authkit working please? This should give me the building block I need to get things working.

Thanks again

Sure - what files/folders from the Unity project would you need? Everything except Library/Logs/UserSettings?

Yes please, that would be great if possible

I have uploaded it here.

Game kit 1.2.10 and Unity editor 2021.3.4

Thanks man, appreciated :+1:

Hey @alex Just wanted to let you know that this worked. Thanks very much for posting