Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unable to build from command line

Discussion in 'Editor & General Support' started by Kairus101, Aug 20, 2019.

  1. Kairus101

    Kairus101

    Joined:
    Oct 8, 2016
    Posts:
    2
    Hey - I'm trying to run a webGL build from command line - which was working in 2018.3.1f1, but we can't seem to get it working in 2019.2.1f1. Building and running webGL from the editor works just fine.

    It seems to build everything into the TEMP output folder, before erroring out suddenly. Looking online I don't think anyone has a log quite like it, the lines I believe are responsible are
    DisplayProgressbar: Files
    Uploading Crash Report
    Exception: Invalid build file path: /Users/odessa/.jenkins/workspace/Gundar.ioWebGL/UnityClients/Gundar.io/Temp/StagingArea/Data/Output/Build.wasm.code.unityweb

    Which to me is implying DisplayProgressbar: Files is causing the crash. At the time of the logs above, the .unityweb definitely exists, until the unity build finishes - verified by a script checking that specific location.

    Log is attached - any thoughts?
     

    Attached Files:

  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    How do you actually kick off the command line build? It's unlikely, but I sometimes forget to update my command line build script with the correct version of Unity. So, once I tried to use Unity 2018.1 to perform a command line build of a Unity 2018.2 project after migrating, and it led to confusing errors.

    Have you tried deleting every from the build directory? I've had at least one issue once where some cruft in the build directory seemed to have caused a problem when building under a newer version of Unity.

    Are you sure that the build options you're specifying in your command-line script match those options you've manually chosen when doing a build from within the Unity editor? Again, seeing the build script/s would maybe help here.
     
  3. Kairus101

    Kairus101

    Joined:
    Oct 8, 2016
    Posts:
    2
    The command line I'm using is
    $ /Applications/Unity/Hub/Editor/2019.2.1f1/Unity.app/Contents/MacOS/Unity -quit -batchmode -executeMethod Odessa.Buildscript.BuildScript.PerformWebGLBuild -nographics -buildTarget WebGL -projectPath /Users/odessa/.jenkins/workspace/Gundar.ioWebGL/UnityClients/Gundar.io -logFile /Users/odessa/.jenkins/workspace/Gundar.ioWebGL/unity3d_editor.log


    and the buildscript is has
    static void PerformWebGLBuild() {
    EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.WebGL, BuildTarget.WebGL);
    GenericBuild(scenes, "target/Gundar.io/", BuildTarget.WebGL, BuildOptions.None);
    }


    So , it's definitely kicking off 2019.2.1f1 unity and the target directory is wiped clean when it fails. I'm not sure what the manual build options unity would be setting automatically, but, I'm not setting any I don't think
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
  5. Smashingtonn

    Smashingtonn

    Joined:
    Feb 3, 2017
    Posts:
    2
    That seems to have fixed the issue cheers for linking! (I'm another dev on the project)
     
    dgoyette likes this.