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-mobile/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
|