TLDR: With almost every new version our game website breaks seeminly due to a caching problem with the assembly files. A EmptyCacheHardReload fixes this but this is not something normal users would do.
What can we do to avoid the build from using partially cached code?
Our game is currently live but has a nasty problem (which noone else seems to have according to hours spent on google) where after each new build + upload the website will throw random exceptions while trying to load the game.
Refreshing the page and restarting the browser does not work, the only way to get around this is to do an âEmpty cache and Hard Reloadâ (which works at least for Chrome), after which the exceptions magically disappear and the game loads up fine.
We use a jenkins build process which uploads the files to our webserver in its own, build-date separated, folder, where the DNS resolves the current version as the last serialized version. This happens by un-linking the old version and linking the new one.
The exceptions thrown can be anything ranging from:
-
too much recursion
-
range error - maximum call stack size exceeded
-
index out of range
-
uncaught exception: abort(âAssertion failed: undefinedâ)
-
Uncaught abort(192)
As along with some or no stacktrace. The errors disappear after the cache-clearing hard reload so these problems are not caused by the programmatic side of the project.
In case relevant, here are some settings used when building
Unity3D
- v5.6.3p1
Player Settings - Other Settings:
- Strip Engine Code: True
- Logging: ScriptOnly, Full Exception
Player Settings - Publishing Settings:
- Enable Exceptions: Explicitly Thrown Exceptions Only
- Compression Format: Gzip
- Name Files As Hashes: False
- Data Caching: True
- Debug Symbols: False
- WebAssembly: False