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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

CLI Build Error: Can't find custom attr constructor image

Discussion in 'Editor & General Support' started by tom_unity2, Feb 11, 2020.

  1. tom_unity2

    tom_unity2

    Joined:
    Jan 22, 2020
    Posts:
    3
    Hi,

    I'm trying to build my Unity project via commandline using version 2019.3.0f6 (Mac) on Travis CI and have hit this brick wall of an issue:

    Code (csharp):
    1. 5339Can't find custom attr constructor image: /Users/travis/build/<company>/<project>/Library/PackageCache/com.unity.ads@3.4.2/Editor/UnityEditor.Advertisements.dll mtoken: 0x0a00000f due to:  assembly:/Applications/Unity/Unity.app/Contents/Managed/UnityEngine/UnityEngine.CoreModule.dll type:UnityAPICompatibilityVersionAttribute member:void {0}(string,string[]) signature:.ctor
    2. 5340Obtained 4 stack frames.
    3. 5341#0  0x007fff606b2712 in _platform_strlen
    4. 5342#1  0x00000107a6ba0f in systeminfo::GetTemporaryCachePath()
    5. 5343#2  0x00000105ffa76f in GetTemporaryCachePathApplicationSpecific()
    6. 5344#3  0x00000106beace6 in Application_Get_Custom_PropTemporaryCachePath()
    7. 5345
    (with MONO_LOG_LEVEL=debug)

    I was having this issue with Unity Ads 3.4.1, which I upgraded using the full Editor w/ GUI to the latest version, however the issue persists. If I build the app using the GUI it works without this error.

    Here is the full command I am using to build this:
    Code (csharp):
    1.  
    2. sudo /Applications/Unity/Unity.app/Contents/MacOS/Unity \
    3.   -batchmode \
    4.   -nographics \
    5.   -silent-crashes \
    6.   -projectPath $(pwd) \
    7.   -executeMethod CommandLineBuild.buildIOS \
    8.   -quit
    9.  
    Anyone have any idea why this is happening?

    Thanks,

    Tom
     
  2. tom_unity2

    tom_unity2

    Joined:
    Jan 22, 2020
    Posts:
    3
    The solution here is to not use sudo :)