Building URP Template to WebGL fails (due to Analytics Library)

In 2021.2.0b7, new URP project from template, build for WebGL fails with this:

Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
emcc:WARNING: --llvm-lto ignored when using llvm backend
emcc2: error: '--js-library': file not found: 'Packages/com.unity.analytics/Plugins/WindowUtil.jslib'

The solution is to open Package Manager and remove the Analytics Library (currently 3.5.3).

Hi @adamgolden ,

This seems to be a known issue: Unity Issue Tracker - Building a project for WebGL throws build errors when having the Analytics Library package installed

Fix should be in b9 (unless something unexpected prevents the fix from landing).

1 Like

Unfortunately the fix didn’t make it into b9 and has yet to land.

1 Like