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

undefined: blockstore.ErrNotFound #8828

Closed
3 tasks done
Jchicode opened this issue Mar 28, 2022 · 12 comments
Closed
3 tasks done

undefined: blockstore.ErrNotFound #8828

Jchicode opened this issue Mar 28, 2022 · 12 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up
Milestone

Comments

@Jchicode
Copy link

Checklist

Installation method

ipfs-desktop

Version

No response

Config

No response

Description

github.com/ipfs/[email protected]/blocks/blockstoreutil/remove.go:57:51: undefined: blockstore.ErrNotFound

@Jchicode Jchicode added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Mar 28, 2022
@welcome
Copy link

welcome bot commented Mar 28, 2022

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@Jchicode
Copy link
Author

Version is v0.12.1

@Jorropo
Copy link
Contributor

Jorropo commented Mar 29, 2022

@Jchicode Can you provide reproduction instructions pls ?
Your description + installation method makes no sense, AFAIK IPFS-Desktop download pre built binaries, and doesn't build anything making the error you see impossible with your current description.

Secondly even if it builds it, v0.12.1 builds perfectly fine on my machine:

~/k/go-ipfs$ git checkout v0.12.1
~/k/go-ipfs$ go build ./cmd/ipfs

The error you see is likely related to #7074, I guess you have custom code or you are importing go-ipfs in your project and you missmatched the versions of different modules (you have updated the blockstore module but not the go-ipfs one, so you are using two incompatible versions).

@sudeepdino008
Copy link

I faced the exact same issue, but I was trying to use go-ipfs as a library. Raised the issue here - #8881

@Jorropo
Copy link
Contributor

Jorropo commented Apr 13, 2022

@sudeepdino008 it could be that we have mixed deps versions between go-ipfs as a library (which I want to replace) and go-ipfs.

Can you give me a simple reproduce-able case ? (do I just git clone https://github.com/covalenthq/ipfs-pinner and go build ./... ?)

@sudeepdino008
Copy link

@Jorropo You are right. It was mixed deps version issue. I've closed - #8881
I guess basically the latest go-ipfs doesn't have the ErrNotFound fix and therefore would fail? I'd to update to latest master for it to work,

@Jorropo
Copy link
Contributor

Jorropo commented Apr 13, 2022

basically the latest go-ipfs doesn't have the ErrNotFound fix and therefore would fail?

Yeah it doesn't we removed it in #7074 and replaced it with github.com/ipfs/go-ipld-format#ErrNotFound
However go-ipfs as a library has it's own go.mod file that doesn't get automatically updated so go-ipfs as a library still want the old blockstore version.

Well thx I'll see to work on a fix.

@Jorropo Jorropo self-assigned this Apr 13, 2022
@Jorropo Jorropo added P1 High: Likely tackled by core team if no one steps up and removed need/triage Needs initial labeling and prioritization labels Apr 13, 2022
@Jorropo Jorropo added this to the go-ipfs 0.13 milestone Apr 13, 2022
@sudeepdino008
Copy link

@Jorropo Thanks.
can you elaborate a bit on "go-ipfs as a library has it's own go.mod? It's is the same one as that on go-ipfs repo root, right? Or is there a different go.mod as well?

@Jorropo
Copy link
Contributor

Jorropo commented Apr 14, 2022

@sudeepdino008

@sudeepdino008
Copy link

I see. I wasn't actually using the go.mod in docs/examples (though I did use the sample code from there). Just go get wherever needed.

@Jorropo
Copy link
Contributor

Jorropo commented Apr 14, 2022

@sudeepdino008 make sense.
So FYI I've tried it and it works.

I'm pretty certain that you just go get the latest version of the blockstore which require [email protected] (not released yet).
Maybe the example should be more clear about how you are expected to deal with package versions (you must go get versions present in the github.com/ipfs/go-ipfs go.mod of whatever go-ipfs version you are using).

So the issue you were seeing is the blockstore being too new, you should downgrade it.

@Jchicode
Copy link
Author

@Jchicode Can you provide reproduction instructions pls ? Your description + installation method makes no sense, AFAIK IPFS-Desktop download pre built binaries, and doesn't build anything making the error you see impossible with your current description.

Secondly even if it builds it, v0.12.1 builds perfectly fine on my machine:

~/k/go-ipfs$ git checkout v0.12.1
~/k/go-ipfs$ go build ./cmd/ipfs

The error you see is likely related to #7074, I guess you have custom code or you are importing go-ipfs in your project and you missmatched the versions of different modules (you have updated the blockstore module but not the go-ipfs one, so you are using two incompatible versions).

Sorry, I just saw it.
Yes, I quoted the new version of blockstore, I changed its version to v1.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

3 participants