ipfs / ipfs-companion

Browser extension that simplifies access to IPFS resources on the web
https://docs.ipfs.tech/install/ipfs-companion/
Creative Commons Zero v1.0 Universal
2.05k stars 325 forks source link

IPFS Companion for Firefox breaks https://pool.pm/tokens #1032

Open erik-ros-devilsberg opened 2 years ago

erik-ros-devilsberg commented 2 years ago

Describe the bug When IPFS companion is enabled for the pool.pm website, the images hosted on IPFS do not show in Firefox. They do show when the IPFS Companion is disabled.

To Reproduce Steps to reproduce the behavior:

  1. make sure IPFS companion is enabled
  2. Go to pool.pm
  3. Click on NFT (button on the top right)
  4. See error
  5. disable IPFS companion
  6. images show up

Expected behavior Images hosted on IPFS should not be hidden by IPFS Companion

Screenshots

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

welcome[bot] commented 2 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within seven business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

lidel commented 2 years ago

Thank you for reporting this! :+1:

Confirmed, something funky is happening in Firefox 94:

2021-12-03_15-53

This is only Firefox, Chromium (Brave) works as expected and loads images from local node. Looks like something changed in the way Firefox handles redirects.

I will look into this later today.

lidel commented 2 years ago

Seems to be related to the way images are lazy-loaded on https://pool.pm, regular images load fine in Firefox 94, adjusting the priority.

The bug seems to have a very limited scope, it does not seem to be a problem for lazy-img load produced with loading="lazy". Below gets redirected just fine:

<!DOCTYPE html>
<img loading="lazy" src="https://gateway.ipfs.io/ipfs/QmZqovRDvphZjA7cNsDaHUGmx71EsH5zARqpLX7RCB89rb" alt="" style="object-fit: contain; margin: 0px auto;" width="128" height="128">

2021-12-03_23-51

This suggests JS code on https://pool.pm may be doing something additional, but the code is minified and I reverse-engineering it would be the last resort.

Asked in https://github.com/SmaugPool/pool.pm/issues/20, parking this until we get more info.