cachix-action: `cachix: CppStdException "Exception: path '/nix/store/...' is not valid; type: nix::InvalidPath"`

I’m seeing a weird error trying to use cachix-action.

/home/runner/work/_actions/cachix/cachix-action/v10/dist/main/push-paths.sh /home/runner/.nix-profile/bin/cachix ploop 
cachix: CppStdException "Exception: path '/nix/store/ab3yh7s8rms16b66jlbbzvjaif94ls93-python3.9-apache-beam-2.35.0' is not valid; type: nix::InvalidPath"
Error: Action failed with error: Error: The process '/home/runner/work/_actions/cachix/cachix-action/v10/dist/main/push-paths.sh' failed with exit code 1

Here’s a link to the failed run: https://github.com/samuela/nixpkgs-upkeep/runs/4976168659?check_suite_focus=true.

Am I doing something wrong?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 18 (8 by maintainers)

Most upvoted comments

This is now fixed in https://github.com/cachix/cachix/pull/410

I’ll make a release and let you know once it hits the channels!

Thanks for reporting!

0.7.0 should fix this, I’ll update the official url.

great news @domenkozar, thank you 🙌

Thanks so much @domenkozar!

To reproduce:

nix-build -E '(import <nixpkgs> {}).runCommand "foo" {} "sleep 999999999"'

Then in another terminal:

$ find /nix/store -maxdepth 1 -name *.drv.chroot
/nix/store/nz0ziflbx07n04szdhg0f60jk5givdla-foo.drv.chroot

And finally:

$ cachix push mycache /nix/store/nz0ziflbx07n04szdhg0f60jk5givdla-foo.drv.chroot
cachix: CppStdException e "\ESC[31;1merror:\ESC[0m path '\ESC[35;1m/nix/store/nz0ziflbx07n04szdhg0f60jk5givdla-foo.drv.chroot\ESC[0m' is not valid"(Just "nix::InvalidPath")
``

Anyone know of a workaround for this issue? I’m running into it on a GitHub action that ends up building GHC. It eventually times out. Then it hits this error and so every build needs to rebuild GHC and ends up timing out and failing.

We’re seeing this, too:

Post job cleanup.
Cachix: push
  /home/runner/work/_actions/cachix/cachix-action/v10/dist/main/push-paths.sh /home/runner/.nix-profile/bin/cachix adamatic-bridge 
  cachix: CppStdException "Exception: \ESC[31;1merror:\ESC[0m path '\ESC[35;1m/nix/store/w7wj6qd654qwq9595r28bp1b6vp3fvky-nodejs-14.18.1.drv.chroot\ESC[0m' is not valid; type: nix::InvalidPath"
  Error: Action failed with error: Error: The process '/home/runner/work/_actions/cachix/cachix-action/v10/dist/main/push-paths.sh' failed with exit code 1

EDIT: Using cachix-action@10 EDIT2: This happens only when the build itself fails (after which cachix-action runs and also fails)

Tried again today with cachix-action@10, same issue.