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

ipfs.dag.get fails with a map error only in IPFS Companion #856

Closed
dysbulic opened this issue Apr 1, 2020 · 2 comments
Closed

ipfs.dag.get fails with a map error only in IPFS Companion #856

dysbulic opened this issue Apr 1, 2020 · 2 comments
Assignees
Labels
area/window-ipfs Issues related to IPFS API exposed on every page effort/days Estimated to take multiple days, but less than a week exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP

Comments

@dysbulic
Copy link

dysbulic commented Apr 1, 2020

Bug Description

I am using the git-remote-ipld to load git commits into IPFS. I am trying to download a zip of the repo's contents as is done in IGiS.

Running git push ipld:: master gives me ipld://QmWVVMpoyF9dRNimVnGpbioTkkgVkJGNf4FB1sH5nEGsKb, but when I pass that to ipfs.dag.get, I get an error to the console: Cannot read property 'map' of undefined.

When I use the ipfs dag get command in the terminal it returns data.

More importantly, I am able to open the cid in IGiS which uses dag.get, but doesn't use the ipfs-companion.

To Reproduce

  1. Go to https://codepen.io/dysbulic/pen/jOPJKEE
  2. View the console log to see the error.

Desktop

  • OS: Ubuntu v18.04
  • Browser: Chrome v80
  • Version: IPFS Companion v0.4.23
@dysbulic dysbulic added the need/triage Needs initial labeling and prioritization label Apr 1, 2020
@dysbulic dysbulic changed the title ipfs.dag.get ipfs.dag.get fails with a map error only in IPFS Companion Apr 1, 2020
@lidel lidel added area/window-ipfs Issues related to IPFS API exposed on every page exp/expert Having worked on the specific codebase is important effort/days Estimated to take multiple days, but less than a week kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP and removed need/triage Needs initial labeling and prioritization labels Apr 3, 2020
@lidel lidel self-assigned this Apr 3, 2020
@lidel
Copy link
Member

lidel commented Apr 3, 2020

Thank you for reporting this @dysbulic

I suspect this is the same problem as described in #852 (comment): the bug you experience is probably caused by ipfs-companion/window.ipfs exposing older API than latest js-ipfs and js-ipfs-http-client. Need to look closer to confirm tho.

I will be working on the fix (disabling old one, switching to the new API, #843) as soon as I finish #853

Until that happens, avoid using window.ipfs if possible. Apologies for inconvenience.

@lidel lidel mentioned this issue Apr 5, 2020
3 tasks
@lidel
Copy link
Member

lidel commented Oct 19, 2020

We've disabled window.ipfs in #777

@lidel lidel closed this as completed Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/window-ipfs Issues related to IPFS API exposed on every page effort/days Estimated to take multiple days, but less than a week exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP
Projects
None yet
Development

No branches or pull requests

2 participants