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

Files/Explore: unrecognized node type when DAG is not unixfs #1095

Closed
lidel opened this issue Aug 13, 2019 · 4 comments · Fixed by #1115 or #1121
Closed

Files/Explore: unrecognized node type when DAG is not unixfs #1095

lidel opened this issue Aug 13, 2019 · 4 comments · Fixed by #1115 or #1121

Comments

@lidel
Copy link
Member

lidel commented Aug 13, 2019

Problem

#1027 introduced a clickable "Pins" counter on the "Files" screen.

It works fine with empty/new node, but I found a bug that manifests against my pretty old repo which has over 800 pins.

@hacdias let me know if the error is not something obvious, I can look at this closer and provide more info if needed.

Screenshots

2019-08-13--14-28-03

2019-08-13--14-28-47

ss-2019-08-14--13-04-28

Additional context

go-ipfs v0.4.22, ipfs-webui 2.5.0

@hacdias
Copy link
Member

hacdias commented Aug 13, 2019

@lidel thanks for reporting that! Never seen that error in my life. Can objects be symlinks? Can you try calling ipfs.pin.ls() on that repo just to see if it throws?

@lidel
Copy link
Member Author

lidel commented Aug 14, 2019

I think the problem is webui assumes every pin is unixfs (dag-pb or raw), which is true for most of people, but not all.
What is missing is support for other DAG types. Those could be displayed in read-only mode (without filesystem operations such as copy to MFS etc)

I was able to figure out steps to reproduce:

  1. ipfs pin add --recursive=false bafyreiddymapg5zcpma3iu4wingqvois6jirucn5776wdsyg5f3f65v75a (any dag-cbor node will do)
  2. Open pins in Web UI
  3. you should get error like this:
    ss-2019-08-14--13-04-28

Update: I get the same error when you enter dag-cbor CID in Explore screen
(updated issue title to reflect that)

@lidel lidel changed the title Files/pins: unrecognized node type: Symlink Files/Explore: unrecognized node type when DAG is not unixfs Aug 14, 2019
@hacdias hacdias mentioned this issue Aug 15, 2019
16 tasks
@hacdias
Copy link
Member

hacdias commented Aug 16, 2019

What if all non unixfs CIDs link to the Inspector instead of the file viewer? The file viewer is meant for stuff that supports ipfs.files API.

And if the user tries to navigate a non unixfs link, we can suggest to use the inspector.

@lidel
Copy link
Member Author

lidel commented Aug 16, 2019

Opening non-unixfs pins in Explore screen sounds good.
Also, non-unixfs pins should have a different icon (avoid things that look like a file, maybe a plain cube?)

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