Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Attempt to uninstall and reinstall devbox failed #1712

Closed
cschoreisz-pillar opened this issue Jan 9, 2024 · 6 comments
Closed

[Bug]: Attempt to uninstall and reinstall devbox failed #1712

cschoreisz-pillar opened this issue Jan 9, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@cschoreisz-pillar
Copy link

cschoreisz-pillar commented Jan 9, 2024

Current Behavior (bug)
Upon upgrading to latest version, nix started throwing errors, and I could not do devbox shell anymore.
I then tried to fully uninstall devbox following these instructions (complemented by How to remove Nix and this comment as well)

  • uninstall devbox
  • erase then remove Nix Store from disk utilities
  • remove lingering nix files and folders
  • empty bin
  • delete all nixbld0, nixbld1, ... nixbldn users
  • restart laptop
  • reinstall devbox

Upon reinstalling and running devbox shell for the first time, I got this error message:

...
install: mkdir /etc/nix

~~> Installing Nix
      Alright! We have our first nix at /nix/store/6zi5fqzn9n17wrk8r41rhdw4j7jqqsi3-nix-2.18.1
      Just finished getting the nix database ready.

~~> Setting up shell profiles: /etc/bashrc /etc/profile.d/nix.sh /etc/zshrc /etc/bash.bashrc /etc/zsh/zshrc

# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix


# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix


# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix


~~> Setting up shell profiles for Fish with conf.d/nix.fish inside /etc/fish /usr/local/etc/fish /opt/homebrew/etc/fish /opt/local/etc/fish

~~> Setting up the default profile
installing 'nix-2.18.1'
error: the build users group 'nixbld' has no members

---- oh no! --------------------------------------------------------------------
Oh no, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(

We'd love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community
Error: exit status 1

Error: There was an internal error. Run with DEVBOX_DEBUG=1 for a detailed error message, and consider reporting it at https://github.com/jetpack-io/devbox/issues

Expected Behavior (fix)
I would like to successfully run devbox shell

Additional context

  • OS: macOS Monterrey 12.5.1, intelCore i9
  • devbox version 0.8.5
  • devbox.json:
{
  "packages": [
    "nodejs@18",
    "nodePackages.pnpm",
    "postgresql",
    "nodePackages.typescript-language-server",
    "nodePackages.prettier",
    "colima"
  ],
  "nixpkgs": {
    "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
  },
  "shell": {
    "scripts": {
      "pnpm-store-path": "pnpm store path",
      "install": "pnpm i",
      "test": "pnpm turbo test:unit"
    }
  }
}
@cschoreisz-pillar cschoreisz-pillar added the bug Something isn't working label Jan 9, 2024
@savil
Copy link
Collaborator

savil commented Jan 9, 2024

yikes!

Upon upgrading to latest version

were you upgrading to the latest version of Devbox, or of nix?

@cschoreisz-pillar
Copy link
Author

Hey @savil I was updating to the latest version of devbox

@cschoreisz-pillar
Copy link
Author

I did a second attempt and it worked !
I did 2 things differently this time:

  • I emptied my bin (it was specified at the bottom of the instructions)
  • I removed all nixbld users which I thought I had already done, but turned out it hadn’t worked.

Food for thoughts 🌱 : It'd be great for the instructions' steps to be fully laid out in an easy to find documentation, instead of this tiny guide redirecting to 3 important links, each of them needing to be carefully followed.

@savil
Copy link
Collaborator

savil commented Jan 10, 2024

@cschoreisz-pillar sorry to hear about this poor experience, and glad you are unblocked. Would you happen to know what versions of nix and Devbox you had prior to starting the upgrade?

@cschoreisz-pillar
Copy link
Author

All good @savil, it's always an occasion for me to learn, and I appreciated the fast answers.

I was on 0.5.11 for devbox, and I dont know about the nix version associated to it unfortunately

@savil
Copy link
Collaborator

savil commented Jan 10, 2024

@cschoreisz-pillar Thanks for sharing the version info.

We try hard to ensure Devbox version updates are backwards compatible. That said, the times we have failed to ensure that have affected Devbox's internal logic, rather than the underlying nix system. Its very concerning to me that you had to resort to the drastic measure of re-installing nix. That is not normal at all.

I hope this won't discourage you from updating Devbox more frequently. If you do encounter similar issues next time, please save the output somewhere and file a github issue or hit us up on Discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants