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

Bug No WebGL build with non-ASCII path character (was: Bizarre WebGL building error...?)

Discussion in 'WebGL' started by ivank, Nov 1, 2022.

  1. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    97
    I run into rather strange problem - after upgrading my - quite simple - WebGL2 project from Unity 2022.2 Beta10 to Beta12, the building process ends unsuccessfully with the error (see below).

    What's kind of funny it mentions drive D, which is not on my comp... (and the whole project was developed locally). In Editor everything works fine...
    It also mentions some Unicode problems(?) - I use some Unicode characters in the text inside the UI elements, but even when they are removed, the errors do not go away.

    I believe some tweaking with manifest files (?) or deleting some directories could help - could anybody from you, certainly more experienced, provide any hints?
    Advice would be extremally appreciated... :)

    Code (CSharp):
    1. Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
    2. Exception in thread Thread-1:
    3. Traceback (most recent call last):
    4.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\threading.py", line 926, in _bootstrap_inner
    5.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\threading.py", line 870, in run
    6.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 1238, in _readerthread
    7.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\cp1250.py", line 23, in decode
    8. UnicodeDecodeError: 'charmap' codec can't decode byte 0x88 in position 39: character maps to <undefined>
    9.  
    10. Exception in thread Thread-2:
    11. Traceback (most recent call last):
    12.  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\threading.py", line 926, in _bootstrap_inner
    13.  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\threading.py", line 870, in run
    14.  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 1238, in _readerthread
    15.  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\cp1250.py", line 23, in decode
    16. UnicodeDecodeError: 'charmap' codec can't decode byte 0x88 in position 39: character maps to <undefined>
    17.  
    18. Traceback (most recent call last):
    19.   File "C:\Program Files\Unity\Hub\Editor\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\\emcc.py", line 3982, in <module>
    20.     sys.exit(main(sys.argv))
    21.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
    22.   File "C:\Program Files\Unity\Hub\Editor\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\\emcc.py", line 3975, in main
    23.     ret = run(args)
    24.   File "C:\Program Files\Unity\Hub\Editor\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\\emcc.py", line 1168, in run
    25.     phase_calculate_system_libraries(state, linker_arguments, linker_inputs, newargs)
    26.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
    27.   File "C:\Program Files\Unity\Hub\Editor\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\\emcc.py", line 2697, in phase_calculate_system_libraries
    28.     extra_files_to_link += system_libs.calculate(all_linker_inputs, newargs, forced=state.forced_stdlibs)
    29.   File "C:\Program Files\Unity\Hub\Editor\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\system_libs.py", line 1874, in calculate
    30.     handle_reverse_deps(input_files)
    31.   File "C:\Program Files\Unity\Hub\Editor\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\system_libs.py", line 1718, in handle_reverse_deps
    32.     symbolses = building.llvm_nm_multiple([os.path.abspath(t) for t in input_files])
    33.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
    34.   File "C:\Program Files\Unity\Hub\Editor\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\building.py", line 177, in llvm_nm_multiple
    35.     results = run_process(cmd, stdout=PIPE, stderr=PIPE, check=False)
    36.   File "C:\Program Files\Unity\Hub\Editor\2022.2.0b13\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 106, in run_process
    37.     ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
    38.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 474, in run
    39.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 939, in communicate
    40.   File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 1288, in _communicate
    41. IndexError: list index out of range
     
  2. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    233
    This error you're seeing is due to an Emscripten regression related to non-ASCII characters in path names that the Emscripten devs are aware of:
    https://github.com/emscripten-core/emscripten/issues/17817

    Does your path include such characters? and if you've removed them, could you try deleting the Library folder and rebuilding?
     
    ivank likes this.
  3. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    97
    Thanks @unityruba for your valuable and quick help - after changing the path per your advice and removing the Library, the project builds ok!
    However, fyi, after that, I have encountered perhaps new quite annoying 2022.2b13 bug described in my new post here - UI toolkit buttons in WebGL build not reacting to mouse, while working fine in Editor (and working fine both in Editor and WebGL build in 2022.1)
     
  4. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    97
    Just a note for @unityruba - the regression causing that it is impossible to do a WebGL build (related to non-ASCII characters in path) persists even in the most recent 2022.2.0f1.

    On the other hand, the bug regarding malfunctioning UI toolkit buttons in WebGL (see the message above) has been fixed there.