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

Can't add packages. #2446

Open
RashiqAzhan opened this issue Dec 11, 2024 · 1 comment
Open

Can't add packages. #2446

RashiqAzhan opened this issue Dec 11, 2024 · 1 comment
Labels
bug Something isn't working triage Issue needs triage

Comments

@RashiqAzhan
Copy link

What happened?

Can't add packages.
I tried tried devbox add [email protected].

Searching for packages seem to be working.

Steps to reproduce

  1. devbox init
  2. Install python

Command

add

devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.6/.schema/devbox.schema.json",
  "packages": [
    "[email protected]",
    "[email protected]"
  ],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

Devbox version

0.13.6

Nix version

nix (Nix) 2.18.1

What system does this bug occur on?

Linux (x86-64)

Debug logs

time=2024-12-11T23:48:47.571+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:125 msg="searching for config file (including parent directories)" path=.
time=2024-12-11T23:48:47.571+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=devbox.json
time=2024-12-11T23:48:47.571+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:108 msg="trying config file" path=.
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=.../devbox.json
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:133 msg="config file found" path=.../devbox.json dur=494.706µs
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:125 msg="searching for config file (including parent directories)" path=.
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=devbox.json
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:108 msg="trying config file" path=.
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=.../devbox.json
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:133 msg="config file found" path=.../devbox.json dur=182.02µs
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:47.572+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:47.598+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/nix.go:342 msg="nix --version --debug output" out="nix (Nix) 2.18.1\nSystem type: x86_64-linux\nAdditional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux\nFeatures: gc, signed-caches\nSystem configuration file: /etc/nix/nix.conf\nUser configuration files: /home/USER/.config/nix/nix.conf:/home/USER/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf\nStore directory: /nix/store\nState directory: /nix/var/nix\nData directory: /nix/store/wi3ppdjk4rjpmknz4bfxvimdkg1b175d-nix-2.18.1/share\n"
time=2024-12-11T23:48:47.598+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:60 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' eval --impure --raw --expr builtins.currentSystem" cmd.path=/home/USER/.nix-profile/bin/nix
time=2024-12-11T23:48:47.626+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:67 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' eval --impure --raw --expr builtins.currentSystem" cmd.path=/home/USER/.nix-profile/bin/nix cmd.pid=701071 cmd.code=0 cmd.dur=27.702592ms
time=2024-12-11T23:48:47.626+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:125 msg="searching for config file (including parent directories)" path=.
time=2024-12-11T23:48:47.626+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=devbox.json
time=2024-12-11T23:48:47.626+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:108 msg="trying config file" path=.
time=2024-12-11T23:48:47.626+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=.../devbox.json
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:133 msg="config file found" path=.../devbox.json dur=267.955µs
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:47.627+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
Info: Adding package "[email protected]" to devbox.json
time=2024-12-11T23:48:48.184+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:48.184+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:48.184+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-12-11T23:48:48.184+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:85 msg="creating files for package" [email protected]
time=2024-12-11T23:48:48.184+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:85 msg="creating files for package" [email protected]
time=2024-12-11T23:48:48.184+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:128 msg="Creating file %q from contentPath: %q" .../.devbox/virtenv/python/bin/venvShellHook.sh=python/venvShellHook.sh
time=2024-12-11T23:48:48.185+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:48.185+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:48.185+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-12-11T23:48:48.185+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:60 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' store ping --store daemon --json" cmd.path=/home/USER/.nix-profile/bin/nix
time=2024-12-11T23:48:48.217+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:67 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' store ping --store daemon --json" cmd.path=/home/USER/.nix-profile/bin/nix cmd.pid=701110 cmd.code=0 cmd.dur=31.656734ms
time=2024-12-11T23:48:48.217+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devbox/providers/nixcache/setup.go:86 msg="nixcache: running setup: first time setup"
time=2024-12-11T23:48:48.715+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:60 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' path-info --offline --json /nix/store/ldq2aql1llzc6h4z41xcxacyp22ndwvb-typescript-5.6.3 /nix/store/msqgyxmvlw3lhl2vcdvf24558i71n08q-nodejs-slim-23.2.0 /nix/store/6llg9sms6xw69whqpdkgldjz61dlk9c2-python3-3.13.1" cmd.path=/home/USER/.nix-profile/bin/nix
time=2024-12-11T23:48:48.747+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:67 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' path-info --offline --json /nix/store/ldq2aql1llzc6h4z41xcxacyp22ndwvb-typescript-5.6.3 /nix/store/msqgyxmvlw3lhl2vcdvf24558i71n08q-nodejs-slim-23.2.0 /nix/store/6llg9sms6xw69whqpdkgldjz61dlk9c2-python3-3.13.1" cmd.path=/home/USER/.nix-profile/bin/nix cmd.pid=701146 cmd.code=0 cmd.dur=31.828433ms
time=2024-12-11T23:48:48.748+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:48.748+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:48.748+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-12-11T23:48:48.749+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:85 msg="creating files for package" [email protected]
time=2024-12-11T23:48:48.749+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:85 msg="creating files for package" pkg=python313
time=2024-12-11T23:48:48.749+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:128 msg="Creating file %q from contentPath: %q" .../.devbox/virtenv/python/bin/venvShellHook.sh=python/venvShellHook.sh
time=2024-12-11T23:48:48.749+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:48.749+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
time=2024-12-11T23:48:48.749+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-12-11T23:48:48.750+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/shellgen/flake_plan.go:155 msg="creating new patch flake" flake.inputs.devbox=github:jetify-com/devbox/0.13.6 flake.inputs.nixpkgs-glibc=flake:nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c flake.inputs.nixpkgs-2f9d39=github:NixOS/nixpkgs/2f9d395f057a50f8076f633c10519035fce8d773 flake.outputs=[python313]
⣾ Computing the Devbox environment...
time=2024-12-11T23:48:48.751+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/nix.go:85 msg="running print-dev-env cmd" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:.../.devbox/gen/flake"
time=2024-12-11T23:48:48.751+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:60 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:/...
⣽ Computing the Devbox environment...
time=2024-12-11T23:48:48.948+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:67 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:.../.devbox/gen/flake" cmd.path=/home/USER/.nix-profile/bin/nix cmd.stderr="unable to download 'https://api.github
✓ Computed the Devbox environment.

Error: There was an error installing nix packages
source: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:.../.devbox/gen/flake: unable to download 'https://api.github.com/repos/jetify-com/devbox/commits/0.13.6': HTTP error 403: exit code 1

time=2024-12-11T23:48:48.948+06:00 level=ERROR source=go.jetpack.io/devbox/internal/boxcli/midcobra/debug.go:68 msg="command error" stderr="error:\n       … while updating the lock file of flake 'path:.../.devbox/gen/flake?lastModified=1733939305&narHash=sha256-whCsKG052HJAOyIMGszvM87/ojy6%2Bocu7ZBzxbRl9u8%3D'\n\n       … while updating the flake input 'glibc-patch'\n\n       … while updating the flake input 'glibc-patch/devbox'\n\n       … while fetching the input 'github:jetify-com/devbox/0.13.6'\n\n       error: unable to download 'https://api.github.com/repos/jetify-com/devbox/commits/0.13.6': HTTP error 403\n\n       response body:\n\n       {\"message\":\"API rate limit exceeded for 59.153.102.114. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\",\"documentation_url\":\"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting\"}\n" execid=4b30b6c5c86f4a52b04621d614fa1579 stack=<nil>
time=2024-12-11T23:48:48.948+06:00 level=ERROR source=go.jetpack.io/devbox/internal/boxcli/midcobra/debug.go:70 msg="command error" execid=4b30b6c5c86f4a52b04621d614fa1579 stack=<nil>
time=2024-12-11T23:48:48.948+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:125 msg="searching for config file (including parent directories)" path=.
time=2024-12-11T23:48:48.948+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=devbox.json
time=2024-12-11T23:48:48.948+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:108 msg="trying config file" path=.
time=2024-12-11T23:48:48.948+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=.../devbox.json
time=2024-12-11T23:48:48.949+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:133 msg="config file found" path=.../devbox.json dur=442.414µs
time=2024-12-11T23:48:48.949+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=typescript mode=auto
time=2024-12-11T23:48:48.949+06:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:200 msg="package doesn't need patching" pkg=nodejs-slim mode=auto
@RashiqAzhan RashiqAzhan added bug Something isn't working triage Issue needs triage labels Dec 11, 2024
@PhilT
Copy link

PhilT commented Dec 20, 2024

I'd say this is a problem on your machine. I just did the following. Seems to work okay for me:

mkdir sandbox
cd sandbox
devbox init
devbox add [email protected]
Ensuring nixpkgs registry is downloaded.
Downloaded 'github:NixOS/nixpkgs/2f9d395f057a50f8076f633c10519035fce8d773?narHash=sha256-jy34Nf4Tn1ITZcYyMBn1/7jA8bCCIZDpiVahqlCXfww%3D' to '/nix/store/ri2aw0dp8gjpygcx2q1ib5ajh85gc0f0-source' (hash 'sha256-jy34Nf4Tn1ITZcYyMBn1/7jA8bCCIZDpiVahqlCXfww=').
Ensuring nixpkgs registry is downloaded: Success
Info: Adding package "[email protected]" to devbox.json
Info: Installing the following packages to the nix store: [email protected]

python NOTES:
Python in Devbox works best when used with a virtual environment (venv, virtualenv, etc.). Devbox will automatically create a virtual environment using `venv` for python3 projects, so you can install packages with pip as normal.
To activate the environment, run `. $VENV_DIR/bin/activate` or add it to the init_hook of your devbox.json
To change where your virtual environment is created, modify the $VENV_DIR environment variable in your init_hook

This plugin creates the following helper files:
* /data/code/sandbox/.devbox/virtenv/python/bin/venvShellHook.sh

This plugin sets the following environment variables:
* UV_PYTHON=/data/code/sandbox/.devbox/nix/profile/default/bin/python
* VENV_DIR=/data/code/sandbox/.venv

To show this information, run `devbox info python`

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

No branches or pull requests

2 participants