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

invalid block when creating new repo #226

Closed
isaacJChen opened this issue Apr 20, 2020 · 2 comments
Closed

invalid block when creating new repo #226

isaacJChen opened this issue Apr 20, 2020 · 2 comments

Comments

@isaacJChen
Copy link

isaacJChen commented Apr 20, 2020

I am getting this error when creating a new repo.

(node:1824) UnhandledPromiseRejectionWarning: Error: invalid block

This is how I am constructing the repo I then pass it into IPFS-js then the error happens
repo = new ipfsRepo('localIPFSDirectory');

Upon further investigation. I noticed that isBlock method is looking for ipld block
image
but my object is an ipfs block
image

I am not sure what the cause of the issue is, but it happens when I use ipfs-repo.

ipfs-repo version: "ipfs-repo": "2.0.0"
ipfs version: "ipfs": "0.42.0"

@achingbrain
Copy link
Member

Please hold off on using ipfs-repo@2.x.x with ipfs until ipfs/js-ipfs#2932 is merged & released.

The ipfs-block module was renamed ipld-block but because they export classes the modules are not compatible. The PR above will bring ipld-block compatibility to ipfs and then you'll be able to upgrade to ipfs-repo@2.x.x.

@achingbrain
Copy link
Member

I'm closing because all the relevant modules were released, please reopen if you are still seeing this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants