Closed ggaudeau closed 1 year ago
After updating repository to the new revision (thanks to @AndrewKahr for his work on android 2022 integration), I fall into an other problem because the module android-sdk-command-line-tools
is not found in /opt/unity/modules.json
file
Can I get more detail into when you run into this? Namely Unity version, the exact error message, what you're running when you hit that error, etc.
Yes, of course. Sorry.
I am running this command using unity-hub 3.4.1:
docker build game-ci/docker/images/ubuntu/editor -t unity-editor --build-arg baseImage=unity-base --build-arg hubImage=unity-hub --build-arg version="2022.2.11f1" --build-arg changeSet="621cd60d08fd" --build-arg module="android"
And there is the output:
#1 [internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 14.64kB done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/unity-base:latest
#3 DONE 0.0s
#4 [internal] load metadata for docker.io/library/unity-hub:latest
#4 DONE 0.0s
#5 [stage-1 1/19] FROM docker.io/library/unity-base
#5 CACHED
#6 [builder 1/5] FROM docker.io/library/unity-hub
#6 DONE 0.0s
#7 [builder 2/5] RUN unity-hub install --version "2022.2.11f1" --changeset ...
=> unity-hub warnings related to the fact that we try to launch it from a docker container (despite the headless option)
#7 7.316 Progress:
#7 7.316 [Unity 2022.2.11f1] queued for download.
#7 7.316 Progress:
#7 7.317 [Unity 2022.2.11f1] queued for download.
#7 7.322 Progress:
#7 7.322 [Unity 2022.2.11f1] validating download...
#7 7.323 Progress:
#7 7.323 [Unity 2022.2.11f1] validating download...
#7 7.323 Progress:
#7 7.323 [Unity 2022.2.11f1] validating download...
#7 8.173 Progress:
#7 8.173 [Unity 2022.2.11f1] in progress...
#7 9.379 Progress:
#7 9.380 [Unity 2022.2.11f1] downloading 0.55%
...
#7 183.3 Progress:
#7 183.3 [Unity 2022.2.11f1] downloading 99.61%
#7 183.8 Progress:
#7 183.8 [Unity 2022.2.11f1] downloading 100.00%
#7 183.8 Progress:
#7 183.8 [Unity 2022.2.11f1] finished downloading.
#7 183.8 Progress:
#7 183.8 [Unity 2022.2.11f1] finished downloading.
#7 183.8 Progress:
#7 183.8 [Unity 2022.2.11f1] queued for install.
#7 183.8 Progress:
#7 183.8 [Unity 2022.2.11f1] queued for install.
#7 189.1 Progress:
#7 189.1 [Unity 2022.2.11f1] validating installation...
#7 189.1 Progress:
#7 189.1 [Unity 2022.2.11f1] validating installation...
#7 189.1 Progress:
#7 189.1 [Unity 2022.2.11f1] installing...
#7 354.0 Progress:
#7 354.0 [Unity 2022.2.11f1] installed successfully.
#7 354.0 All Tasks Completed Successfully.
#7 354.0 Progress:
#7 354.0 [Unity 2022.2.11f1] installed successfully.
#7 354.0 All Tasks Completed Successfully.
#7 DONE 358.8s
#8 [builder 3/5] RUN for mod in android; do if [ "$mod" = "base" ] ; ...
=> unity-hub warnings related to the fact that we try to launch it from a docker container (despite the headless option)
#8 3.666 Adding module android-sdk-platform-tools as dependency of android-sdk-ndk-tools.
Adding module android-sdk-build-tools as dependency of android-sdk-ndk-tools.
Adding module android-sdk-platforms-29 as dependency of android-sdk-ndk-tools.
Adding module android-sdk-platforms-30 as dependency of android-sdk-ndk-tools.
Adding module android-ndk as dependency of android-sdk-ndk-tools.
Progress:
#8 3.677 [Android Build Support] queued for download.
#8 3.678 Progress:
#8 3.678 [Android Build Support] queued for download.
#8 3.683 Progress:
#8 3.683 [Android Build Support] validating download...
#8 3.684 Progress:
#8 3.684 [Android Build Support] validating download...
#8 3.684 Progress:
#8 3.684 [Android Build Support] validating download...
#8 3.693 Progress:
#8 3.693 [Android Build Support] validating download...
#8 3.693 [Android SDK Platform Tools] queued for download.
#8 3.693 Progress:
#8 3.693 [Android Build Support] validating download...
#8 3.693 [Android SDK Platform Tools] queued for download.
#8 3.695 Progress:
#8 3.695 [Android Build Support] validating download...
#8 3.695 [Android SDK Platform Tools] validating download...
#8 3.695 Progress:
#8 3.695 [Android Build Support] validating download...
#8 3.695 [Android SDK Platform Tools] validating download...
#8 3.695 Progress:
#8 3.695 [Android Build Support] validating download...
#8 3.696 [Android SDK Platform Tools] validating download...
#8 3.705 Progress:
#8 3.705 [Android Build Support] validating download...
#8 3.705 [Android SDK Platform Tools] validating download...
#8 3.705 [Android SDK Build Tools] queued for download.
...
#8 230.2 [Android SDK Platforms 29] installed successfully.
#8 230.2 [Android SDK Platforms 30] installed successfully.
#8 230.2 [OpenJDK] installed successfully.
#8 230.2 [Android SDK & NDK Tools] installed successfully.
#8 230.2 [Android NDK] installed successfully.
#8 230.2 All Tasks Completed Successfully.
#8 DONE 238.7s
#9 [builder 4/5] RUN echo "2022.2.11f1-android" | grep -q -vP '^(2021.2.(?!...
#9 DONE 0.6s
#10 [builder 5/5] RUN echo "2022.2.11f1-android" | grep -q -vP '^(2021.2.(?!...
#10 DONE 0.6s
#11 [stage-1 2/19] COPY --from=builder /opt/unity/editors/2022.2.11f1/ /opt...
#11 DONE 59.5s
#12 [stage-1 3/19] RUN echo 2022.2.11f1 > "/opt/unity/version"
#12 DONE 0.4s
#13 [stage-1 4/19] RUN /bin/echo -e '#!/bin/bash\n\nif [ -d /usr/bin/unity-...
#13 DONE 0.6s
#14 [stage-1 5/19] RUN echo "2022.2.11f1-android" | grep -q -v '^2019.3.[0-...
#14 DONE 0.6s
#15 [stage-1 6/19] RUN echo "2022.2.11f1-android" | grep -q -v '^\(2019.3.[...
#15 DONE 0.6s
#16 [stage-1 7/19] RUN echo "2022.2.11f1-android" | grep -q -v '^\(2020.1\|...
#16 DONE 0.6s
#17 [stage-1 8/19] RUN echo "2022.2.11f1-android" | grep -q -v '^2018\.[34]...
#17 DONE 0.5s
#18 [stage-1 9/19] RUN echo "2022.2.11f1-android" | grep -q -vP '^20(?!18)....
#18 DONE 0.7s
#19 [stage-1 10/19] RUN echo "2022.2.11f1-android" | grep -q -vP '^(202[1-9]...
#19 DONE 0.6s
#20 [stage-1 11/19] RUN echo "2022.2.11f1-android" | grep -q -vP '^(20(19|20...
#20 DONE 0.5s
#21 [stage-1 12/19] RUN echo "2022.2.11f1-android" | grep -q -vP '^(202[1-9]...
#21 0.463 /bin/sh: 1: /bin/sdkmanager: not found
#21 ERROR: process "/bin/sh -c echo \"$version-$module\" | grep -q -vP '^(202[1-9]|20[3-9]).*android' && exit 0 || : && . ~/.bashrc && yes | \"${ANDROID_CMDLINE_TOOLS_PATH}/bin/sdkmanager\" --licenses" did not complete successfully: exit code: 127
------
> [stage-1 12/19] RUN echo "2022.2.11f1-android" | grep -q -vP '^(202[1-9]|20[3-9]).*android' && exit 0 || : && . ~/.bashrc && yes | "${ANDROID_CMDLINE_TOOLS_PATH}/bin/sdkmanager" --licenses:
------
process "/bin/sh -c echo \"$version-$module\" | grep -q -vP '^(202[1-9]|20[3-9]).*android' && exit 0 || : && . ~/.bashrc && yes | \"${ANDROID_CMDLINE_TOOLS_PATH}/bin/sdkmanager\" --licenses" did not complete successfully: exit code: 127
Ah the changes that made it to main are for Unity Hub 3.4.2-beta.1 as that version is the first to fix the incorrect android package installation when in headless mode. This will not work with 3.4.1 or earlier.
It works perfectly with Unity Hub 3.4.2-beta.1. Thank you.
Bug description
When I am using a too recent version of Unity Hub (>= 3.3.0) then the script
unity-hub
generates a lot non-fatal errors. That occurs only if it is launched from a container.At the end we get the docker image unity-hub but it makes the Gitlab job fails.
How to reproduce
Expected behavior
A way to avoid having these error logs in the terminal output.
Additional details
The error seems to be triggered by the presence of the keyword Error