Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

1.13.1

Issue ID

ADDR-1431

Regression

No

Addressable Asset Settings does not exist' error is thrown in the console when building a project with Jenkins

Package: Build Pipeline - Addressables

-

How to reproduce:
1. Download and extract the attached 'BuildFail2.zip' project
2. Install Java Version 8
3. Download Jenkins war File from http://mirrors.jenkins.io/war-stable/latest/jenkins.war
4. Open up a terminal in the download directory
5. Run java -jar jenkins.war --httpPort=8080
6. In the browser enter the url: http://localhost:8080
7. Follow the instructions to complete the installation
8. Create an account and login to Jenkins
9. Select New Item in the sidebar
10. Enter an item name
11. Select 'Freestyle project' project and press OK
12. In 'Add build step' dropdown of the Build section select 'Execute shell' if using macOS or 'Execute Windows batch command' if using Windows
13. In the Command field enter Unity version path -batchmode -quit -projectPath downloaded project path -executeMethod com.RobinGames.DesignGame.BuildScript.PerformIOSBuild -headless
(for example: /Applications/UnityEditor/Unity.app/Contents/MacOS/Unity -batchmode -quit -projectPath /Users/person/Desktop/BuildFail2 -executeMethod com.RobinGames.DesignGame.BuildScript.PerformIOSBuild -headless)
14. Click save
15. Once it is returned to the project press Build Now in the sidebar
16. Once build is finished open the build from the Build History section
17. Click on Console Output option in the sidebar
18. Search for 'Addressable Asset Settings does not exist' error

Expected result: Addressables errors do not occur in the Jenkins console
Actual result: (Filename: Assets/Editor/BuildScript.cs Line: 52) Addressable Asset Settings does not exist. EditorApplication.isCompiling was true. error is thrown in the Jenkins console

Reproducible with: 2019.4.7f1(1.13.1), 2020.1.1f1(1.8.4), 2020.2.0a20(1.11.2)
Could not test with: 2018.4.26f1(due to errors thrown in the console)

Notes:
- Full error message is attached in Edit
- Video of Jenkins setup is attached in Edit
- Automated build fails when project is uploaded to git repository

  1. Resolution Note:

    This fails because the user's build script is attempting to build addressables while the editor is compiling code. This cannot be done. Which is why the log error includes "EditorApplication.isCompiling was true".

    To paraphrase the user's code, it has this:
    GenericBuild(...)
    {
    EditorUserBuildSettings.SwitchActiveBuildTarget(...);
    AddressableAssetSettings.CleanPlayerContent();
    }

    As stated on the docs for SwitchActiveBuildTarget, (https://docs.unity3d.com/ScriptReference/EditorUserBuildSettings.SwitchActiveBuildTarget.html):

    All script files are compiled on the next editor update.

    So if you want to build in Jenkins you have two choices. (the better choice) launch Unity using command line arguments to be already on the platform you desire, or (the harder choice), write build code that can switch platforms, wait for scripts to recompile, and then execute build.

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.