Comments (25)
I think the previous error is the one we'll need to sort out, but I don't recall seeing it before:
I am executing:
$ sudo launchctl bootstrap system /Library/LaunchDaemons/org.nixos.darwin-store.plist
to launch the Nix volume mounter
Bootstrap failed: 5: Input/output error
Do you see the service definition in the file at /Library/LaunchDaemons/org.nixos.darwin-store.plist
? What happens if you try to run that manually? sudo launchctl bootstrap system /Library/LaunchDaemons/org.nixos.darwin-store.plist
manually?
Some other questions:
- Have you previously installed Nix on this system?
- Is it an org or personal device? (Might something like a corporate MDM profile be interfering?)
from nix.
Ooh, good catch. The file is there but I get the same error:
$ sudo launchctl bootstrap system /Library/LaunchDaemons/org.nixos.darwin-store.plist
Bootstrap failed: 5: Input/output error
I have not previously installed Nix on this system, and it's my own device with no MDM profiles.
from nix.
At least it's consistent.
Can you open Console.app
, give that a try again, and see if it logs anything interesting when it happens?
Does it do the same after a reboot?
I do see other reports of this, though the wifi I'm on atm is sputtering and I'm having trouble assessing them well enough to see if any mention a fix: https://github.com/search?q=%22Bootstrap+failed%3A+5%3A+Input%2Foutput+error%22&type=issues
from nix.
I did try rebooting; should've mentioned that — same result unfortunately.
I found the following in Console.app
, under the "Mac Analytics Data" tab:
getgrouplist_2 called triggering group enumeration
com.apple.message.value: 2147483647
com.apple.message.domain: com.apple.system.libinfo
com.apple.message.result: noop
com.apple.message.signature: getgrouplist_2
SenderMachUUID: 5C3AFA2A-1565-32BA-AC18-A3B8FDD193C5
from nix.
Hmm. I think we'd be hoping for something under the Device section (where it'll have whatever the name of your device was). It can be a little spammy.
There is at least one case where group enumeration might be related, but I don't recall it breaking like this: Is this a new device? If so, have you previously installed Nix on a previous macOS device, and did you use Migration Assistant to set the new one up?
from nix.
Aha! I found four entries in that section, though they weren't visible with the "Errors and Faults" filter enabled, so I almost missed it:
default 15:17:56.102992-0800 sudo Reading config
default 15:17:56.103131-0800 sudo Using original path (null)
default 15:17:56.103231-0800 sudo Too many groups requested (2147483647). Can cause performance issues when network directories are involved
default 15:17:56.117625-0800 sudo mpcsh : TTY=ttys011 ; PWD=/Users/mpcsh ; USER=root ; COMMAND=/opt/homebrew/bin/fish -c 'launchctl bootstrap system \\/Library\\/LaunchDaemons\\/org\\.nixos\\.darwin-store\\.plist'
Hmm, this device isn't new, but I may well have used Migration Assistant to set it up. I honestly don't remember. I've experimented with Nix on macOS at least once before (though quite a long time ago), so the scenario you're envisioning is definitely plausible.
from nix.
I'm not sure that message isn't a red herring, but i guess we can pull on it. Is this a network volume, by any chance (or do you have one set up to mount)? I searched this error and most results are mentioning samba/smb.
If so, maybe try unmounting them and see if the command still errors?
For reference, here's the main report for the migration issue:
Your error doesn't really match, but it is at least a possibility to keep in mind. That problem did cause group issues, but none of this "too many" stuff afaik.
If you haven't already, it's probably also worth trying to follow the uninstall instructions and see if a reinstall from there works? https://nixos.org/manual/nix/stable/installation/uninstall.html#macos
from nix.
No network volumes involved — just an ordinary MacBook Pro. I did try following the uninstall instructions and trying again; of course, several of the commands are either no-ops or complain about missing files (since the install didn't finish), but I did follow each step. No dice though.
from nix.
No dice == same error?
from nix.
Yes, same error.
from nix.
Can you try to run:
sudo launchctl bootout system/org.nixos.nix-daemon
and then see if the bootstrap command from earlier works?
If so, I'd try to follow the uninstall instructions again, then bootout again for good measure, and then try reinstalling?
from nix.
$ sudo launchctl bootout system/org.nixos.nix-daemon
Boot-out failed: 3: No such process
from nix.
This may be a little annoying to reformat, but if the file /Library/LaunchDaemons/org.nixos.darwin-store.plist
exists on your system, can you copy the shell command (under the array
node following the ProgramArguments
key), strip the plist formatting out of it, and see what you get when you invoke it? (I think you'll need to use sudo.)
from nix.
Hmm, so that did actually work just fine:
$ sudo /bin/sh -c "/usr/bin/security find-generic-password -s 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' -w | /usr/sbin/diskutil apfs unlockVolume 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' -mountpoint '/nix' -stdinpassphrase"
Unlocking any cryptographic user on APFS Volume disk3s7
Unlocked and mounted APFS Volume
from nix.
😅
May be obvious by now, but fair warning that I'm just kinda flailing around for clues at this point.
Does launchctl print system/org.nixos.darwin-store
say anything?
One problem we've had in the past is people who had Nix installed and then disabled one of the services, and launchctl will preserve these even if you've uninstalled. AFAIR these normally produce a pretty clear error about the service being disabled, but I guess we don't know if these can ~survive a migration and how they'd look on the other side.
If it indicates that the service is disabled, see if launchctl enable system/org.nixos.darwin-store
works, (and if so, if the bootstrap command works afterwards?)
from nix.
I really appreciate it! I'd be doing the same in your shoes, I just don't know Nix well enough to know what to look for.
Playing with Nix on macOS in the past I can say pretty confidently that I wouldn't have manually disabled a service via launchctl
.
$ launchctl print system/org.nixos.darwin-store
Bad request.
Could not find service "org.nixos.darwin-store" in domain for system
from nix.
Drat :)
- Can you try the enable command, for grins? I'm not certain if it would print if it had a disabled entry for the service. You might also be able to run a bare
sudo launchctl print system
and look for evidence that it's disabled there. - Are you using a local GUI login session, or any sort of SSH/remote desktop?
- Is this the primary user you set up when you first got the device, or a secondary user account you made after?
from nix.
$ launchctl enable system/org.nixos.darwin-store
Could not enable service: 1: Operation not permitted
$ sudo launchctl enable system/org.nixos.darwin-store
$ echo $status
0
This actually worked! No output but it succeeded.
$ sudo launchctl print system | rg nix
"org.nixos.darwin-store" => enabled
"org.nixos.nix-daemon" => disabled
- I'm using a local GUI login session, just iTerm2 running bare metal.
- This is indeed the primary (and only) user account.
from nix.
Interesting. Can you try repeating the enable command for org.nixos.nix-daemon
and confirm that both turn up enabled in the last print command you ran?
If that also works, I'd try to follow the full uninstall directions again, and see if a fresh install finally works 🤞
from nix.
$ sudo launchctl enable system/org.nixos.nix-daemon
$ echo $status
0
$ sudo launchctl print system | rg nix
"org.nixos.darwin-store" => enabled
"org.nixos.nix-daemon" => enabled
from nix.
So then first (relevant) step of the uninstall guide:
$ sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
Unload failed: 5: Input/output error
Try running `launchctl bootout` as root for richer errors.
$ sudo launchctl bootout system/org.nixos.nix-daemon
Boot-out failed: 3: No such process
from nix.
Hopefully those will prove to be okay, since you don't have any daemons to actually bootout/unload. If the rest of the uninstall went okay, I'd give the install a try.
from nix.
$ sudo dscl . -delete /Groups/nixbld
delete: Invalid Path
<dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
$ for u in (sudo dscl . -list /Users | grep _nixbld); sudo dscl . -delete /Users/$u; end
$ echo $status
1
These steps in the uninstall guide were unhappy, everything else was fine (except for step 2, "stop and remove the Nix daemon services", as previously discussed).
(Also I had to translate the for
loop into fish
syntax but I don't think that contributed anything.)
from nix.
Failures should be okay. Just trying to make sure dangling state's cleaned up before you try installing.
from nix.
...so reinstalling worked this time?! That's mildly unsettling, I don't think I did anything different relative to the first time I tried uninstalling and reinstalling. Regardless, thanks so much for helping me out here!
from nix.
Related Issues (20)
- File flake input broken in latest git version HOT 3
- Bad ownership on /nix/var/nix/*/per-user/void HOT 2
- `builtins.toJSON` impossible to create single backslash followed by certain characters HOT 1
- Assertion failure in `outputsSubstitutionTried` HOT 1
- nix-shell not accessible although installation completed successfully HOT 7
- Crash in `libnixstore-test-support.so` during `make check` HOT 8
- Change `ptrace::write` signature and make it safe HOT 1
- More concise `nix profile list`
- String type hint HOT 3
- `builtins.fetchGit` succeeds where it used to fail HOT 3
- Remove the `repl-flake` experimental feature HOT 1
- `fetchTree` performs fetch even when a `narHash` is provided HOT 1
- repl `:log` does not support derivation paths
- repl remembers non-loadable `:l` for `:r`
- Expose new-cli `--json` commands in the repl HOT 1
- Installer bootstrapping issue due to nix 2.20.3 missing from nixpkgs HOT 3
- libunwind.so.8 missing HOT 1
- Expose the flake inputs to the flakes installables
- Make `builtins.fetchTree` return a path as its `outPath` element
- libgit2 based `fetchGit` cannot clone libsass on macOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix.