Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Failing with license error when running -batchmode

Discussion in 'Linux' started by kannonboy, Nov 18, 2016.

  1. kannonboy

    kannonboy

    Joined:
    Nov 18, 2016
    Posts:
    1
    I'm attempting to get a free version of Unity running in a Docker container for an automated build. I'm running Unity for Linux version 5.4.2f2+20161111

    If I don't specify a username/password:

    Code (csharp):
    1.  
    2. xvfb-run -n 99 -s "-screen 0 1024x768x24 +extension RANDR" \
    3. /opt/Unity/Editor/Unity -batchmode \
    4. -skipMissingProjectID \
    5. -skipMissingUPID \
    6. -projectPath /home/gamedev/SpaceShooter \
    7. -logFile "/home/gamedev/log.txt" \
    8. -buildconfig \
    9. -bvrbuildtarget default-mac-desktop-universal \
    10. -buildTarget standaloneosxuniversal \
    11. -quit
    12.  
    I get the error:

    Code (csharp):
    1.  
    2. DisplayProgressbar: Unity license
    3. Cancelling DisplayDialog: Failed to activate/update license. Missing or bad username and password. Please try again using valid credentials or contact support@unity3d.com
    4. This should not be called in batch mode.
    5.  
    6. (Filename: /home/builduser/buildslave/unity/build/Editor/Platform/Linux/EditorUtility.cpp Line: 234)
    7.  
    The -force-free flag doesn't seem to do anything. If I add in credentials (e.g. -username='me@example.com' -password='hunter2') then I get the following error:

    Code (csharp):
    1.  
    2. DisplayProgressbar: Unity license
    3. Receiving unhandled NULL exception
    4. Launching bug reporter
    5. #0  0x007ffcc31a1300 in _L_unlock_13
    6. #1  0x007ffcc31a1898 in strlen
    7. #2  0x007ffcc31a18a0 in LicenseManager::AppendSystemInfoXML(std::string&)
    8. #3  0x007ffcc31a1900 in LicenseManager::CreateLicenseXMLSegment()
    9. #4  0x007ffcc31a1940 in LicenseManager::CreateNewCommandXML()
    10. #5  0x007ffcc31a1980 in LicenseManager::StartNewLicenseFlow()
    11. #6  0x007ffcc31a1990 in LicenseInfo::Tick()
    12. #7  0x007ffcc31a19c0 in InitializeUnity(void*)
    13. #8  0x007ffcc31a1b00 in g_source_get_time
    14. #9  0x007ffcc31a1b20 in g_main_context_dispatch
    15. #10 0x007ffcc31a1ba0 in g_main_context_dispatch
    16. #11 0x007ffcc31a1c00 in g_main_loop_run
    17. #12 0x007ffcc31a1c20 in gtk_main
    18. #13 0x007ffcc31a1c90 in main
    19. #14 0x007ffcc31a2030 in __libc_start_main
    20. #15 0x007ffcc31a20f0 in _start
    21.  
    Is this a bug? I was under the impression that -batchmode should work for free licenses as well.
     
  2. Martyn96

    Martyn96

    Joined:
    Apr 8, 2016
    Posts:
    5
    Getting the same error as well...
     
  3. Bollit

    Bollit

    Joined:
    Aug 6, 2014
    Posts:
    22
    "Batch mode in the linux editor currently requires being able to access a running X session (even with -nographics, known issue) - it looks as though it isn't able to do so from your docker container." - Tak

    "To activate from the command line:
    Unity -batchmode -nographics -serial XXXX -username myuser@mydomain.com -password MyPassword -quit" - Tak

    "...to activate the personal edition. There's currently no way to do that from the command line (on any platform) - we'll look at adding that in the future." - Tak
     
  4. Martyn96

    Martyn96

    Joined:
    Apr 8, 2016
    Posts:
    5
    Well that's a bit ridiculous. I hope they add it soon...
     
  5. jimver004

    jimver004

    Joined:
    May 29, 2017
    Posts:
    9
    Have you tried this :

    xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24:32' /opt/Unity/Editor/Unity -batchmode -nographics ...

    xvfb-run simulates let's say the X session with a virtual screen
     
  6. maokkone

    maokkone

    Joined:
    May 20, 2016
    Posts:
    1
    I have similar issue. I have a Jenkins job on Ubuntu and I try to build for Android. The setup has worked before, but I started to see a following error when I upgraded from Unity 5.6.0xf1 to 2017.1.1xf1. In the Jenkins I have Xvfb plugin in use.

    The actual unity command is like this:

    xvfb-run unity -force-free -nographics -quit -batchmode -projectPath $projectDir/unity-package/MyProject -logFile $projectDir/unity-package/MyProject/setup.log -executeMethod Autobuild.SetToolPaths"

    And in the logs I see this:
    ---
    DisplayProgressbar: Unity license
    [1002/091945:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
    Xlib: extension "RANDR" missing on display ":99".
    Cancelling DisplayDialog: Failed to activate/update license. Timeout occured while trying to update license. Please try again later or contact support@unity3d.com
    This should not be called in batch mode.

    (Filename: /home/builduser/buildslave/unity/build/Editor/Platform/Linux/EditorUtility.cpp Line: 216)
    ---

    I have tried to active license manually like this

    /opt/Unity/Editor/Unity -batchmode -nographics -serial **** -username **** -password **** -quit

    And in the logs I see this:

    DisplayProgressbar: Unity license

    ---
    [1012/091724:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.

    Cancelling DisplayDialog: Failed to activate/update license. Timeout occured while trying to update license. Please try again later or contact support@unity3d.com

    This should not be called in batch mode.
    ---

    Also tried to activete with xvfb-run, but the result is pretty much same

    Any ideas how to get this solved?
     
  7. headjack

    headjack

    Joined:
    Dec 13, 2014
    Posts:
    6
    Hi @maokkone, did you ever resolve this? We're trying to set up a Linux microservice to create Unity AssetBundles, but we're unable to get past these license issues when running our batch command.