Status-react: Android NDK can not be downloaded from nix cache

Created on 21 Aug 2020  路  4Comments  路  Source: status-im/status-react

Bug Report

Problem

I'm trying to build the project for the first time, and I'm having trouble with the Nix build. When running:

make shell TARGET=android

the build fails on

copying path '/nix/store/psx79cnz1khfjlzkw3j8x9sb1jhk1v1a-ndk-bundle-21.0.6113669' from 'https://nix-cache.status.im'...
NAR for '/nix/store/psx79cnz1khfjlzkw3j8x9sb1jhk1v1a-ndk-bundle-21.0.6113669' fetched from 'https://nix-cache.status.im'      is incomplete
error: build of '/nix/store/pdhb0fgdg39nm884vz7mkm3bg2mhmdaj-licensed-android-sdk.drv' failed
make: *** [shell] Error 1

I've subsequently tried to download the package manually, to verify that the download works, but the server connection closes before the download completes, around the 2 minute mark. As a result the downloaded .nar is always broken. I've tried this on multiple machines, and Internet connections.

Expected behavior

The build should complete.

Actual behavior

s.a.

Notes

It seems pretty likely to me that there is some server timeout at play. I've tried to fire up a Digital Ocean VM to check if the download succeeds with a much faster internet connection, and it does.

Acceptance Criteria

It should be possible to complete the build on normal ADSL connection speeds.

Reproduction

Run

make shell TARGET=android

Additional Information

  • Status version: 1.5.0
  • Operating System: n/a

Logs

n/a

...
bug

Most helpful comment

A simple temporary fix is to edit the nix/nix.conf and temporarily comment out extra-substituters:
https://github.com/status-im/status-react/blob/001789f76160a2511ec61764d5845b910764b323/nix/nix.conf#L2
Which should let Nix download the Android NDK directly from Google servers.

All 4 comments

We are already tracking this issue in: https://github.com/status-im/infra-ci/issues/17

There are no timeouts that I can find involved in this, this must be some weird interaction between CloudFlare, Nginx, and the Perl script that is hosting the NDK. I have no clue what is causing this.

It is possible that this PR for Nixpkgs will fix this: https://github.com/NixOS/nixpkgs/pull/89775

A simple temporary fix is to edit the nix/nix.conf and temporarily comment out extra-substituters:
https://github.com/status-im/status-react/blob/001789f76160a2511ec61764d5845b910764b323/nix/nix.conf#L2
Which should let Nix download the Android NDK directly from Google servers.

Thanks. That worked. This at least allows me to build for now.

Closing as tracked elsewhere.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukaszfryc picture lukaszfryc  路  117Comments

andmironov picture andmironov  路  73Comments

churik picture churik  路  52Comments

yenda picture yenda  路  63Comments

jeluard picture jeluard  路  45Comments