devbox icon indicating copy to clipboard operation
devbox copied to clipboard

[Bug]: Nix threw`SSL connect error (35)` on all `devbox` commands on macOS

Open michaellzc opened this issue 2 years ago • 10 comments

Current Behavior (bug)

Summary: Whenever Nix made network requests, it failed with SSL connect error (35) in the error message

Reproduce:

Follow the Get Started guide to install devbox.

curl -fsSL https://get.jetpack.io/devbox | bash
$ devbox add go_1_19                 
                                                                                                                                                                                                                                                               
warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62.tar.gz': SSL connect error (35); retrying in 269 ms
warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62.tar.gz': SSL connect error (35); retrying in 519 ms
warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62.tar.gz': SSL connect error (35); retrying in 1175 ms
error: download of 'https://github.com/NixOS/nixpkgs/archive/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62.tar.gz' was interrupted
$ DEVBOX_DEBUG=1 devbox shell

onfig.go:125: findProjectDir: path is
config.go:166: finding devbox.json in dir: /Users/michael/<redacted>
[DEBUG] 2023/05/19 21:03:51 go.jetpack.io/devbox/internal/boxcli/midcobra/debug.go:51: Debug mode enabled.
[DEBUG] 2023/05/19 21:03:51 go.jetpack.io/devbox/internal/impl/config.go:125: findProjectDir: path is
[DEBUG] 2023/05/19 21:03:51 go.jetpack.io/devbox/internal/impl/config.go:166: finding devbox.json in dir: /Users/michael/<redacted>
Reinitialized existing Git repository in /Users/michael/<redacted>/.devbox/gen/flake/.git/
[DEBUG] 2023/05/19 21:03:51 go.jetpack.io/devbox/internal/impl/devbox.go:925: failed to clean up script file .hooks.sh, error = remove /Users/michael/<redacted>/.devbox/gen/scripts/.hooks.sh.sh: no such file or directory
Ensuring packages are installed.
[DEBUG] 2023/05/19 21:03:52 go.jetpack.io/devbox/internal/impl/devbox.go:748: current environment PATH is: <redacted>
[DEBUG] 2023/05/19 21:03:52 go.jetpack.io/devbox/internal/nix/nix.go:68: Running print-dev-env cmd: /usr/local/bin/nix print-dev-env /Users/michael/<redacted>/.devbox/gen/flake/flake.nix --extra-experimental-features ca-derivations --option experimental-features nix-command flakes --json
Error: Command: /usr/local/bin/nix print-dev-env /Users/michael/<redacted>/.devbox/gen/flake/flake.nix --extra-experimental-features ca-derivations --option experimental-features nix-command flakes --json: exit status 1

[DEBUG] 2023/05/19 21:03:57 go.jetpack.io/devbox/internal/boxcli/midcobra/debug.go:72: Command stderr: path '/Users/michael/<redacted>/.devbox/gen/flake/flake.nix' does not contain a 'flake.nix', searching up
warning: Git tree '/Users/michael/<redacted>/.devbox/gen/flake' is dirty
warning: error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': SSL connect error (35); retrying in 286 ms
warning: error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': SSL connect error (35); retrying in 600 ms
warning: error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': SSL connect error (35); retrying in 1009 ms
warning: error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': SSL connect error (35); retrying in 2440 ms
error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': SSL connect error (35)
(use '--show-trace' to show detailed location information)

[DEBUG] 2023/05/19 21:03:57 go.jetpack.io/devbox/internal/boxcli/midcobra/debug.go:74:
ExecutionID:40f2f1aa1225442bb07f35c3338e45f0
exit status 1
Command: /usr/local/bin/nix print-dev-env /Users/michael/<redacted>/.devbox/gen/flake/flake.nix --extra-experimental-features ca-derivations --option experimental-features nix-command flakes --json
go.jetpack.io/devbox/internal/nix.(*Nix).PrintDevEnv
        go.jetpack.io/devbox/internal/nix/nix.go:71
go.jetpack.io/devbox/internal/impl.(*Devbox).computeNixEnv
        go.jetpack.io/devbox/internal/impl/devbox.go:760
go.jetpack.io/devbox/internal/impl.(*Devbox).ensurePackagesAreInstalled
        go.jetpack.io/devbox/internal/impl/packages.go:190
go.jetpack.io/devbox/internal/impl.(*Devbox).Shell
        go.jetpack.io/devbox/internal/impl/devbox.go:211
go.jetpack.io/devbox/internal/boxcli.runShellCmd
        go.jetpack.io/devbox/internal/boxcli/shell.go:67
go.jetpack.io/devbox/internal/boxcli.shellCmd.func1
        go.jetpack.io/devbox/internal/boxcli/shell.go:33
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/[email protected]/command.go:916
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/[email protected]/command.go:1044
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/[email protected]/command.go:968
go.jetpack.io/devbox/internal/boxcli/midcobra.(*midcobraExecutable).Execute
        go.jetpack.io/devbox/internal/boxcli/midcobra/midcobra.go:57
go.jetpack.io/devbox/internal/boxcli.Execute
        go.jetpack.io/devbox/internal/boxcli/root.go:95
go.jetpack.io/devbox/internal/boxcli.Main
        go.jetpack.io/devbox/internal/boxcli/root.go:108
main.main
        ./main.go:11
runtime.main
        runtime/proc.go:250
runtime.goexit
        runtime/asm_arm64.s:1172
[DEBUG] 2023/05/19 21:03:57 go.jetpack.io/devbox/internal/impl/config.go:125: findProjectDir: path is
[DEBUG] 2023/05/19 21:03:57 go.jetpack.io/devbox/internal/impl/config.go:166: finding devbox.json in dir: /Users/michael/<redacted>
[DEBUG] 2023/05/19 21:03:57 go.jetpack.io/devbox/internal/impl/config.go:125: findProjectDir: path is
[DEBUG] 2023/05/19 21:03:57 go.jetpack.io/devbox/internal/impl/config.go:166: finding devbox.json in dir: /Users/michael/<redacted>

Expected Behavior (fix)

it works

Additional context

maybe related with https://github.com/jetpack-io/devbox/issues/177 ?

OS: macOS 13.3.1 Network: I can confirm there's no proxy running on the compute, also everything else works just fine but devbox.

$ devbox version -v

Version:     0.5.2
Platform:    darwin_arm64
Commit:      8f579b2c45c730742cbf9b7c400f247abf902775
Commit Time: 2023-05-18T16:18:52Z
Go Version:  go1.20.4
Launcher:    0.2.0

devbox.json

nothing new but the default stuff from devbox init

michaellzc avatar May 20 '23 16:05 michaellzc