Search Issue Tracker

Fixed in 2018.3.X

Fixed in 2017.4.X, 2018.2.X

Votes

1

Found in

2017.2.0p1

Issue ID

1043511

Regression

No

Using -nographics causes a command line license activation to fail

License

-

Reproduction steps:
1. Delete or rename ulf files in /Library/Application Support/Unity
2. Execute:
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -createProject UnityTmpProject -serial "YOURSERIAL" -username "YOURNAME@unity3d.com" -password "YOURPASSWORD"
3. Check /Library/Application Support/Unity/ folder
4. Notice, that a .ulf file is created in there.
5. Delete or rename ulf files in /Library/Application Support/Unity
6. Execute previous command but add -nographics flag to it:
/Applications/Unity/Unity.app/Contents/MacOS/Unity -nographics -quit -batchmode -createProject UnityTmpProject -serial "YOURSERIAL" -username "YOURNAME@unity3d.com" -password "YOURPASSWORD"
7. Check /Library/Application Support/Unity/ folder

Expected result:
Same as without -nographics flag .ulf file should be created

Actual result:
.ulf file is not created at all

Reproduced with:
2017.1.0b1, 2017.1.4f1, 2017.2.3p1, 2017.4.4f1, 2018.1.2f1, 2018.2.0b6

Comments (6)

  1. LRSFC_ITS

    Jan 09, 2020 09:18

    I am still experiencing this issue in 2019.2.17f1 - Unity activation cannot be done in a headless/automated manner using management systems such as JAMF and fails with:

    Initiating legacy licensing module
    DisplayProgressbar: Unity license
    _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

  2. FVAdmin

    Nov 06, 2018 00:07

    Thanks! I just tested on 2018.3.0b8.

    So, it works if the user is logged in and the command is run through terminal. However, if there is not a user logged in, the command just gets stuck.

    We deploy Unity through JAMF, and the computers may or may not be in a logged in state when the install happens.

    Does the -nographics flag require a user to be logged in? If so, then unfortunately it still doesn't quite address the problem we're running into.

  3. Dave-Hampson

    Oct 24, 2018 13:03

    I just checked on the backport: it's not in Unity 2018.3 beta 6 but it is in Unity 2018.3 beta 7 and higher

  4. FVAdmin

    Oct 24, 2018 02:04

    This bug is marked as fixed in Unity 2018.3, which hasn't been released yet.

    Did the fix make it into the betas, though? I'm trying this in 2018.3.0b6 and still running into the same problem, and I don't see this issue number addressed in any of the beta release notes.

  5. sampeposefb

    Aug 17, 2018 05:35

    Error message from running on a headless continuous integration machine without "-nographics" flag:

    _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
    2018-08-16 18:03:29.529 Unity[19838:4522703] GetInputSourceEnabledPrefs user file path = /var/root/Library/Preferences/com.apple.HIToolbox.plist
    2018-08-16 18:03:29.529 Unity[19838:4522703] GetInputSourceEnabledPrefs effective user id path = 0
    2018-08-16 18:03:29.529 Unity[19838:4522703] GetInputSourceEnabledPrefs user pref content = <CFBasicHash 0x114452a40 [0x7fff870f0af0]>{type = immutable dict, count = 1,
    entries =>
    2 : <CFString 0x7fff87098b78 [0x7fff870f0af0]>{contents = "AppleCurrentKeyboardLayoutInputSourceID"} = <CFString 0x7fff870b6cf8 [0x7fff870f0af0]>{contents = "com.apple.keylayout.US"}
    }

    Long log from with "-nographics" flag. The license file is not added: https://gist.githubusercontent.com/sampepose/712e46054d412f2d7124be4bc08eda6b/raw/602f8f00e0f8fb9a5c569b0b2a2f4ffd7b353f18/gistfile1.txt

  6. sampeposefb

    Aug 17, 2018 00:52

    +1, makes headless Unity on OSX completely unusable. OSX CI is impossible.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.