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

devbox install reports Error: "nix print-dev-env ..." #1821

Closed
uweschmitt opened this issue Feb 19, 2024 · 3 comments
Closed

devbox install reports Error: "nix print-dev-env ..." #1821

uweschmitt opened this issue Feb 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@uweschmitt
Copy link

What happened?

I tried devbox and I get the error message Error: nix print-dev-env.

In debug mode I get /..../.devbox/gen/flake/.git/fsmonitor--daemon.ipc' has an unsupported type

Steps to reproduce

  1. devbox init
  2. devbox add python
  3. devbox install

Command

update

devbox.json

{
  "packages": {
    "python": {
      "version":   "latest",
      "platforms": ["x86_64-darwin"]
    }
  },
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

Devbox version

0.9.1

Nix version

nix (Nix) 2.18.1

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

2024/02/19 13:40:29 findProjectDir: path is 
2024/02/19 13:40:29 finding devbox config in dir: /Users/uweschmitt/tmpx/testdevbox
2024/02/19 13:40:29 findProjectDir: path is 
2024/02/19 13:40:29 finding devbox config in dir: /Users/uweschmitt/tmpx/testdevbox
2024/02/19 13:40:29 findProjectDir: path is 
2024/02/19 13:40:29 finding devbox config in dir: /Users/uweschmitt/tmpx/testdevbox
Ensuring packages are installed.
Reinitialized existing Git repository in /Users/uweschmitt/tmpx/testdevbox/.devbox/gen/flake/.git/
2024/02/19 13:40:29 current environment PATH is: /Users/uweschmitt/.pyenv/shims:/Users/uweschmitt/.pyenv/bin:/usr/local/opt/openssl@3/bin:/opt/homebrew/bin:/opt/homebrew/opt/ruby/bin:/usr/local/bin:/usr/local/sbin:/Users/uweschmitt/.pyenv/bin:/Users/uweschmitt/.local/bin:/Users/uweschmitt/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Library/TeX/texbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/Users/uweschmitt/.docker/bin:/Users/uweschmitt/.pyenv/bin:/usr/local/opt/openssl@3/bin:/opt/homebrew/bin:/opt/homebrew/opt/ruby/bin:/usr/local/sbin:/Users/uweschmitt/.cargo/bin:/Users/uweschmitt/.local/bin
2024/02/19 13:40:29 Running print-dev-env cmd: /nix/var/nix/profiles/default/bin/nix print-dev-env path:/Users/uweschmitt/tmpx/testdevbox/.devbox/gen/flake --extra-experimental-features ca-derivations --option experimental-features nix-command flakes fetch-closure --json
Error: nix print-dev-env --json "path:/Users/uweschmitt/tmpx/testdevbox/.devbox/gen/flake": exit status 1

2024/02/19 13:40:29 Command stderr: error (ignored): error: end of string reached
error:
       … while fetching the input 'path:/Users/uweschmitt/tmpx/testdevbox/.devbox/gen/flake'

       error: file '/Users/uweschmitt/tmpx/testdevbox/.devbox/gen/flake/.git/fsmonitor--daemon.ipc' has an unsupported type

2024/02/19 13:40:29 
ExecutionID:85cb9113338e4cad85786568e09908ff
nix print-dev-env --json "path:/Users/uweschmitt/tmpx/testdevbox/.devbox/gen/flake": exit status 1
go.jetpack.io/devbox/internal/nix.(*Nix).PrintDevEnv
	go.jetpack.io/devbox/internal/nix/nix.go:85
go.jetpack.io/devbox/internal/devbox.(*Devbox).computeEnv
	go.jetpack.io/devbox/internal/devbox/devbox.go:831
go.jetpack.io/devbox/internal/devbox.(*Devbox).syncNixProfileFromFlake
	go.jetpack.io/devbox/internal/devbox/nixprofile.go:20
go.jetpack.io/devbox/internal/devbox.(*Devbox).recomputeState
	go.jetpack.io/devbox/internal/devbox/packages.go:341
go.jetpack.io/devbox/internal/devbox.(*Devbox).ensureStateIsUpToDate
	go.jetpack.io/devbox/internal/devbox/packages.go:271
go.jetpack.io/devbox/internal/devbox.(*Devbox).Install
	go.jetpack.io/devbox/internal/devbox/devbox.go:283
go.jetpack.io/devbox/internal/boxcli.installCmdFunc
	go.jetpack.io/devbox/internal/boxcli/install.go:43
go.jetpack.io/devbox/internal/boxcli.installCmd.func1
	go.jetpack.io/devbox/internal/boxcli/install.go:24
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.8.0/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.8.0/command.go:1115
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.8.0/command.go:1039
go.jetpack.io/devbox/internal/boxcli/midcobra.(*midcobraExecutable).Execute
	go.jetpack.io/devbox/internal/boxcli/midcobra/midcobra.go:61
go.jetpack.io/devbox/internal/boxcli.Execute
	go.jetpack.io/devbox/internal/boxcli/root.go:113
go.jetpack.io/devbox/internal/boxcli.Main
	go.jetpack.io/devbox/internal/boxcli/root.go:136
main.main
	./main.go:11
runtime.main
	runtime/proc.go:267
runtime.goexit
	runtime/asm_arm64.s:1197
2024/02/19 13:40:29 findProjectDir: path is 
2024/02/19 13:40:29 finding devbox config in dir: /Users/uweschmitt/tmpx/testdevbox
@uweschmitt uweschmitt added bug Something isn't working triage Issue needs triage labels Feb 19, 2024
@savil
Copy link
Collaborator

savil commented Feb 20, 2024

@uweschmitt do you have this git config setting enabled in your system?
https://git-scm.com/docs/git-config#Documentation/git-config.txt-corefsmonitor

If so, could you make an exception for the .devbox/ repository in your devbox project folder so that it is disabled for that directory (and sub directories).

For our internal nix functionality, we currently create a git repository. However, that will be going away in the next release of Devbox...the PR for removing it (coincidentally) was merged recently.

@gcurtis gcurtis removed the triage Issue needs triage label Feb 21, 2024
@gcurtis
Copy link
Collaborator

gcurtis commented Feb 21, 2024

Related PR is #1822.

@uweschmitt
Copy link
Author

Thaks a lot for the quick response! In addition to setting core.fsmonitor to false, I also had to delete the existing .devbox/gen/flake/.git/fsmonitor--daemon.ipc file.

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

3 participants