PlayerPrefsException in WebGL builds

This error is reported in our WebGL game:

I looked it up, and found this page in the docs: Unity - Scripting API: PlayerPrefsException

This is not a web player build. This is a WebGL build.

  • What is the reason for this exception? is it because of the 1 mb limit ?
  • Is th 1 mb limit per key, or for the whole PlayerPrefs file ?
  • The error message should be improved to tell what’s going on

bumpy bump …

yes, you are right.The page is webplayer-specific though the same exception may be thrown on webgl too. We should definitely update the documentation page and the error message.

…and yes, there is a default 1mb limit, which it looks like you are exceeding.

1 Like

Just to understand this issue better - does the 1mb limit apply to a single WebGL game, or to all games on the same machine?

We are not writing anything close to 1mb but still many of our users experience this issue for some reason. Are there any other scenarios where writing to PlayerPrefs will fail with this exception on WebGL ?

the 1mb limit is url-specific. do you have any more information regarding the users experiencing the problem, do you know which OS/Browser they are using ?
do you have a url we could check ?

Here’s the URL for our game Coin Master.

Regarding OS / Browser - i have only partial information (major versions). I could mostly see these versions:

Windows / Firefox 47
Windows / Chrome 51
Windows / Chrome 49
Windows / Microsoft Edge 13.10586

BTW: is there any way we can report the exact browser version from JS ? currently we only have the major version as you can see.