Several "response to GET <url> failed to parse" errors from cache.nixos.org
attente opened this issue · comments
Not sure if this is an issue with nix-index or cache.nixos.org, but I'm getting a whole lot of "failed to parse" errors when running nix-index
. It's happening to the point that my runtime directory is getting filled with bad responses until it hits 100% capacity:
$ nix-index
+ querying available packages
+ generating index: 00002 paths found :: 00094 paths not in binary cache :: 70944 paths in queue
Error: fetching the file listing for store path '/nix/store/h3xfcsb0k8vx815p5bjqwpj0kx95fr66-node_tiddlywiki-5.1.23' failed
Caused by: response to GET 'http://cache.nixos.org/h3xfcsb0k8vx815p5bjqwpj0kx95fr66.ls' failed to parse (response saved to /run/user/1000/file_listing.json)
Caused by: trailing characters at line 1 column 477574
+ generating index: 00002 paths found :: 00098 paths not in binary cache :: 70940 paths in queue
Error: fetching the file listing for store path '/nix/store/bjm32yp3qgdgrnny81pmzz3hmw1yv8pw-node_svgo-1.3.2' failed
Caused by: response to GET 'http://cache.nixos.org/bjm32yp3qgdgrnny81pmzz3hmw1yv8pw.ls' failed to parse (response saved to /run/user/1000/file_listing.json.1)
Caused by: trailing characters at line 1 column 186117
+ generating index: 00006 paths found :: 00110 paths not in binary cache :: 70924 paths in queue
Error: fetching the file listing for store path '/nix/store/7v6cn8mrq287pg5a2wvzvafyyiar93wf-node_peerflix-server-0.5.1' failed
Caused by: response to GET 'http://cache.nixos.org/7v6cn8mrq287pg5a2wvzvafyyiar93wf.ls' failed to parse (response saved to /run/user/1000/file_listing.json.2)
Caused by: trailing characters at line 1 column 267796
+ generating index: 00030 paths found :: 00208 paths not in binary cache :: 70802 paths in queue
Error: fetching the file listing for store path '/nix/store/h7fr5dr7rw7rxhy2i2lwr47rnwfr2pc7-node_coc-stylelint-1.2.0' failed
Caused by: response to GET 'http://cache.nixos.org/h7fr5dr7rw7rxhy2i2lwr47rnwfr2pc7.ls' failed to parse (response saved to /run/user/1000/file_listing.json.3)
...
Examining these files shows that they are indeed malformed JSON. I'm attaching one as an example (from the request to http://cache.nixos.org/h3xfcsb0k8vx815p5bjqwpj0kx95fr66.ls):
The malformed JSON in this response occurs at byte 477588:
Caused by NixOS/nix@8d651a1. I think we need to wait for the upstream fix.
Actually I think we can find a workaround for this as data is duplicated and not omitted. So we'd just need to figure out how to detect the duplicate chunks.