Search Unity

Bug Cant download Android Module during install

Discussion in 'Linux' started by danrousseau, Apr 22, 2019.

  1. danrousseau

    danrousseau

    Joined:
    Jan 29, 2018
    Posts:
    11
    - The download seems to progress to the end then fails.
    - The android modules fail to install.
    - Using unity Hub 1.6.1.
    2019-04-22-135416_1920x1080_scrot.jpg
     
  2. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Do you have 7z installed? I think that's needed to extract files within the android package.
     
  3. danrousseau

    danrousseau

    Joined:
    Jan 29, 2018
    Posts:
    11
    Thanks for your reply. Yes I do have 7z installed but it still fails.
     
  4. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    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.
     
  5. LandHT

    LandHT

    Joined:
    Feb 3, 2017
    Posts:
    84
    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/downloa...ySetup-Android-Support-for-Editor-2017.4.26f1

    Maybe this is the actual problem?
     
    Last edited: Apr 28, 2019
  6. PixelJ

    PixelJ

    Unity Technologies

    Joined:
    Nov 1, 2018
    Posts:
    216
    Possibly a permission issue with /tmp ?
     
  7. LandHT

    LandHT

    Joined:
    Feb 3, 2017
    Posts:
    84
    ls -ld /tmp
    drwxrwxrwt 12 root root 4096 abr 30 06:39 /tmp

    Link says this to me:
    Code (CSharp):
    1. <Error>
    2.     <Code>AccessDenied</Code>
    3.     <Message>Access denied.</Message>
    4.     <Details>
    5.     Anonymous caller does not have storage.objects.get access to publishing-unity-binaries-prd/6e9a27477296   /Unknown/UnitySetup-Android-Support-for-Editor-2017.4.26f1.
    6.     </Details>
    7. </Error>
     
    Last edited: Apr 30, 2019
  8. LandHT

    LandHT

    Joined:
    Feb 3, 2017
    Posts:
    84
    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. :(
     
  9. HZ51

    HZ51

    Joined:
    Jul 28, 2016
    Posts:
    42
    Maybe you can try to download unity 2019?
     
  10. danrousseau

    danrousseau

    Joined:
    Jan 29, 2018
    Posts:
    11
    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.
     
    Last edited: May 14, 2019
    HZ51 likes this.
  11. HZ51

    HZ51

    Joined:
    Jul 28, 2016
    Posts:
    42
    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 :)
     
  12. LandHT

    LandHT

    Joined:
    Feb 3, 2017
    Posts:
    84
    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:

    Code (CSharp):
    1. {"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:

    Code (CSharp):
    1. /tmp/.mount_Unity MstrIL/AppRun: line 20: [: /tmp/.mount_Unity: a binary operator was expected
    2.  
    3. (unityhub:11706): IBUS-WARNING **: 07:48:19.855: The owner of /home/user/.config/ibus/bus is not root!
    ls -a /tmp displays:
    Code (CSharp):
    1. d?????????  ? ?    ?        ?            ? '.mount_Unity jn1Kam'/
    Also the android.pkg downloads into a tmp directory but then it get's deleted when installation process ends.
     
    Last edited: May 15, 2019
  13. tplinuxos

    tplinuxos

    Joined:
    Apr 18, 2020
    Posts:
    1
    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)

    Code (CSharp):
    1. {"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"}
    2.  
    4 - I solved it by installing the command, (sudo pacman -S cpio)
     
    eegemen1 likes this.
  14. eegemen1

    eegemen1

    Joined:
    Apr 7, 2020
    Posts:
    1
    Had the same issue on Arch Linux. Installing cpio worked for me as well.