Unity Build Keeps Failing

Hi there,

Hoping someone can help before I go mad. I keep failing on the final step. I just want to be able to build my game and upload it but I’m having major issues.

After clicking Build and Run, the progress bar moves forward until it stops at “Compile WebAssembly Module” for a few minutes. After than, it throws up some errors (below) and doesn’t complete.

To further expand on the errors:

FileNotFoundException: C:\Users\kbristow\Documents\Repos\Unity2D\Text101\Text101\Temp\StagingArea\Data\linkresult_wasm\build.temp.asm.js does not exist
System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at :0)
UnityEditor.FileUtil.UnityFileCopy (System.String from, System.String to, System.Boolean overwrite) (at :0)
UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, System.Boolean overwrite, System.Func`2[T,TResult] includeCallback, System.Boolean recursive) (at :0)
UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, System.Boolean overwrite, System.String regExExcludeFilter, System.Boolean recursive) (at :0)
UnityEditor.FileUtil.CopyDirectoryRecursiveFiltered (System.String source, System.String target, System.Boolean overwrite, System.String regExExcludeFilter) (at :0)
UnityEditor.FileUtil.CopyDirectoryRecursive (System.String source, System.String target, System.Boolean overwrite, System.Boolean ignoreMeta) (at :0)
UnityEditor.FileUtil.CopyDirectoryRecursive (System.String source, System.String target) (at :0)
UnityEditor.WebGL.WebGlBuildPostprocessor.EmscriptenLink (UnityEditor.Modules.BuildPostProcessArgs args, System.Boolean wasmBuild, System.String sourceFiles, System.String sourceFilesHash) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:455)
UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:495)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:930)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00275] in :0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


Steps I have tried (in order):

  1. Building to new path
  2. Build without run
  3. Folder name in only English letters - no spaces or special characters
  4. Restarting Unity
  5. Restarting Computer
  6. Deleting and Reinstalling Unity (when I did this, the error changed from FileNotFoundException build.c to FileNotFoundException build.temp.asm.js). Build.c exists now but it appears that not all the files are getting built and then the error throws up. I navigated to said folder and could see new files getting made
  7. Installing and using Alpha Version of latest update instead of current version

I’m not sure what else to try at this point. I tried downloading Rick’s project to see if I could build that but when I tried to update the files it just didn’t even load anything in the scene.

Hi,

According to the error message, the build path seems to be inside the project folder. This is not allowed. Create a new folder outside your project folder.

Hi Nina,

When I’m in Build Settings, I set the download location as my downloads folder and not inside the project folder. Is there any reason it would still try path into the project folder?

Installing and using Alpha Version of latest update instead of current version

Maybe that’s the problem. Alpha versions are full of bugs and should not be used for actual projects. Use a stable version meaning a version with an “f” in its version number.

100%. I was using the most stable version first when this issue came up. Installing the alpha version was just the last step I tried to resolve it. But I’ve been getting the exact same error the whole time - before and after trying Alpha version

Don’t import your project into different versions of Unity. Every time you do that, something gets changed, and it might be that your project eventually breaks.

Launch a stable version of Unity with administrator rights. Make sure no firewall or an antivirus program are blocking Unity. Open your project in Unity. Make sure there are no error messages in the console. Uninstall all packages that you do not need in your project, i.e. Multiplayer, Analytics, etc.

Restart Unity.

Then build your game to a folder that is definitely not a Unity folder and on your harddrive, and where you have full writing and reading rights.

Does an error message appear?

This topic was automatically closed after 14 days. New replies are no longer allowed.

Privacy & Terms