mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 19:44:47 +00:00
Jakub Sokołowski
0311983751
Due to changes in how Nix handles Git refs we need to specify `refs/tags/` prefix in `package.json` to avoid the following error: ``` fatal: couldn't find remote ref refs/heads/v2.0.3-status-v6 error: program 'git' failed with exit code 128 ``` I also had to rewrite some logic in `nix/scripts/source.sh` in order to take account of single-user and multi-user installations. We default to multi-user for Darwin, but not for any other OS due to discovered issues with `nix-daemon` socket on Arch and open file limits. I also rewrote `nix/scripts/setup.sh` and `/nix/scripts/purge.sh` to support different types of installations. Both single-user and multi-user, as some operating systems have issues with multi-user installations. Resolves: https://github.com/status-im/status-react/issues/12832 Depends on: https://github.com/status-im/status-jenkins-lib/pull/37 Related changes: * https://github.com/status-im/infra-ci/commit/84947b9f * https://github.com/status-im/infra-ci/commit/bb98f5f3 * https://github.com/status-im/infra-ci/commit/f75d524d * https://github.com/status-im/infra-ci/commit/d1fc92cd * https://github.com/status-im/infra-ci/commit/87c4091e * https://github.com/status-im/infra-ci/commit/8d6b6b3f * https://github.com/status-im/infra-ci/commit/c4f13285 * https://github.com/status-im/infra-ci/commit/38ac698d Signed-off-by: Jakub Sokołowski <jakub@status.im>
78 lines
2.8 KiB
Markdown
78 lines
2.8 KiB
Markdown
# Known Issues
|
|
|
|
## Too many open files
|
|
|
|
### Single-User Installation
|
|
|
|
Nix can open a lot of files when fetching things for `/nix/store` which can cause
|
|
```
|
|
Too many open files"
|
|
```
|
|
The temporary way to fix this is set a new limit for current session using `ulimit`:
|
|
```sh
|
|
ulimit -n 131072
|
|
```
|
|
To increase limit permanently system-wide edit `/etc/sysctl.conf`:
|
|
```
|
|
fs.file-max = 131072
|
|
```
|
|
And use `sudo sysctl --system` to load these new settings.
|
|
|
|
### Multi-User Installation
|
|
|
|
The other reason why this error could appear are limits fo `nix-daemon` service:
|
|
https://github.com/NixOS/nix/issues/6007
|
|
|
|
Since Systemd services ignore system-wide limits you will have to add the following line:
|
|
```
|
|
LimitNOFILE=4096:1048576
|
|
```
|
|
To the `/etc/systemd/system/nix-daemon.service` service definition.
|
|
|
|
## Cache Downloads Timing Out
|
|
|
|
If copying from Nix Cache times out you can adjust the timeout by changing [`nix/nix.conf`](/nix/nix.conf):
|
|
```conf
|
|
stalled-download-timeout = 9001
|
|
```
|
|
|
|
## NDK Bundle Download Failures
|
|
|
|
There is a known issue([#11111](https://github.com/status-im/status-react/issues/11111)) where the fetching of Android NDK Bundle from our own cache host fails in various different ways:
|
|
```
|
|
unable to download 'https://nix-cache.status.im/nar/64g5wharwjj040rg1v8jnc5qhv1hkgds.nar':
|
|
HTTP error 200 (curl error: Stream error in the HTTP/2 framing layer)
|
|
```
|
|
```
|
|
unable to download 'https://nix-cache.status.im/nar/64g5wharwjj040rg1v8jnc5qhv1hkgds.nar':
|
|
HTTP error 200 (curl error: Transferred a partial file)
|
|
```
|
|
```
|
|
NAR for '/nix/store/psx79cnz1khfjlzkw3j8x9sb1jhk1v1a-ndk-bundle-21.0.6113669' fetched from 'https://nix-cache.status.im' is incomplete
|
|
```
|
|
Currently the simplest temporary solution is to edit `nix/nix.conf` and comment out the `extra-substituters` line.
|
|
This should allow Nix to download the NDK Bundle directly from Google servers rather than from our own cache.
|
|
|
|
## `extra-sandbox-paths` Is a Restricted Setting
|
|
|
|
When building Android on NixOS you might encounter the following error:
|
|
```
|
|
ignoring the user-specified setting 'extra-sandbox-paths', because it is a restricted setting and you are not a trusted user
|
|
```
|
|
You can mitigate this by setting the [`nix.trustedUsers`](https://nixos.org/nixos/options.html#nix.trustedusers) property.
|
|
|
|
## NixOS Prioritizes System Config
|
|
|
|
Currently on NixOS `NIX_CONF_DIR` is being ignored in favor of the default `/etc/nix/nix.conf`.
|
|
This will be possible to fix once Nix `2.4` comes out with support for `NIX_USER_CONF_FILES`.
|
|
|
|
For more details see https://github.com/NixOS/nix/issues/3723.
|
|
|
|
## Extra Sandbox Files Not Available
|
|
|
|
It's possible that on a multi-user installation files provided to the build sandbox using the `extra-sandbox-paths` option will ne be available, unless the current user is added to `trusted-users` in `nix.conf` file.
|
|
|
|
Issues:
|
|
* https://github.com/NixOS/nix/issues/6115
|
|
* https://github.com/NixOS/nix/issues/6217
|