When things go wrong
These errors can be ignored as long as the build using emcc succeeds.
- Set environment variable
Set environment variables
1. Open "Windows Settings" and enter "environment variables" in the search field. Click on the search result for "Edit Environment Variables". ![envvar0](/assets/img/building/trouble-shooting/envvar0.png) 1. A window titled "Environment Variables" will appear. Click "New (_N_)...". ![envvar1](/assets/img/building/trouble-shooting/envvar1.png) 1. A window titled "Edit user environment variables" will be displayed. Enter "PYTHONUTF8" (single-byte alphabetic characters, lowercase letters are not allowed) for the variable name and "1" (single-byte number) for the variable value. ![envvar2](/assets/img/building/trouble-shooting/envvar2.png)
Build error with Emscripten ports¶
cache:INFO: generating port: libz.a... (this will be cached in "C:\...\cache\sysroot\lib\wasm32-emscripten\libz.a" for subsequent builds) shared : error : C:\...\cache\wasm\ports-builds\zlib\adler32.c: No such file or directory ("C:\...\cache\wasm\ports-builds\zlib\adler32.c" was expected to be an input file, based on the commandline arguments provided) shared : error : C:\...\cache\wasm\ports-builds\zlib\compress.c.c: No such file or directory ("C:\...\cache\wasm\ports-builds\zlib\compress.c.c" was expected to be an input file, based on the commandline arguments provided) shared : error : C:\...\cache\wasm\ports-builds\zlib\deflate.c: No such file or directory ("C:\...\cache\wasm\ports-builds\zlib\deflate.c" was expected to be an input file, based on the commandline arguments provided) ... system_libs : error : a problem occurred when using an emscripten-ports library. try to run `emcc --clear-ports` and then run this command again
Open the folder
%EMSDK%/upstream/emscripten/cache/portsin Explorer and expand zlib.zip on the spot.
Extract Zip File
Add the folder
%EMSDK%/upstream/emscripten/cacheto your antivirus software's scan exclusion folders.
Build error when generating .tlog¶
- Build the project again.
- This phenomenon always occurs on the first build.
I get the warning Asyncify Addlist Contained a Non-matching Pattern¶
- This warning is intentional.
Gamepad State is null¶
- Serve WebGL apps over a secure context (https://).
A message box of -1 is displayed¶
- Please enable debug build
- Error messages are optimized away in release builds.