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

IPLD Explorer error: Invalid version, must be a number equal to 1 or 0 #1726

Closed
lidel opened this issue Feb 26, 2021 · 1 comment · Fixed by #1750
Closed

IPLD Explorer error: Invalid version, must be a number equal to 1 or 0 #1726

lidel opened this issue Feb 26, 2021 · 1 comment · Fixed by #1750
Labels
area/screen/explore Issues related to IPLS Explorer screen kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding P0 Critical: Tackled by core team ASAP
Milestone

Comments

@lidel
Copy link
Member

lidel commented Feb 26, 2021

Opening IPLD Explorer → Project Apollo on a fresh browser profile (empty caches) produces:

2021-02-26--15-10-39

Was able to reproduce in Firefox and Brave.

Needs analysis, I suspect CID lib versions got out of sync between webui and explorer component.

@lidel lidel added kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding area/screen/explore Issues related to IPLS Explorer screen P0 Critical: Tackled by core team ASAP labels Feb 26, 2021
@woss
Copy link

woss commented Mar 19, 2021

TBH the webui source code is quite confusing to read and understand. Probably it has been written by a pure genius. :)

Issue is that the cid.version is required to be 0 or 1, but it gets the Uint8Array and then it fails here https://github.com/multiformats/js-cid/blob/master/src/cid-util.js#L19 and it starts from here https://github.com/ipld/js-ipld-dag-pb/blob/master/src/dag-link/dagLink.js#L25

There is a lot going on here, I spent 3 hours debugging and I found nothing. I know my way around programming and JS but this amount of complexity is just not needed.

Little advice to the core team, if you want people to help you, make sure they can debug and understand the code.

Also for the ref https://discuss.ipfs.io/t/error-invalid-version-must-be-a-number-equal-to-1-or-0-with-js-ipfs-0-44-0/8107/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/screen/explore Issues related to IPLS Explorer screen kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding P0 Critical: Tackled by core team ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants