Ipfs-companion: ipfs://CIDv0 does not work in Firefox 70

Created on 14 Nov 2019  Â·  7Comments  Â·  Source: ipfs/ipfs-companion

Part of https://github.com/ipfs/ipfs/issues/337

Catching unhandled protocols is an experiment enabled by default:

2019-11-15--12-52-39

Issue with address bar / a href

ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
gets lower-cased and produces an error in Firefox 70:

Screenshot_2019-11-14 Issue with Protocol Handler

Issue with img src

<img src="ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR" />

Fails to load.

Todo

  • [x] see if it happens before or after handler in webextension
  • [x] update error page to educate about case-sensitivity in native URLs and suggest use of CIDv1b32

    • idea: text field for pasting CIDv0 that does automatic conversion ?

cc https://github.com/ipfs-shipyard/ipfs-companion/issues/527

kinbug help wanted good first issue arecidv1b32

Most helpful comment

I ran into this today, the display of the fix in #824 being in a red box didn't help me understand the fix as I skimmed right over that, only after went to report an issue, searched and found this then went back and looked again did I realize what the page was saying, may need some tweaking of the display and/or text? cc @jessicaschilling

All 7 comments

I ran into this today, the display of the fix in #824 being in a red box didn't help me understand the fix as I skimmed right over that, only after went to report an issue, searched and found this then went back and looked again did I realize what the page was saying, may need some tweaking of the display and/or text? cc @jessicaschilling

@andrew -- thanks for raising this. Agreed that we can make the text in the red box more specific and helpful (and therefore less likely to be ignored). I'm currently working through a crib sheet of miscellaneous Companion UI fixes and will add it to that and name-check this issue when the changes make their way into a PR.

@lidel -- Sorry to ask for the hint, but can I check in on the best way of addressing this when you have the chance? Unless I'm missing something, sounds like the best approach is just to modify the error page and then point Companion to the new page's CID. True?

@jessicaschilling Correct.

This error page is loaded from IPFS because of how Firefox protocol_handler API works (this entire issue is Firefox-specific): the redirect has to be to a remote Origin, so I used public gateway.

If you want to tackle this, update CID with new version in those places:

@lidel and @andrew -- how about this?
https://gateway.ipfs.io/ipfs/QmTcoFD4WqmcT3uA7z3cF42uMRFJmnHZfPUjmdm8Du5gew

Local screenshots with fake URIs bashed in for the sake of illustration:

@lidel, note inline favicon 😉

If either of you would be kind enough to look through the code for that page, would greatly appreciate -- once we're OK with the page I'll change the CID references in Companion in a new PR.

Can we add ipns:// example to:

  • A valid CIDv1 – this looks like ipfs://{CIDv1} or ipns://{CIDv1}

And shorten DNSLink one to:

  • A valid DNSLink – this looks like ipns://{domain-name-with-DNSLink}

Otherwise LGTM!
Feel free to open a PR that updates the CID everywhere :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lidel picture lidel  Â·  5Comments

flowpoint picture flowpoint  Â·  3Comments

lidel picture lidel  Â·  3Comments

lidel picture lidel  Â·  4Comments

lidel picture lidel  Â·  5Comments