Cant download Android Module during install

Do you have 7z installed? I think that’s needed to extract files within the android package.

Thanks for your reply. Yes I do have 7z installed but it still fails.

You can download the android package files manually and try install it yourself. Maybe it’ll show where the problem is.
Start the download in hub and then cancel it. Then check the hub log in
/home/user/.config/UnityHub/logs/info-log.json
You’ll see all the download links near the bottom.

Got the same problem with Unity Hub 1.6.1 but installing the LTS version 2017.4.26f1

Log says:

{ā€œmoduleNameā€:ā€œUnityInstallerLinuxā€,ā€œlevelā€:ā€œwarnā€,ā€œmessageā€:ā€œ[ ā€˜Error while installing module Android Build Support: Error: Command failed: /tmp/.mount_Unity HBS6lk/resources/app.asar.unpacked/external/7z/linux64/7z x -y -o"/home/user/Programs/Unity/2017.4.26f1/Editor/Data/PlaybackEngines/AndroidPlayer/tmp" "/tmp/unityhub-fd013410-6977-11e9-a98b-3f44a83067cd/UnitySetup-Android-Support-for-Editor-2017.4.26f1.pkg"\n/bin/sh: 1: /tmp/.mount_Unity: not found\n’ ]ā€,ā€œtimestampā€:ā€œ2019-04-28T05:41:42.296Zā€}

I have p7zip-full, p7zip, p7zip-rar packages installed to their latest version.

EDIT:

In the editor build settings, android component download link seems broken:

http://download.unity3d.com/download_unity/3b349d10f010/Unknown/UnitySetup-Android-Support-for-Editor-2017.4.26f1

Maybe this is the actual problem?

Possibly a permission issue with /tmp ?

ls -ld /tmp
drwxrwxrwt 12 root root 4096 abr 30 06:39 /tmp

Link says this to me:

<Error>
    <Code>AccessDenied</Code>
    <Message>Access denied.</Message>
    <Details>
    Anonymous caller does not have storage.objects.get access to publishing-unity-binaries-prd/6e9a27477296   /Unknown/UnitySetup-Android-Support-for-Editor-2017.4.26f1.
    </Details>
</Error>

So Unity Hub has been updated to 1.6.2 now and Unity to 2017.4.27f1.

Still getting the same error in the log and in the download link.

Maybe this has something to do having Lubuntu 16.04, but i have installed all listed dependencies so i’m not sure why this happens. :frowning:

Maybe you can try to download unity 2019?

Okay so I got it working now.
Not sure which one fixed it will confirm soon.

  • I installed gnome-desktop env and installed unity from there.
  • I also ran chmod 777 /tmp/
  • I installed with unity hub 2.0.0 and unity 2019.1.2f1

EDIT

  • Installed 2018.4
  • Installed with i3wm aswell

So I would imagine running chmod 777 /tmp/ or using a newer version of UnityHub fixed it.

1 Like

Glad to hear that UnityTech still fixes some old bugs. It’s very inspiring.
But as for me they add another bugs in newer versions :slight_smile:

I updated the S.O to Lubuntu 18.04 LTS, Unity Hub to 2.0.0 and Unity to 2017.4.27f1.

EDIT: Android module is still not downloable. Now it doesn’t even appear a message indicating module installation failed.

I discovered that installing this two packages:

zenity
kdialog

Running Unity Hub displays an EULA and if you want to integrate it with the system, the first run, but still no luck.

tmp directory has 777.

This is the log message:

{"moduleName":"UnityInstallerLinux","level":"warn","message":"[ 'Error while installing module Android Build Support:  Error: Command failed: /tmp/.mount_Unity QoAh5Q/resources/app.asar.unpacked/lib/linux/7z/linux64/7z x -y -o\"/home/user/Programs/Unity/2017.4.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/tmp\" \"/tmp/unityhub-8378df50-76d1-11e9-bc19-b3473da7f8fb/UnitySetup-Android-Support-for-Editor-2017.4.27f1.pkg\"\\n/bin/sh: 1: /tmp/.mount_Unity: not found\\n' ]","timestamp":"2019-05-15T05:23:37.680Z"}

There’s also a little message if i run the UnityHub in the terminal:

/tmp/.mount_Unity MstrIL/AppRun: line 20: [: /tmp/.mount_Unity: a binary operator was expected

(unityhub:11706): IBUS-WARNING **: 07:48:19.855: The owner of /home/user/.config/ibus/bus is not root!

ls -a /tmp displays:

d?????????  ? ?    ?        ?            ? '.mount_Unity jn1Kam'/

Also the android.pkg downloads into a tmp directory but then it get’s deleted when installation process ends.

Solution:

1 - open log file ~/config/UnityHub/logs/info-log.json
2 - try to find the error of your case (example: UnityInstallerLinux)
3 - read and understand what is the error , it may be command not found , in my case there was no command called (cpio)

{"moduleName":"UnityInstallerLinux","level":"warn","message":"[ 'Error while installing module Android Build Support',\n  { Error: Command failed: cd /home/tj/Unity/Hub/Editor/2019.4.16f1/Editor/Data/PlaybackEngines/AndroidPlayer; gzip -dc \"/home/tj/Unity/Hub/Editor/2019.4.16f1/Editor/Data/PlaybackEngines/AndroidPlayer/tmp/TargetSupport.pkg.tmp/Payload\" | cpio -iu\n  /bin/sh: line 1: cpio: command not found\n  \n      at ChildProcess.exithandler (child_process.js:312:12)\n      at ChildProcess.emit (events.js:194:13)\n      at ChildProcess.EventEmitter.emit (domain.js:469:20)\n      at maybeClose (internal/child_process.js:998:16)\n      at Socket.<anonymous> (internal/child_process.js:403:11)\n      at Socket.emit (events.js:194:13)\n      at Socket.EventEmitter.emit (domain.js:469:20)\n      at Pipe.<anonymous> (net.js:593:12)\n    killed: false,\n    code: 127,\n    signal: null,\n    cmd:\n     'cd /home/tj/Unity/Hub/Editor/2019.4.16f1/Editor/Data/PlaybackEngines/AndroidPlayer; gzip -dc \"/home/tj/Unity/Hub/Editor/2019.4.16f1/Editor/Data/PlaybackEngines/AndroidPlayer/tmp/TargetSupport.pkg.tmp/Payload\" | cpio -iu' } ]","timestamp":"2021-01-15T01:00:20.460Z"}

4 - I solved it by installing the command, (sudo pacman -S cpio)

1 Like

Had the same issue on Arch Linux. Installing cpio worked for me as well.