Search Unity

WebGL Stuck at 90% loading...

Discussion in 'Web' started by ypfurmingo1, May 23, 2018.

  1. anthony_b_

    anthony_b_

    Unity Technologies

    Joined:
    Oct 27, 2020
    Posts:
    24
    Following on from jukka_j's suggestion:
    Does creating a new, empty Unity project in 2020 with a compressed build output work with the "Build and Run" build option in Unity?
     
  2. MaazBaig

    MaazBaig

    Joined:
    May 17, 2013
    Posts:
    38
    @jukka_j Any updates regarding this issue?

    Thank you in advance for all the help :)
     
  3. Cec

    Cec

    Joined:
    Apr 7, 2014
    Posts:
    92
    Curiously, when building in development mode, the files in Build folder are named : XXX.data, XXX.framework, XXX.wasm. But in production build, the files are named : XXX.data.unityweb, XXX.framework.unityweb, XXX.wasm.unityweb.
    For me using the right html/php file (which use the right files names) was the solution to the freezing at 90% issue.
     
  4. X3n0n3x

    X3n0n3x

    Joined:
    Mar 21, 2021
    Posts:
    7
    Hello, I am relatively new at Unity and have been encountering this same "stuck at 90% loading issue" on most of my projects. (Using Google Chrome on Windows 10)

    Following the advice this thread, I have tried disabling compression when building, and also tried setting the Max Size for all my textures to 256, however the issue still happens. I am confused since these are mostly simple 2D games and uploaded to Unity Play, which I had assumed would be compatible.

    As examples, these 3 projects get stuck at 90% on Unity Play:

    The last one is especially confusing as it is mostly just a Unity-supplied microgame prototype with a few small changes made by me, yet still has this issue.

    However, these 2 projects do get past the 90% loading issue:

    Oddly, some of these exact same projects DO work when uploaded to different website, such as itch.io:

    I'm not really sure what my next step should be in figuring out this issue.
     
  5. Alexander-Fedoseev

    Alexander-Fedoseev

    Joined:
    Jan 1, 2015
    Posts:
    4
    For those who nothing helped... I've tried all combinations of settings on Unity 2020.3 using local server or building directly. My game was running only if Development build was checked.

    But speaking about release build I finally found a solution! Even with default settings:
    Снимок экрана 2021-06-18 в 15.25.30.png

    You just simply need to switch Code Optimization to Speed value:
    upload_2021-6-18_15-27-24.png

    For some reason after I've override textures compression the default Code Optimization == Size become lead to stucked at 90% release build.

    Снимок экрана 2021-06-18 в 15.28.17.png
     
  6. tomm1st

    tomm1st

    Joined:
    Jun 10, 2021
    Posts:
    1
    That was the answer for me also; Gzip compression and Decompression Fallback checked. Thank you! My version of Unity: 2020.3.11f1.
     
  7. X3n0n3x

    X3n0n3x

    Joined:
    Mar 21, 2021
    Posts:
    7
    Thank you very much for posting this! Of course also big thanks to Eden_Shazar for already explaining that much earlier, but I must have missed trying that out.

    Oddly, for me choosing Gzip compression format by itself seems to be working on the projects I was having issues with, whether I have Decompression Fallback checked or not. I've been trying "Disabled" for Compression format for so long now that I hadn't thought to go back and try otherwise.

    Although, in case it makes a difference, I think I've been choosing "Speed" for Code optimization all this time, including when it wasn't working.
     
  8. GhoulishGames

    GhoulishGames

    Joined:
    Sep 10, 2017
    Posts:
    3
    Not sure either as the problem seems predominately when publishing to Unity.Play as I can get my builds past 90% on itch.io the same as you but not on Play despite changing nearly every conceivable setting and testing it. I'm using the absolute latest build 2021.2 b4, and if anything it's getting worse as in the passed disabling compression used to work for me but not now. Time to abandon Unity Play me thinks and just focus on what works.
     
  9. eslamalmohandes

    eslamalmohandes

    Joined:
    Jul 10, 2017
    Posts:
    2
    Thank you bro, this worked for me
     
  10. Karsten

    Karsten

    Joined:
    Apr 8, 2012
    Posts:
    187
    Build and Run option stucks at 90% in Unity 2020.3
     
  11. cuttinged

    cuttinged

    Joined:
    May 12, 2013
    Posts:
    65
    The attached settings finally worked for me. I also reduced the texture resolutions to 256, but I think the settings were more important. I'm using 2020.3.2f1 URP
     

    Attached Files:

  12. scareyut

    scareyut

    Joined:
    Dec 1, 2021
    Posts:
    1
    I'm very new to Unity, and am just trying to do the Unity Essentials tutorial where you create a very simply scene, build it, and publish it to Unity Play. I'm having the same issue that other's describe here. I'm assuming it isn't a server issue, since it's running on Unity Play. I've tried this "Disabling compression in the Unity project settings (player settings - publishing settings - compression format - disabled) does the trick" from other posts in this thread and it does not solve the issue for me. I've tried other settings that have been suggested.

    It goes to 90% pretty quickly and then just hangs. I let it sit there for several hours, and no change. Any suggestions?
     
  13. paxron

    paxron

    Joined:
    Aug 22, 2014
    Posts:
    8
    I have tried all the options in this thread, it loads locally but even on Unity Play it stops loading at 90%. (2021.2.5f1)
     
  14. jsull1

    jsull1

    Joined:
    Apr 3, 2018
    Posts:
    121
    I just had the same issue and fixed it by changing the compression format to disabled, this guy’s video saved me haha
     
  15. nguyen28102000

    nguyen28102000

    Joined:
    Jun 23, 2020
    Posts:
    1
    This works. Thanks a lot. Just enable Decompression fallback and set Compression format to gzip.
     

    Attached Files:

    DrViJ likes this.
  16. Deleted User

    Deleted User

    Guest

    ...I tried building (again, non-development) with Project Settings -> Player -> Publishing Settings -> Compression Format set to Gzip, and again with Brotli compression, in both cases with Decompression Fallback unchecked - both these builds did not load past 90%. Building again with Gzip compression and Decompression Fallback checked seems to have solved the problem, and the game now loads fully and quickly[/QUOTE]

    Exactly that worked in my case - after long time searching
     
  17. theNfan

    theNfan

    Joined:
    Dec 30, 2020
    Posts:
    25
    I also have the problem. The game works fine when started locally in the browser, but on Unity Play it's stuck at 90%.
    Compression or not, fallback or not makes no difference.

    That's from Chromes console:

    Code (JavaScript):
    1. Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
    2. 464526.gif:1 Failed to load resource: the server responded with a status of 451 ()
    3. Project_WebglDetailV2Controller.d891f398f00f06f003b6.bundle.js:1 Uncaught DOMException: Blocked a frame with origin "https://play.unity.com" from accessing a cross-origin frame.
    4.     at https://play-static.unity.com/public/assets/Project/Project_WebglDetailV2Controller.d891f398f00f06f003b6.bundle.js:1:376891
    5. website-search-1.4.js:1 Error: no render target found, search-box requires attachSearchBox to be set
    6.     at website-search-1.4.js:1:674248
    7.     at Af (website-search-1.4.js:1:675057)
    8.     at Array.<anonymous> (website-search-1.4.js:1:678598)
    9.     at Array.e.arr.push (website-search-1.4.js:1:356420)
    10.     at r (website-search-1.4.js:1:356493)
    11.     at website-search-1.4.js:1:679523
    12.     at Array.forEach (<anonymous>)
    13.     at website-search-1.4.js:1:678823
    14.     at HTMLDocument.r (website-search-1.4.js:1:677646)
    15. af @ website-search-1.4.js:1
    16. static.ads-twitter.com/uwt.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
    17. 464526.gif:1 Failed to load resource: the server responded with a status of 451 ()
    18. play-static.unity.com/20220116/webgl/4dde2a96-dae8-4c77-a503-30528c605246/Build/:1 Failed to load resource: the server responded with a status of 404 (Not Found)
    19. blob:https://play.un…959f-041ba321b355:1 Uncaught SyntaxError: Unexpected token '<'
    20. 533b5fc9-1934-425a-85bf-6bd40965b479:2 getGamepad will now require a Permission Policy. Please update your application accordingly. For more information see https://github.com/w3c/gamepad/pull/112
    21. staticInit @ 533b5fc9-1934-425a-85bf-6bd40965b479:2
    22. commons.08649137dea17ef018a6.bundle.js:1 ReferenceError: UnityAsmCode is not defined
    23. at Array.unityFramework (533b5fc9-1934-425a-85bf-6bd40965b479:3:9)
    24.     at WebGL Builds.asm.loader.js:1:6872
    25. (anonymous) @ commons.08649137dea17ef018a6.bundle.js:1
    26. 533b5fc9-1934-425a-85bf-6bd40965b479:3 Uncaught (in promise) ReferenceError: UnityAsmCode is not defined
    27.     at Array.unityFramework (533b5fc9-1934-425a-85bf-6bd40965b479:3:9)
    28.     at WebGL Builds.asm.loader.js:1:6872
    ReferenceError: UnityAsmCode is not defined does not sound good?!

    Edit: Got it to work! Some wild googling brought me to a Japanese tweet which brought me there: https://forum.unity.com/threads/2019-1.597238/#post-4443697

    The solution is to locate the file ProjectSettings.asset and change this line like follows:

    webGLLinkerTarget: 2

    The default was 0 was apparantly means asm, whereas 2 means asm+wasm. Don't ask me what it does though.
    I'm still wondering how this happened. My project is based on the starter files provided here: https://learn.unity.com/tutorial/le...5578eb67df&projectId=5cf96846edbc2a2bcde6d0fc
    Could there me something outdated hidden in there which causes problem with current Unity versions? I'm on 2020.3.26 btw.
     
    Last edited: Jan 16, 2022
  18. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    Issue happens on my builds: tried all the normal settings like decompression failback. Compression gzip brotli disabled data caching disaled enabled - randomly sometimes itll work if i reboot or restart unity sometimes - it seems to always work if i use development build. Very annoying and strange - 2020.3.28f1 - 2021 is worse and throws some null indrect mismatch error- btw standalone version and editor totally fine.
     
  19. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    changed to file name as hashes - gzip with data caching enabled decompression fallback and changed t o code size optimization - dev build disabled - worked this time - will see if it works.
     
  20. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    heads up - so i had some scenes with an _ in it - and it seems like maybe changing that seemed to help out so far
     
  21. Padd_

    Padd_

    Joined:
    Jan 24, 2022
    Posts:
    2
    Same problem trying to upload a project to play.unity.com. Still stuck at 90% after testing all your tricks and even the LTS version.

    Here are the errors I got:

    Code (CSharp):
    1. [UnityCache] 'https://play-static.unity.com/20220304/webgl/8953eb8c-7dcb-4fcb-8ec1-3420bf152643/Build/' request failed with status: 404 Not Found
    2. Unable to load file 'https://play-static.unity.com/20220304/webgl/8953eb8c-7dcb-4fcb-8ec1-3420bf152643/Build/!' Check that the file exists on the remote server.
     
  22. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    Thanks, this worked for me too. Was working on localhost but not once uploaded. (Unity 2020.3.15f2)
     
  23. ChronusR

    ChronusR

    Joined:
    Dec 5, 2021
    Posts:
    1

    This solution worked for me just fine! Unfortunately all other I have read and tried till this solution didn't work at all. Thank you!
     
    DrViJ likes this.
  24. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    160
    I'm glad to be helpful ;)
     
  25. WatTheDeuce

    WatTheDeuce

    Joined:
    Apr 17, 2015
    Posts:
    7
    Any further suggestions for this issue would be appreciated, using 2021.3.3f1. Things I've tried:
    - Disabling compression with and without decompression fallback
    - Set max texture size to 256
    - set webGLLinkerTarget to '2'
    - gzip with and without decompression fallback
    - code optimization for speed
    - code optimization for size
    - build and run from editor
    - development build
     
    Last edited: Jun 19, 2022
  26. CreatorsDev

    CreatorsDev

    Joined:
    Aug 31, 2022
    Posts:
    1
    I have recently uploaded this WebGL build (Music Box) and was facing the same problem.
    However, surprisingly the thing that actually makes my build run was a bit odd because it contradicts the solution that I found all over the unity forums and YouTube videos, that is setting the Compression format to Brotli instead of Disabled under the player settings tab before building the scene.
    Unity editor version: 2021.3.8f1
     
  27. Kyle_ZKY

    Kyle_ZKY

    Joined:
    Mar 19, 2020
    Posts:
    1
    My lifesaver, thanks a lot
     
  28. Pdlfuente

    Pdlfuente

    Joined:
    Sep 20, 2022
    Posts:
    1

    This also did the trick for me: setting compression to Gzip and Decompression Fallback checked
     
  29. roamerfree

    roamerfree

    Joined:
    Apr 2, 2022
    Posts:
    6
    This worked for me! Thanks!
     
  30. phila666

    phila666

    Joined:
    Jul 30, 2013
    Posts:
    9
    I had the same 90% problem when trying to run a minimal WebGL scene (cube, light, camera) from Unity 2021.3.11, which ran fine on my local host but not from a remote machine. None of the above fixes helped, and it was likely server configuration. I found that placing the attached file in the <Application>/Build folder fixed the problem for me. (remove .txt extension, added for uploading) This modifies the server (in my case IIS) configuration with a few needed mime types.

    Hope this helps someone still having this problem. I'm not sure exactly where I found this config file online but it was very helpful so thanks to whomever!
     

    Attached Files:

  31. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    We try to improve Unity's loader to show those red or yellow banners whenever web server configuration is not right, so that people would have as few "silent failures" with progress bar stuck at loading. If you do have such situations and the web URL is public that you can share, I'd be interested in seeing what the mismatch is exactly that Unity loader is not able to diagnose. (even if the root fix would be on the web server side)
     
  32. phila666

    phila666

    Joined:
    Jul 30, 2013
    Posts:
    9
    Although I can't make the URL public, I can tell you that the .data and .symbols.json were not configured on the IIS site, while .wasm was. I could not configure .symbols.json through the ISS management app because it would not accept an extension with an embedded '.'
     
  33. happy_singh_unity

    happy_singh_unity

    Joined:
    Mar 5, 2024
    Posts:
    1
    getting same issue stuck at 90% after hosting it on hostinger. i have tried every build settings - compression disabled, brotli, gzip. but nothing works for me. even though i have a different project i exported it in gzip compression it is working.
    by working means not stucking at 90% loading on hostinger.
    note - every build setting is working on my local host.
    error from console -[UnityCache] Failed to load 'http://tecnod8.me:3001/Build/brotli.framework.js.unityweb' from indexedDB cache due to the error: Error: Could not connect to cache: Cache API is not supported.

    i confirm that my other project is running smoothly with same export settings even after hosting.
     
  34. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Meaning the other project using the Brotli compression?