FileNotFoundException: Could not find file build.asm.js
I've been trying to create a WebGL build for a test game, and everytime I do so the error log keeps bringing this up:
FileNotFoundException: Could not find file "D:\Stuff\Unity
Projects\Solar System\Temp\StagingArea\Data\Native\build.asm.js". System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:305) System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) System.IO.File.OpenRead (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363) System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:167) System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding) (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string,System.Text.Encoding) System.IO.File.ReadAllText (System.String path, System.Text.Encoding encoding) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:587) System.IO.File.ReadAllText (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:582) UnityEditor.WebGL.CodeAnalysisUtils.ReplaceDuplicates (System.String builtCodePath, Int32 interations) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/CodeAnalysisUtils.cs:145) UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:589) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Answer by bb2jake · Dec 24, 2016 at 11:12 PM
I had the same error. Deleting the project settings, temp and library folders fixed the problem for me.
I only had to close Unity and delete the Library folder, it worked afterwards
Answer by sinagod · Apr 02, 2017 at 09:54 AM
Yep, save your scene and project, then in file explorer, delete the settings, temp and library folders. Then reopen the scene. Go to file/build settings, choose WebGL, choose folder to save build in and click the build button. Wait, then wait some more. Be paitent, then wait some more. You'll eventually see converting C++, then wait some more. Too my awesome rig several minutes to complete. Patience is the virtue in this case.
$$anonymous$$ine didn't work. It just opened the project empty. All the work gone with just the Assets to spare :(
Answer by Micha93 · Feb 01, 2018 at 07:23 PM
After buildng the game I got following error:
https://stackoverflow.com/questions/43968478/error-at-webgl-uncaught-abort-130
Answer by NightKotGames · Nov 05, 2021 at 11:12 AM
I suspect that the lack and / or fragmentation of RAM is to blame. When using RAMmanager, the situation has improved, but not 100 percent. I have 8 GB Ram. The project weighs 1.32 GB. When compiling, if the free and defragmented RAM is more than 4.8 GB, we can most likely say that the compilation will be successful. If there is less free memory (for example, 4.5 GB), compilation will definitely fail.
We have real "dance with shaman tambourines" in stock. In general, this is a real mockery on the part of Unity. For example, I still cannot afford a powerful computer with 32 GB of RAM, and what should I do now?
Your answer
Follow this Question
Related Questions
HELPPPPP Please :( CommandInvolkationFailure 0 Answers
What are the possible reasons behind my Build Failing? 0 Answers
Webgl build win32 exception 0 Answers
билд webgl 0 Answers
URGENT! I can't build with Unity 1 Answer