ipfs / ipfs-webui

A frontend for an IPFS Kubo and IPFS Desktop
https://webui.ipfs.io
MIT License
1.55k stars 484 forks source link

Media files not played on google chrome #2246

Closed nlko closed 1 month ago

nlko commented 1 month ago

Describe the bug

I'm using the latest google chrome and the media files are not playable/viewable. (same problem on brave it seems)

However, I noticed that

To Reproduce Steps to reproduce the behavior:

  1. Open the chrome browser
  2. Navigate to webui.ipfs.io
  3. In the files section click on a media file (image, audio or video)
  4. The file is not accessible from the webui (broken link icon is displayed for images or the play button is greyed out for audio or video files)

Expected behavior Files should be playable in chrome.

Screenshots

For images (broken link icon): image

For audio/videos (play button stays greyd out): image

Desktop (please complete the following information):

Additional context

lidel commented 1 month ago

Thank you for reporting this.

I was able to reproduce it, but it occurs only on non-local origins like https://webui.ipfs.io because the protocol of localhost gateway gets upgraded to https for some reason:

2024-08-30_21-15_1

There is no TLS on localhost, and that produces error:

2024-08-30_21-15

There is a message which suggests Chrome started force-upgrading URLs to https a while ago:

2024-08-30_21-39

But this should not happen to localhost URLs which are a secure context already. Possibly, this is a new regression specific to localhost.

Note that Kubo had subdomain gateway, so http://locahost:8080/ipfs/cid will redirect to http://cid.ipfs.localhost:8080 – perhaps subdomains are not interpreted as secure context correctly and that triggers forced upgrade to https. switching to IP should help.

@nlko A workaround until this is fixed is to use webui provided by Kubo on the RPC port itself: http://127.0.0.1:5001/webui/

lidel commented 1 month ago

Confirmed this was fixed in https://github.com/ipfs/ipfs-webui/pull/2253 You can use https://dev.webui.ipfs.io/ until a new release is cut next week.