Android Studio installation hangs

i just tried to install android studio, but the installation hangs at building android-studio-2022.2.1.12-linux.tar.gz or building android-studio-2022.1.1.20-linux.tar.gz (stable and beta version from nixpkgs).
The respective derivation is this:

Derive(
[("out","/nix/store/p845bac4rgl76ci1v8ar4smq16d9sdnw-android-studio-2022.2.1.12-linux.tar.gz","sha256","b488265fd2a24489c8ba98085d6820e1d31ff1b4f0915a293b100ee4ed4f5007")],
[
  ("/nix/store/2jp0p2kyf49f665s8vgfg3gdpaqpdvpp-stdenv-linux.drv",["out"]),
  ("/nix/store/3c6sxp8m3a007wvvxxi4q8vddf5h8dnm-mirrors-list.drv",["out"]),
  ("/nix/store/jjhl4mmc31mxn7zk38414xhl3ki70dg8-bash-5.2-p15.drv",["out"]),
  ("/nix/store/mg6cmxqqr9285wc4c49mk5jz8gjb0wx1-curl-8.0.1.drv",["dev"])
],
["/nix/store/57620l1168piiia2bmmsxxhh7sjb2n40-builder.sh"],
"x86_64-linux",
"/nix/store/0hx32wk55ml88jrb1qxwg5c5yazfm6gf-bash-5.2-p15/bin/bash",
["-e","/nix/store/57620l1168piiia2bmmsxxhh7sjb2n40-builder.sh"],
[
  ("SSL_CERT_FILE","/no-cert-file.crt"),("__structuredAttrs",""),
  ("buildInputs",""),
  ("builder","/nix/store/0hx32wk55ml88jrb1qxwg5c5yazfm6gf-bash-5.2-p15/bin/bash"),("cmakeFlags",""),("configureFlags",""),
  ("curlOpts",""),("curlOptsList",""),("depsBuildBuild",""),
  ("depsBuildBuildPropagated",""),("depsBuildTarget",""),
  ("depsBuildTargetPropagated",""),("depsHostHost",""),
  ("depsHostHostPropagated",""),("depsTargetTarget",""),
  ("depsTargetTargetPropagated",""),
  ("doCheck",""),
  ("doInstallCheck",""),
  ("downloadToTemp",""),
  ("executable",""),
  ("impureEnvVars","http_proxy https_proxy ftp_proxy all_proxy no_proxy NIX_CURL_FLAGS NIX_HASHED_MIRRORS NIX_CONNECT_TIMEOUT NIX_MIRRORS_alsa NIX_MIRRORS_apache NIX_MIRRORS_bioc NIX_MIRRORS_bitlbee NIX_MIRRORS_centos NIX_MIRRORS_cpan NIX_MIRRORS_debian NIX_MIRRORS_fedora NIX_MIRRORS_gcc NIX_MIRRORS_gentoo NIX_MIRRORS_gnome NIX_MIRRORS_gnu NIX_MIRRORS_gnupg NIX_MIRRORS_hackage NIX_MIRRORS_hashedMirrors NIX_MIRRORS_ibiblioPubLinux NIX_MIRRORS_imagemagick NIX_MIRRORS_kde NIX_MIRRORS_kernel NIX_MIRRORS_luarocks NIX_MIRRORS_maven NIX_MIRRORS_mozilla NIX_MIRRORS_mysql NIX_MIRRORS_openbsd NIX_MIRRORS_opensuse NIX_MIRRORS_osdn NIX_MIRRORS_postgresql NIX_MIRRORS_pypi NIX_MIRRORS_qt NIX_MIRRORS_roy NIX_MIRRORS_sageupstream NIX_MIRRORS_samba NIX_MIRRORS_savannah NIX_MIRRORS_sourceforge NIX_MIRRORS_steamrt NIX_MIRRORS_tcsh NIX_MIRRORS_testpypi NIX_MIRRORS_ubuntu NIX_MIRRORS_xfce NIX_MIRRORS_xorg"),
  ("mesonFlags",""),
  ("mirrorsFile","/nix/store/frnrhlxiywcp25fnvqcbsj9598jxnsch-mirrors-list"),
  ("name","android-studio-2022.2.1.12-linux.tar.gz"),
  ("nativeBuildInputs","/nix/store/2kvcps9bbklirq7ps8grs0w6r97irsk5-curl-8.0.1-dev"),("nixpkgsVersion","23.05"),
  ("out","/nix/store/p845bac4rgl76ci1v8ar4smq16d9sdnw-android-studio-2022.2.1.12-linux.tar.gz"),
  ("outputHash","tIgmX9KiRInIupgIXWgg4dMf8bTwkVopOxAO5O1PUAc="),
  ("outputHashAlgo","sha256"),
  ("outputHashMode","flat"),
  ("outputs","out"),
  ("patches",""),
  ("postFetch",""),
  ("preferHashedMirrors","1"),
  ("preferLocalBuild","1"),
  ("propagatedBuildInputs",""),
  ("propagatedNativeBuildInputs",""),
  ("showURLs",""),
  ("stdenv","/nix/store/z91202lpbgihd3n45ppwy9ax23m25h7b-stdenv-linux"),
  ("strictDeps",""),
  ("system","x86_64-linux"),
  ("urls","https://dl.google.com/dl/android/studio/ide-zips/2022.2.1.12/android-studio-2022.2.1.12-linux.tar.gz")
]
)

does anyone know how to fix this or help me figure out what is actually going on, so i can try to fix it myself?

1 Like

oh it worked, it just took a really long time (>30m) while seemingly doing nothing (almost no resource usage in htop).

1 Like

Might be interesting to track down what this is doing…

unless the google engineers have put a sleep(1800) as they get paid by the hour. ;-).

I wonder if its downloading a lot of resources located under someone desk at the ‘google plex’.

curl --location --max-redirs 20 --retry 3 --disable-epsv --cooki
e-jar cookies --user-agent curl/7.86.0 Nixpkgs/22.11 --insecure -C - --fail https://dl.google.com/dl/android/studio/
ide-zips/2021.3.1.17/android-studio-2021.3.1.17-linux.tar.gz --output /nix/store/bvy59ymin5rw4rakw1y7a62wxlkq1h89-an
droid-studio-2021.3.1.17-linux.tar.gz

yep, as i suspected, it curls things inside the derivation.

Length: 982713473 (937M) [application/gzip]

you need a faster internet connection… where are you? in a city or something :wink:

Normally yes, but currently quite the opposite :wink:
I did not expect it to curl something from within the derivation, lol
Isn’t that against the principles of Nix? Well, I guess sometimes you have to make something less nix-y to make it work at least.

android-studio is HIGHLY unreproducable.

so , expect the unexpected.