Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Unity fails to build with Jenkins

Discussion in '2019.3 Beta' started by Krasshirsch, Nov 15, 2019.

  1. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    Setup
    - Unity 2019.3.0b10 (Pro License)
    - Ubuntu 18.04
    - Jenkins 2.190.2

    Hi,

    we are having trouble getting automated Unity builds running using Jenkins, see the log below.
    I can only presume that the builds fail due to the line
    [LicensingClient] ERROR Failed to connect to local IPC
    .
    The builds only fail in headless mode through the command line, building through the editor works fine on the same machine with the same projects and settings.

    Any help is greatly appreciated.
    Alexander
     
  2. danielo_unity

    danielo_unity

    Unity Technologies

    Joined:
    Apr 12, 2018
    Posts:
    14
    The log error is misleading, in that we are simply testing for the prior presence of the pipe, and is not a fatal error.
    If the communication channel is not already present, we launch the licensing client (whose role is to mediate license requests). if was already there, we simply connect to it.
     
  3. danielo_unity

    danielo_unity

    Unity Technologies

    Joined:
    Apr 12, 2018
    Posts:
    14
    Also, please check command-line usage here.
    I think that you might just need to issue your command in two steps:
    1. manually activate your license (`-manualLicenseFile` flag):
      this will copy the license into a known location (ie. `~/.local/share/unity3d/Unity/Unity_lic.ulf`),
      you may get an exit code of `1` (I know this is unconventional),
      you may not need the `-username` and `-password` flags,
    2. load the project and execute your custom method (ie. `-buildTarget`, `-projectPath` and `-executeMethod` flags)
     
  4. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    @danielo_unity Thanks for the tip; I must say that this is a very strange command line usage and not documented anywhere from what I can tell.
     
  5. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    Following your advise we have managed to move along but are now stuck at this.

     
    Last edited: Nov 19, 2019
  6. Krasshirsch

    Krasshirsch

    Joined:
    Apr 26, 2017
    Posts:
    36
    As it turned out the issue was due to corrupt JDK, SDK or NDK version / pathing issue.
    Unity 2019.3.0b11, at least on Linux, does not properly install all of its Android requirements.
    After a clean installation with all paths being set to default (Unity Recommended), the android build simply fails due to the SDK, JDK not being found.

    A manual installation of those tools have fixed the issue.
     
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    We have an issue logged for this and are investigating: https://issuetracker.unity3d.com/product/unity/issues/guid/1177631/
     
  8. Evans_Horst

    Evans_Horst

    Joined:
    Jul 17, 2019
    Posts:
    3
    Wow this fixed my issue as well