Skip to content

Beta cargo update failing with "object not found - no match for ID" #8705

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

Closed
djmcgill opened this issue Nov 6, 2018 · 8 comments
Closed
Labels
A-git Area: anything dealing with git

Comments

@djmcgill
Copy link
Contributor

djmcgill commented Nov 6, 2018

> cargo update --verbose
    Updating crates.io index
error: failed to load source for a dependency on `base64`
Caused by:
  Unable to update registry `https://github.com/rust-lang/crates.io-index`
Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
  object not found - no match for id (bda449abf35bff2a6c0f3bc72e840f02bf054b2a); class=Odb (9); code=NotFound (-3)

This is on the latest beta:

> cargo -V
cargo 1.31.0-beta (efb7972a0 2018-10-24)

I've seen previous issues about cargo not correctly handling changed dependencies, could this be related? I'm going to zip my .cargo and .rustup, let me know if they'd be useful and what the best way to send them would be.

Platform is Windows 10's Debian WSL, i.e. unknown-linux-gnu

@ryanisaacg
Copy link

If you solved this, please let me know. I'm facing the same issue myself.

@djmcgill
Copy link
Contributor Author

djmcgill commented Apr 3, 2020

I did but I wish I'd written down how. I seem to remember it going away after a cargo clean? Either that or a fresh reinstall of my entire Rust stack? Apologies for the vagueness.

@BrianDead
Copy link

I was getting this error and was able to resolve it by removing the 'registry' directory under ~/.cargo

The next time I ran cargo, it refetched and rebuilt packages/crates from scratch.

@ehuss ehuss transferred this issue from rust-lang/rust Sep 15, 2020
@ehuss
Copy link
Contributor

ehuss commented Sep 15, 2020

Transferred to the cargo repository. This sounds like #3561 has maybe returned?

@ehuss ehuss added the A-git Area: anything dealing with git label Sep 15, 2020
@ehuss
Copy link
Contributor

ehuss commented Sep 19, 2020

I think this is a duplicate of #4007, so closing in favor of that.

If any of you still have the problem, can you compress ~/.cargo/registry/index and post it somewhere? I think github supports up to 100mb zip files if you want to attach it here. I'd like to dig through and see if there is some way to reverse-engineer what has gone wrong. (Feel free to post it here or #4007, I'll get it either way.)

@ehuss ehuss closed this as completed Sep 19, 2020
@asayers
Copy link

asayers commented Sep 23, 2020

I was getting this:

error: failed to get `anyhow` as a dependency of package [...]

Caused by:
  failed to load source for dependency `anyhow`

Caused by:
  Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  object not found - no match for id (83dc7519562889d815343161b3bcd95e620e2efc); class=Odb (9); code=NotFound (-3)

Wiping $HOME/.cargo/registry fixed the issue. Here's the contents of registry/anyhow*:

bad-registry.tar.gz

@ehuss
Copy link
Contributor

ehuss commented Sep 23, 2020

@asayers Thanks for sending the snapshot. Unfortunately the part that is needed is the entire .cargo/registry/index/github.com-1ecc6299db9ec823 directory.

@asayers
Copy link

asayers commented Sep 24, 2020

Oh, sorry - it's already gone! 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git
Projects
None yet
Development

No branches or pull requests

5 participants