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

Automatic redirects to IPFS via gateway don't always work #21454

Closed
stephendonner opened this issue Mar 3, 2022 · 6 comments · Fixed by brave/brave-core#15204
Closed

Automatic redirects to IPFS via gateway don't always work #21454

stephendonner opened this issue Mar 3, 2022 · 6 comments · Fixed by brave/brave-core#15204

Comments

@stephendonner
Copy link

Description

Automatic redirects to IPFS via gateway don't always work

This is with go-ipfs 0.11.0 but also reproduces with the 0.12.0 release.

Steps to Reproduce

  1. install 1.38.20
  2. launch Brave
  3. open brave://settings/ipfs
  4. toggle Redirect IPFS resources to the configured IPFS gateway to On
  5. load https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR

Actual result:

It remains on https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR

Screen Shot 2022-03-03 at 11 05 14 AM

Expected result:

Per https://github.com/brave/qa-resources/blob/654c91cbf44d25cf74c5143c5cb42477458fa7b4/wikitemplate-IPFS.md#automatic-redirects-to-ipfs it should go to ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi

Reproduces how often:

100%

Brave version (brave://version info)

Brave 1.38.20 Chromium: 99.0.4844.51 (Official Build) nightly (x86_64)
Revision d537ec02474b5afe23684e7963d538896c63ac77-refs/branch-heads/4844@{#875}
OS macOS Version 11.6.3 (Build 20G415)

cc @spylogsster @lidel @MadhaviSeelam

@stephendonner
Copy link
Author

Might be a separate case, but it's in the same test section, so including it here for posterity.

Loading https://en.wikipedia-on-ipfs.org/wiki/ with the above pref flipped to On should also -- according to the test plan -- redirect to ipns://en.wikipedia-on-ipfs.org/wiki/

cypt4 added a commit to brave/brave-core that referenced this issue Sep 25, 2022
Resolves brave/brave-browser#21454
Urls in format of https://bafy.ipfs.gateway.io or https://gateway.io/ipfs/bafy
are now redirected to ipfs:// scheme if x-ipfs-path header is received
cypt4 added a commit to brave/brave-core that referenced this issue Oct 14, 2022
Resolves brave/brave-browser#21454
Urls in format of https://bafy.ipfs.gateway.io or https://gateway.io/ipfs/bafy
are now redirected to ipfs:// scheme if x-ipfs-path header is received
@brave-builds brave-builds added this to the 1.46.x - Nightly milestone Oct 18, 2022
@stephendonner
Copy link
Author

stephendonner commented Oct 21, 2022

Verified PASSED using

Brave 1.46.73 Chromium: 107.0.5304.62 (Official Build) beta (x86_64)
Revision 1eec40d3a5764881c92085aaee66d25075c159aa-refs/branch-heads/5304@{#942}
OS macOS Version 11.7 (Build 20G817)

Steps:

  1. installed 1.46.73
  2. launched Brave
  3. opened brave://settings/ipfs
  4. toggled Redirect IPFS resources to the configured IPFS gateway to Enabled
  5. loaded the respective URLs shown below
  6. clicked on the Use a Brave local IPFS node and Use a public gateway options, separately
  7. confirmed the correct URLs loaded

QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR

brave://settings/ipfs interstitial page local IPFS node public gateway
Screen Shot 2022-10-21 at 2 39 23 PM Screen Shot 2022-10-21 at 2 39 41 PM Screen Shot 2022-10-21 at 2 39 53 PM Screen Shot 2022-10-21 at 2 40 43 PM

Wikipedia

brave://settings/ipfs initial webpage(w/IPFS badge) interstitial page local IPFS node public gateway
Screen Shot 2022-10-21 at 2 58 19 PM Screen Shot 2022-10-21 at 2 59 34 PM Screen Shot 2022-10-21 at 2 59 38 PM Screen Shot 2022-10-21 at 2 59 54 PM Screen Shot 2022-10-21 at 3 01 56 PM

@yrliou
Copy link
Member

yrliou commented Oct 25, 2022

It was reverted on master via brave/brave-core#15597, revert to beta is still pending uplift (brave/brave-core#15649), I think we need to reopen this issue and ping uplift team to merge the revert on beta. cc @cypt4

@kjozwiak
Copy link
Member

@yrliou @bridiver going to remove this issue from 1.46.x due to reverting the above work via brave/brave-core#15649. I'll remove the QA Pass-macOS label as this will need to be rechecked again once the code/fix is remerged. Assuming we can re-use this issue 👍

@kjozwiak kjozwiak reopened this Oct 26, 2022
@kjozwiak kjozwiak removed this from the 1.46.x - Beta milestone Oct 26, 2022
@yrliou yrliou added this to the 1.47.x - Nightly milestone Nov 2, 2022
@stephendonner
Copy link
Author

Removed QA Pass-macOS since we'll need to re-verify this in 1.47.x.

@srirambv
Copy link
Contributor

srirambv commented Dec 5, 2022

Verification passed on

Brave 1.47.108 Chromium: 108.0.5359.71 (Official Build) beta (arm64)
Revision 1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}
OS macOS Version 13.0.1 (Build 22A400)
  • Verified steps from issue description
  • Verified when Automatic redirect to IPFS gateway is enabled and resolve set to gateway it loads https://dweb.link/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
  • Verified when Automatic redirect to IPFS gateway is enabled and resolve set to local node it loads ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/
  • Verified when redirect is set to Ask loads the interstitial state
brave://settings/ipfs interstitial page local IPFS node public gateway
image image image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment