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

fix: bundle explore link path #298

Closed

Conversation

vasco-santos
Copy link
Member

After looking at the info in #279 and trying it out, I am a bit clueless if this is a good fix as this goes really outside my expertise. Sharing what I discovered.

Going to https://explore.ipld.io/#/explore/QmWYmE8fzNRYg48E5PaDhMfHqfbPjyQVmUjGQfgAsa4NYq and then opening its first link, it will work (https://explore.ipld.io/#/explore/QmWYmE8fzNRYg48E5PaDhMfHqfbPjyQVmUjGQfgAsa4NYq/Links/0), however opening the following link will fail (https://explore.ipld.io/#/explore/QmWYmE8fzNRYg48E5PaDhMfHqfbPjyQVmUjGQfgAsa4NYq/Links/0/Links/0). Per @rvagg input, I figured out the url should have the /Hash in, and trying it out worked: https://explore.ipld.io/#/explore/QmWYmE8fzNRYg48E5PaDhMfHqfbPjyQVmUjGQfgAsa4NYq/Links/0/Hash/Links/0

So, I discovered how to add the Hash, assuming it should always happen when we are on a path with multiple Links? Other solution is to inject the Hash on the table itself (I think by simply changing this https://github.com/ipfs/ipld-explorer-components/blob/master/src/lib/resolve-ipld-path.js#L48 to linkPath). Let me know if any of these solutions and my assumptions are correct


Note: The current error is like #284

image

Closes #279

@ipfs ipfs deleted a comment from welcome bot Jun 25, 2021
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking into this.

Unfortunately, this approach does not seem to work with go-ipfs, which is a hard blocker (ipfs-webui consumes go-ipfs API via js-ipfs-http-client).

I tested this in ipfs-webui and adding /Hash moves the problem one level deeper:
Opening QmWYmE8fzNRYg48E5PaDhMfHqfbPjyQVmUjGQfgAsa4NYq/Links/0/Hash/Links/0 and clicking on Links/0 opens a different CID than expected.

Seems that at some point the target gets confused with the root of the path.

Not sure if there is an easy fix that does not involve big refactor, see my comment #279 (comment), but injecting the hash on the table and limiting that behavior to dag-pb code path sounds like a safer approach.

@lidel
Copy link
Member

lidel commented Jul 2, 2021

Closing for now, let's continue in #279

@lidel lidel closed this Jul 2, 2021
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

Successfully merging this pull request may close these issues.

TypeError while opening Links/
2 participants