Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

QuotaExceeded error

Discussion in 'WebGL' started by witcher101, May 10, 2016.

  1. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    I am getting this error when trying to run my game. Any1 know why this error comes and way to rectify it.
     
  2. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    I have some players reporting they're now getting this as well after an update (Unity version didn't change) - they're using FF/Win7
     
  3. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    We've run into this as well - it's related to caching/storage; I'm not 100% sure how we fixed it - but it did eventually go away on it's own after a while.
     
  4. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    After digging into this a little more my understanding is that websites get 50mb of caching allowed, if you go over that then the expected behavior is to display an error and give the option to increase the storage quota. As far as I can tell from my players they're not getting the option to expand local storage quota which (i guess?) is a browser bug rather than anything Unity related. 'Fixes' are to get the user to force clear their cache or to manually set it to a higher limit.
     
  5. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    Update on this issue - QuotaExceededError can also be thrown by use of Indexed DB - http://stackoverflow.com/questions/...-for-the-indexed-db-on-googles-chrome-browser which is where Unity will try to cache files if 'data caching' is toggled on in publishing settings

    tl;dr - error will get thrown if trying to use ~6% or more of the users available hard disc space.

    Given that this op failing (data caching to indexedDB) I feel like Unity should be able to handle the error rather than the game failing to run. Would be good to get confirmation that this is really what's happening from Unity folks!
     
  6. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Quota limit is a bit tricky because the rules for it vary across different browsers and browser versions. If the access to the indexedDB occurs during initial loading process when the .data file is being cached, then it might be indeed possible to recover from the failure, however if access occurs during LoadFromCacheOrDownload, then recovery might become nontrivial. Personally I have never encountered this error message myself. If this error occurs quite often in your specific use case, do you think it would be possible to find a reliable way reproduce it?
     
  7. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    Thanks alex ... I've never seen it personally either - I'm getting this bug report from a few players out of thousands. The players that it happens for it happens every single time they try to open the game.

    It sounds like in order to repro you'd need to fill up your HD with *stuff* until there was very little space left to allow the data caching to work. I spent some time trying to repro this and was completely unable to. Mystery remains.
     
  8. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    583
    For info, it happen when you use "data caching" in your build. You can reproduce it easily in firefox. In your firefox options, set "History" to "Do not save history" and you get :

    And a popup javascript error. But if you click it, the game run fine.

    We got the same message in chrome, but without the javascript popup error.

    It will be fine to have a way to remove this error, because some players will close the page just because of this javascript error.
     
  9. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    512
    I just started getting this pop-up error only in Firefox, when ironically, I was working on reducing and optimizing filesize. My Release folder was 9.5mb, and then despite shrinking to 7.4mb, the error was appearing.

    It appears Aurigan is right about disk space:
    I have less than 6% of free space.... Now as I write this, I am deleting some large files I no longer need ...

    ... now have 8% free disk space. Let's try this again...

    Whatta ya know, the error is gone!