Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Possible WebGL Build Bug

Discussion in '2021.2 Beta' started by TheoTowers, May 19, 2021.

  1. TheoTowers

    TheoTowers

    Joined:
    May 8, 2013
    Posts:
    19
    Hey all!

    Before I package up my project and officially try to report it as a bug, I figured I'd just do a quick sanity test and show you the error first.

    This is from me trying to build using default WebGL settings. It appears to be searching the Project directory for UnityLoader.js.

    upload_2021-5-18_17-54-40.png

    I thought UnityLoader.js is supposed to be generated upon building, so I'm a bit confused.

    If I create an empty text file called "UnityLoader.js" and place it in the folder it's looking for, then the error no longer happens, but instead I get an error saying it's looking for "uglify-js." When I place ugilify-js in there, I get another error saying it's looking for ".../tools/tty"

    It seems like the WebGL module is somehow not configured properly and is looking for a bunch of js and python libs all in the wrong places. Could it be something I've done wrong? Should it be logged as a bug?
     
  2. TheoTowers

    TheoTowers

    Joined:
    May 8, 2013
    Posts:
    19
    Forgot to mention this is in 2021.2.0a17
     
  3. Rallix

    Rallix

    Joined:
    Mar 17, 2016
    Posts:
    139
    Hi –
    I'm experiencing the same thing (already reported as Case 1336357). It does this with a completely empty project as well, and I have a suspicion the build throws these errors when your project folder is on a different drive than the Unity installation.

    I have Unity on the D: drive – if I build a project "D:/New Unity Project", it works; but building the same exact thing elsewhere, e.g. "E:/New Unity Project" or "C:/…/Desktop/New Unity Project" fails.
    (Edit: After getting past these errors, it also seems to cause a similar problem when you use a jslib in the Plugins folder.)

    Building for a different platform (I tried PC/Windows) in all these places works fine.
     
    Last edited: May 19, 2021
  4. TheoTowers

    TheoTowers

    Joined:
    May 8, 2013
    Posts:
    19
    It seems your hunch was absolutely correct @Rallix !

    After moving my project to C:/ (the same drive that my Unity installation is on), the build goes off without a hitch. The only problem is it's now outside of my Perforce workspace directory:oops:
     
  5. TheoTowers

    TheoTowers

    Joined:
    May 8, 2013
    Posts:
    19
    @Rallix Are you sure that's the correct case number? I tried looking it up but nothing came up.
     
  6. Rallix

    Rallix

    Joined:
    Mar 17, 2016
    Posts:
    139
    Hi @TheoTowers – sorry, I forgot to post the update here. It is the correct case number, and it's on the public issue tracker now:
    https://issuetracker.unity3d.com/product/unity/issues/guid/1336357

    I don't think the title they chose summarizes the problem very well; it's just a custom package I sent as a repro project. The public description isn't very detailed, but on FogBugz, I mentioned everything I said here and linked this thread, too.
    Essentially it's these two issues (regressions) with similar error messages:
    • WebGL build fails when the project is on a different drive than the Unity installation
      Code (CSharp):
      1. Builds\Sample\Build\Sample.loader.js: ENOENT: no such file or directory, open 'F:\Unity\Wolfsbane\UnityLoader\UnityLoader.js'
      2. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    • WebGL build fails when the project contains a jslib plugin
      Code (CSharp):
      1. Internal compiler error in src/compiler.js! Please raise a bug report at
      2. https://github.com/kripken/emscripten/issues/ with a log of the build and
      3. the input files used to run. Exception message: "Error: ENOENT: no such file
      4. or directory, open 'F:\Unity\Wolfsbane\Packages\com.custom.package\Runtime\
      5. Plugins\WebGL\customPlugin.jslib'" | Error: ENOENT: no such file or
      6. directory, open 'F:\Unity\Wolfsbane\Packages\com.custom.package\Runtime\
      7. Plugins\WebGL\customPlugin.jslib'
     
  7. TheoTowers

    TheoTowers

    Joined:
    May 8, 2013
    Posts:
    19
    Thanks @Rallix!! Much appreciated!!

    I think I'm maybe not using the issue tracker properly because even though your direct link works, I still can't find it by searching the number. Sorry, I'm kind of new to it!
     
  8. Rallix

    Rallix

    Joined:
    Mar 17, 2016
    Posts:
    139
    Hi @TheoTowers,
    no news yet; I just noticed something similar (or the same) also seems to be reported as Case 1337929 in case you want to follow that issue as well.

    Edit:
    The QA Team replied that this is an internally-tracked, known issue “resulting from changes to the new incremental build system that have been resolved”.
     
    Last edited: Jun 5, 2021
  9. TheoTowers

    TheoTowers

    Joined:
    May 8, 2013
    Posts:
    19
    @Rallix Thanks for the update! Glad to hear that it seems to be getting fixed