Search Unity

Question Installing unity with hub from cli and powershell errors?

Discussion in 'Unity Hub' started by pinkwerks, Jul 26, 2022.

  1. pinkwerks

    pinkwerks

    Joined:
    Aug 26, 2014
    Posts:
    5
    I'm trying to automate installing a specific version of unity and the webgl module with powershell.

    $SupportedUnityVersion = '2021.3.3f1'
    $UnityChangeSet = 'af2e63e8f9bd'
    Start-Process "C:\Program Files\Unity Hub\Unity Hub.exe" -ArgumentList "-- --headless install --version $SupportedUnityVersion --changeset $UnityChangeSet" -Wait

    This seems to mostly work except it crashes (see log below).

    Then, when I quit and start hub again (3.2) it fails to list this new version installed. I have to locate it and add it manually. This is weird because it lives in the 'C:\Program Files\Unity\Hub\Editor", I'm not sure why Hub isn't seeing it?

    Lastly, I don't have the option to "add modules" to the located install from the gear menu. It only has the 'show in explorer' and 'remove from hub' options.

    Console log:

    Progress:
    [Unity 2021.3.3f1] installed successfully.
    All Tasks Completed Successfully.
    ERROR: Licensing SDK logging callback is not registered. Please use 'registerLoggingAdapter' function from the SDK to do so.
    events.js:292
    throw er; // Unhandled 'error' event
    ^

    NodeError: write after end
    at writeAfterEnd (C:\Program Files\Unity Hub\resources\app.asar\node_modules\readable-stream\lib\_stream_writable.js:261:12)
    at DerivedLogger.Writable.write (C:\Program Files\Unity Hub\resources\app.asar\node_modules\readable-stream\lib\_stream_writable.js:305:21)
    at DerivedLogger.<computed> [as error] (C:\Program Files\Unity Hub\resources\app.asar\node_modules\winston\lib\winston\create-logger.js:81:14)
    at process.handleCriticalErrors (C:\Program Files\Unity Hub\resources\app.asar\build\main\logger.js:55:16)
    at process.emit (events.js:327:22)
    at processEmit [as emit] (C:\Program Files\Unity Hub\resources\app.asar\node_modules\signal-exit\index.js:199:34)
    at process._fatalException (internal/process/execution.js:163:25)
    Emitted 'error' event on DerivedLogger instance at:
    at errorOrDestroy (C:\Program Files\Unity Hub\resources\app.asar\node_modules\readable-stream\lib\internal\streams\destroy.js:98:101)
    at writeAfterEnd (C:\Program Files\Unity Hub\resources\app.asar\node_modules\readable-stream\lib\_stream_writable.js:263:3)
    at DerivedLogger.Writable.write (C:\Program Files\Unity Hub\resources\app.asar\node_modules\readable-stream\lib\_stream_writable.js:305:21)
    [... lines matching original stack trace ...]
    at process._fatalException (internal/process/execution.js:163:25)
     
    Last edited: Jul 27, 2022