# WebGL error

**URL:** <https://forum.heroiclabs.com/t/webgl-error/3987>\
**Category:** Runtime Framework\
**Tags:** sdk-unity\
**Created:** [June 23, 2023, 4:03pm UTC](https://forum.heroiclabs.com/t/webgl-error/3987 "2023-06-23T16:03:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/justin/32/1702_2.png) [@justin](https://forum.heroiclabs.com/u/justin)\
**Post date:** [June 23, 2023, 4:03pm UTC](https://forum.heroiclabs.com/t/webgl-error/3987/1 "2023-06-23T16:03:17Z")

</div>

getting this error Pointer\_stringify(ptrToSomeCString) when running in WebGL.

---

<div class="post-metadata">

**Author:** ![RimuruDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/rimurudev/32/1960_2.png) [@RimuruDev](https://forum.heroiclabs.com/u/RimuruDev)\
**Post date:** [December 22, 2023, 4:01pm UTC](https://forum.heroiclabs.com/t/webgl-error/3987/2 "2023-12-22T16:01:52Z")

</div>

# Ohayo! RimuruDev here 😃

The warning you’re encountering is related to the deprecated use of the `Pointer_stringify` function in Unity WebGL. This warning should not prevent your game from working by default, but it does indicate that a deprecated function is being used in Unity scripts, which will be removed in future Unity versions.

The errors look like this:

```auto
Pointer_stringify(ptrToSomeCString)

```

or

```auto
The JavaScript function 'Pointer_stringify(ptrToSomeCString)' is obsoleted and will be removed in a future Unity version. Please call 'UTF8ToString(ptrToSomeCString)' instead. 

```

## **Here’s how you can fix it** :

**1. Updating Unity code** :

- Find all occurrences of `Pointer_stringify` in your Unity project’s code.
- Replace them with `UTF8ToString`, as recommended in the error message.

**2. Updating plugins or assets** :

- If this warning arises from external assets or plugins, check for updates that might resolve this warning.

* * *

### But how do you find where you used Pointer\_stringify? 🤔

**And if you didn’t use Pointer\_stringify, then how to determine where it is currently used? 🤔**

→ First - open the IDE with your project solution. Or click as shown in the picture:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/8/831369cb439fd63827f522156b15191e081a9b25.png)

→ Next are examples on Rider but it works similarly in any IDE, although the hotkeys may differ. My IDE is Rider with the IntelliJ Keymap:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/a/a5a20b12560fa606375e67a2dc2a57ea94cf119a.png)

→ Press the `ctrl + shift + f` combination, and a window will appear where you need to enter the name of the old function as shown below:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/4/40c7eb0369a8284e1e61fb6b7e632a9c6db8bf39.png)

→ Click on the shown options and replace Pointer\_stringify with UTF8ToString as shown in the screenshot. I highlighted the old function name Pointer\_stringify and simply pasted UTF8ToString in its place.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/8/8f7ac16bdcdb28365ca96d5dfc3605b52a7adf24.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/6/6e80746fe1ceca61ad5ee1dd08ec36ba4d6990c4.png)

* * *

In my case, since I never used Pointer\_stringify anywhere, Rider indicated that the only calls are found in the file `UnityWebSocketBridge.jslib`, which is a JavaScript library used in Unity WebGL projects for interacting with web sockets.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/4/4e13e1e40aecf07cf1e71a5b86204373ce667cdf.png)

I also made changes to it. And the error disappeared.

Once you’ve replaced all calls to Pointer\_stringify functions with UTF8ToString in your project, save the project and rebuild it.

That’s it! This should help you solve your problem.

I translated this text from Russian to English. My English isn’t great, but I hope at least the screenshots make it clear how to solve your problem.

❤ Wishing you all the best ❤

---

<div class="post-metadata">

**Author:** ![Dineshdev005](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/dineshdev005/32/2434_2.png) [@Dineshdev005](https://forum.heroiclabs.com/u/Dineshdev005)\
**Post date:** [January 6, 2025, 5:10am UTC](https://forum.heroiclabs.com/t/webgl-error/3987/3 "2025-01-06T05:10:49Z")

</div>

Hi @RimuruDev , I got this issue in my webgl build while connecting socket - ReferenceError: Pointer\_stringify is not defined at \_NKCreateSocket .

code : await \_Socket.ConnectAsync(\_Session, appearOnline, connectTimeout, langTag);
