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: issues when browsing /ipfs/{cid} #1665

Open
nuke-web3 opened this issue Oct 7, 2020 · 11 comments
Open

Files: issues when browsing /ipfs/{cid} #1665

nuke-web3 opened this issue Oct 7, 2020 · 11 comments
Assignees
Labels
area/screen/files Issues related to Files screen effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@nuke-web3
Copy link
Member

  • OS: Linux
  • Version of IPFS Desktop 7a8f695

Describe the bug
I am looking at the Apollo archive (listed in the explore tab) at this image (on my local gateway)

http://127.0.0.1:8080/ipfs/QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D/albums/QXBvbGxvIDEwIE1hZ2F6aW5lIDM1L1U=/21328560323_6b33f5d4c3_o.jpg

In the explore tab I also navigated to find the raw CID of the image, which is here (Qmdgqdddt3F2uszEaE7zph7kXbwHX3iTDCWeQjdtNGnQgz):

http://127.0.0.1:8080/ipfs/Qmdgqdddt3F2uszEaE7zph7kXbwHX3iTDCWeQjdtNGnQgz


Bug 1:

Using the Brose search bar up top for that CID gives:
image

The "Try downloading it instead." link correctly gives a .jpeg extension.


Bug 2:

BUT the ... More menu download yields a "Save As..." menu with a .txt file named the CID.

image


Bug 3:

I try to pin/unpin this to my node in the same menu, and receive an error:

image


Bug 4 😉

I can't find this on the GUI anywhere, though I am directed to by the issue template:

ATTACH LOGS

If possible:
1. Go to `Advanced` → `Open Logs Directory`
2. Find `*.log` files
3. Attach `error.log` and `combined.log` to this issue.

I only found the attached logs as I get the notification when I run the application from a terminal

info: [meta] logs can be found on ...../.config/IPFS Desktop
combined.log
2020-09-30T22:23:57.625Z info: [meta] logs can be found on /home/dan/.config/IPFS Desktop
2020-09-30T22:23:59.123Z info: [web ui] window ready
2020-09-30T22:23:59.125Z info: [web ui] navigate to /
2020-09-30T22:23:59.173Z info: [tray] starting
2020-09-30T22:23:59.233Z info: [tray] started
2020-09-30T22:23:59.234Z info: [ipfsd] start daemon STARTED
2020-09-30T22:24:00.988Z info: [daemon] PeerID is Qmb61NjeYWBAUHHfXdZQp2MED8XuXRWrRgrFDG4xtBTQvA
2020-09-30T22:24:00.989Z info: [daemon] Repo is at /home/dan/.ipfs
2020-09-30T22:24:00.999Z info: [ipfsd] start daemon FINISHED 1.7648615709999576s
2020-09-30T22:24:01.033Z error: [updater] Error: ENOENT: no such file or directory, open '/opt/IPFS Desktop/resources/app-update.yml'
2020-09-30T22:24:01.041Z info: [npm on ipfs] 1st time running and package is not installed
2020-09-30T22:24:01.048Z info: [launch on startup] disabled
2020-09-30T22:25:04.825Z info: [web ui] window hidden
2020-09-30T22:25:09.306Z info: [ipfsd] stop daemon STARTED
2020-09-30T22:25:09.591Z info: [ipfsd] stop daemon FINISHED 0.2849655619999394s
2020-09-30T22:25:09.602Z info: [ipfsd] start daemon STARTED
2020-09-30T22:25:12.081Z info: [daemon] PeerID is Qmb61NjeYWBAUHHfXdZQp2MED8XuXRWrRgrFDG4xtBTQvA
2020-09-30T22:25:12.082Z info: [daemon] Repo is at /home/dan/.ipfs
2020-09-30T22:25:12.082Z info: [ipfsd] start daemon FINISHED 2.4798767619999125s
2020-09-30T22:25:19.510Z info: [web ui] navigate to /
2020-09-30T22:25:21.520Z info: [web ui] navigate to /peers
2020-09-30T22:25:27.988Z info: [web ui] navigate to /settings
2020-09-30T22:25:35.808Z info: [web ui] window hidden
2020-09-30T22:25:39.293Z info: [ipfsd] stop daemon STARTED
2020-09-30T22:25:39.339Z info: [ipfsd] stop daemon FINISHED 0.04602136099990457s
2020-10-06T00:46:25.316Z info: [meta] logs can be found on /home/dan/.config/IPFS Desktop
2020-10-06T00:46:26.913Z info: [web ui] window ready
2020-10-06T00:46:26.914Z info: [web ui] navigate to /
2020-10-06T00:46:26.973Z info: [tray] starting
2020-10-06T00:46:27.028Z info: [tray] started
2020-10-06T00:46:27.028Z info: [ipfsd] start daemon STARTED
2020-10-06T00:46:29.373Z info: [daemon] PeerID is Qmb61NjeYWBAUHHfXdZQp2MED8XuXRWrRgrFDG4xtBTQvA
2020-10-06T00:46:29.374Z info: [daemon] Repo is at /home/dan/.ipfs
2020-10-06T00:46:29.374Z info: [ipfsd] start daemon FINISHED 2.3457141930013896s
2020-10-06T00:46:29.400Z error: [updater] Error: ENOENT: no such file or directory, open '/opt/IPFS Desktop/resources/app-update.yml'
2020-10-06T00:46:29.408Z info: [ipfs on path] no action taken
2020-10-06T00:46:29.410Z info: [launch on startup] disabled
2020-10-07T01:50:24.447Z info: [meta] logs can be found on /home/dan/.config/IPFS Desktop
2020-10-07T01:50:25.710Z info: [web ui] window ready
2020-10-07T01:50:25.711Z info: [web ui] navigate to /
2020-10-07T01:50:25.811Z info: [tray] starting
2020-10-07T01:50:25.860Z info: [tray] started
2020-10-07T01:50:25.861Z info: [ipfsd] start daemon STARTED
2020-10-07T01:50:26.143Z info: [daemon] removing api file
2020-10-07T01:50:27.602Z info: [ipfsd] start daemon FINISHED 1.7408583110049367s
2020-10-07T01:50:27.631Z error: [updater] Error: ENOENT: no such file or directory, open '/opt/IPFS Desktop/resources/app-update.yml'
2020-10-07T01:50:27.636Z info: [ipfs on path] no action taken
2020-10-07T01:50:27.639Z info: [launch on startup] disabled
2020-10-07T02:14:46.318Z info: [web ui] launching web ui
2020-10-07T02:22:28.788Z info: [web ui] window hidden
2020-10-07T02:22:36.966Z info: [web ui] launching web ui
error.log
2020-09-30T22:24:01.033Z error: [updater] Error: ENOENT: no such file or directory, open '/opt/IPFS Desktop/resources/app-update.yml'
2020-10-06T00:46:29.400Z error: [updater] Error: ENOENT: no such file or directory, open '/opt/IPFS Desktop/resources/app-update.yml'
2020-10-07T01:50:27.631Z error: [updater] Error: ENOENT: no such file or directory, open '/opt/IPFS Desktop/resources/app-update.yml'
@nuke-web3
Copy link
Member Author

I figured these were minor enough as I discovered them to group here, I can parse into separate issues if you see fit 🙏🏼

@ipfs ipfs deleted a comment from welcome bot Oct 7, 2020
@jessicaschilling jessicaschilling transferred this issue from ipfs/ipfs-desktop Oct 7, 2020
@jessicaschilling
Copy link
Contributor

(Transferring issue to webui repo.)

@jessicaschilling
Copy link
Contributor

Thanks, @nukemandan. We'll investigate these in more depth in our next weekly triage.

@jessicaschilling
Copy link
Contributor

jessicaschilling commented Oct 7, 2020

Some notes for triage:

jessicaschilling added a commit to ipfs/ipfs-desktop that referenced this issue Oct 7, 2020
Per ipfs/ipfs-webui#1665, make instructions for logs clearer for Linux users who don't see a system tray menu.
jessicaschilling added a commit to ipfs/ipfs-desktop that referenced this issue Oct 7, 2020
* Update bug report template

Per ipfs/ipfs-webui#1665, make instructions for logs clearer for Linux users who don't see a system tray menu.

* Update .github/ISSUE_TEMPLATE/bug_report.md

Co-authored-by: Marcin Rataj <lidel@lidel.org>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
@nuke-web3
Copy link
Member Author

RE: bug 1 - this is expected behaviour I think, as a raw CID does not contain file header information like a file that has human readable MFS extensions... I would think it possible to auto detect this in browser, I know that on Linux at least, with no extension the OS usually detects the file type somehow...

RE: bug 4 - I actually do have the tray icon! But I did not realize that was where I was to look! I was only trying to find this in the full window GUI.

The error logs seem to indicate updating automatically is not working, possibly only due to the updater not being installed correctly by my or the .deb package? (Revision 7a8f695)

@nuke-web3
Copy link
Member Author

I updated to v0.13.0 via the .deb release and have the same updating error. I can port this to a new issue if you like 😁

@jessicaschilling
Copy link
Contributor

@nukemandan - An updating issue would be specific to Desktop, so if you're able to open an issue in https://github.com/ipfs-shipyard/ipfs-desktop with any relevant details, that would be very helpful.

@jessicaschilling jessicaschilling added the kind/bug A bug in existing code (including security flaws) label Oct 9, 2020
@lidel
Copy link
Member

lidel commented Oct 15, 2020

Thank you @nukemandan!
In the future, please fill each bug in separate issue, even if its tiny!, it makes easier for us to triage :-)

Did a quick analysis of bug 1:

Problem occurs because ipfs-webui does not do full-blown proper content-type sniffing, it only looks at filename https://github.com/ipfs-shipyard/ipfs-webui/blob/95319bab6e1d915bff1d83717752ec2f8312f715/src/files/file-preview/FilePreview.js#L21

That is why opening https://webui.ipfs.io/#/ipfs/Qmdgqdddt3F2uszEaE7zph7kXbwHX3iTDCWeQjdtNGnQgz fails because it has no file extension to work with.

Quick fix would be to add ?filename=name.jpg, but that works only when we know the type of file.

More robust fix would be to detect situation like this, read first n bytes via ipfs.cat and pass them to content-type sniffer.
Prior art is already in the basic gateway implemented in js-ipfs:

@nuke-web3
Copy link
Member Author

Happy to craft separate issues referencing this one and closing it if that helps @lidel 🙇🏼

@lidel lidel changed the title Can't preview image file -- download in menu appends .txt file extention Files: issues when browsing /ipfs/{cid} Oct 19, 2020
@lidel lidel added area/screen/files Issues related to Files screen exp/intermediate Prior experience is likely helpful effort/days Estimated to take multiple days, but less than a week P1 High: Likely tackled by core team if no one steps up labels Oct 19, 2020
@lidel
Copy link
Member

lidel commented Oct 19, 2020

For this specific case I think we can keep them grouped together (renamed the issue to reflect that) 👍
Note this week is a bit busy for the team, but we will do our best to triage this properly next week.

@jessicaschilling jessicaschilling added P2 Medium: Good to have, but can wait until someone steps up help wanted Seeking public contribution on this issue and removed P1 High: Likely tackled by core team if no one steps up labels Nov 2, 2020
@SgtPooki SgtPooki moved this to To do in IPFS-GUI (PL EngRes) Jul 19, 2022
@SgtPooki SgtPooki added the status/ready Ready to be worked label Dec 2, 2022
@SgtPooki SgtPooki moved this from Needs Grooming to Planned / Backlog in IPFS-GUI (PL EngRes) Dec 2, 2022
@SgtPooki
Copy link
Member

SgtPooki commented Dec 2, 2022

need to repro bugs again to confirm issues after the merging of #1894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/screen/files Issues related to Files screen effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
No open projects
Status: Planned / Backlog
Development

No branches or pull requests

4 participants