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

[Bug]: Show ENS domain in address bar toggle defaults #20910

Closed
PeterYinusa opened this issue Sep 15, 2023 · 7 comments · Fixed by #20915
Closed

[Bug]: Show ENS domain in address bar toggle defaults #20910

PeterYinusa opened this issue Sep 15, 2023 · 7 comments · Fixed by #20915
Labels
regression-RC DEPRECATED: Please use "regresssion-RC-x.y.z" label instead regression-RC-11.1.0 release-11.1.0 Issue or pull request that will be included in release 11.1.0 release-blocker This bug is blocking the next release team-extension-platform Extension Platform team type-bug Something isn't working

Comments

@PeterYinusa
Copy link
Contributor

PeterYinusa commented Sep 15, 2023

Describe the bug

The Show ENS domain in address bar toggle should switch OFF if the IPFS gateway is switched OFF, as the functionality does not work without an IPFS gateway

ens.domains.and.ipfs.mov

Steps to reproduce

  1. Log in to the extension
  2. Click the Account menu, followed by the Settings menu item
  3. Click Settings & Privacy from the left-hand menu
  4. Turn ON the IPFS gateway toggle
  5. Turn ON the Show ENS domain in address bar toggle
  6. navigate to https://metamask.eth/ in another tab
  7. switch back to the extension
  8. Turn OFF the IPFS gateway toggle, Leave Show ENS domain in address bar toggle ON
  9. navigate to https://metamask.eth/ in another tab

Error messages or log output

No response

Version

11.1.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

@PeterYinusa PeterYinusa added type-bug Something isn't working release-blocker This bug is blocking the next release regression-RC DEPRECATED: Please use "regresssion-RC-x.y.z" label instead team-extension-platform Extension Platform team release-11.1.0 Issue or pull request that will be included in release 11.1.0 labels Sep 15, 2023
@gauthierpetetin
Copy link
Contributor

Hi @PeterYinusa ,

The Show ENS domain in address bar toggle should switch OFF if the IPFS gateway is switched OFF, as the functionality does not work without an IPFS gateway

I'm not sure about this assumption, my understanding is:

  1. In some cases, an ENS resolves to an IPFS website. Ex: https://vitalik.eth/ => https://bafybeidj4gxdnaau7xzt52nxxrla7oyu75shok3xngyu6buww4zu6zvhmu.ipfs.dweb.link/
  2. In some cases, an ENS resolves to a website that's not on IPFS. Ex: https://metamask.eth/ => https://app.ens.domains/metamask.eth

If that's correct, it means the Show ENS domain in address bar toggle doesn't have to switch OFF if the IPFS gateway is switched OFF.

It's worth being investigated though.

@legobeat
Copy link
Contributor

legobeat commented Sep 16, 2023

Yes, ENS resolution and integration shouldn't depend on IPFS connectivity being available. If it does today in some way, that sounds like a separate issue worth investigating.

https://docs.ens.domains/dapp-developer-guide/resolving-names#looking-up-other-resources

E.g. if MetaMask Extension is used Tor Browser and navigates to example.eth resolving to example.onion, I assume the intention is that example.eth should still be displayed in the address bar and shouldn't require IPFS?

@PeterYinusa
Copy link
Contributor Author

PeterYinusa commented Sep 18, 2023

@gauthierpetetin My assumption is that most will be static website content hosted on IPFS.
Thanks for providing more info, as I now see that my assumption was incorrect.
However, both https://vitalik.eth/ (IPFS) and https://metamask.eth/ (not IPFS) do not resolve with IPFS gateway OFF and Show ENS domains in address bar ON. They only resolve when both the above settings are ON.

Hi @PeterYinusa ,

The Show ENS domain in address bar toggle should switch OFF if the IPFS gateway is switched OFF, as the functionality does not work without an IPFS gateway

I'm not sure about this assumption, my understanding is:

  1. In some cases, an ENS resolves to an IPFS website. Ex: https://vitalik.eth/ => https://bafybeidj4gxdnaau7xzt52nxxrla7oyu75shok3xngyu6buww4zu6zvhmu.ipfs.dweb.link/
  2. In some cases, an ENS resolves to a website that's not on IPFS. Ex: https://metamask.eth/ => https://app.ens.domains/metamask.eth

If that's correct, it means the Show ENS domain in address bar toggle doesn't have to switch OFF if the IPFS gateway is switched OFF.

It's worth being investigated though.

@PeterYinusa
Copy link
Contributor Author

I've placed the DO NOT MERGE label on #20915 so we can continue the discussion on this issue.

@gauthierpetetin
Copy link
Contributor

gauthierpetetin commented Sep 18, 2023

@PeterYinusa , indeed what you outline is unexpected behaviour.
Expected behaviour is the following:

  • When Show ENS domain in address bar toggle is ON and IPFS gateway is ON => All should resolve
  • When Show ENS domain in address bar toggle is ON and IPFS gateway is OFF => https://metamask.eth/ (not IPFS) should resolve and https://vitalik.eth/ (IPFS) should not resolve
  • When Show ENS domain in address bar toggle is OFF and IPFS gateway is ON => https://metamask.eth/ (not IPFS) should not resolve and https://vitalik.eth/ (IPFS) should resolve
  • When Show ENS domain in address bar toggle is OFF and IPFS gateway is OFF => None should resolve

@tommasini do you confirm that's aligned with what we have on Mobile.

@tommasini
Copy link

Yes! That's what we have almost finished on mobile 🙏🏼

darkwing added a commit that referenced this issue Sep 21, 2023
* Fix #20910 - Turn off ENS resolution if IPFS is turned off

* Updated WIP

* Implement conditions for ENS and IPFS settings

* Remove initial fix

* Fix e2es
@metamaskbot metamaskbot added the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Sep 21, 2023
danjm pushed a commit that referenced this issue Sep 22, 2023
* Fix #20910 - Turn off ENS resolution if IPFS is turned off

* Updated WIP

* Implement conditions for ENS and IPFS settings

* Remove initial fix

* Fix e2es
@gauthierpetetin gauthierpetetin removed the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Oct 25, 2023
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity May 15, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-RC DEPRECATED: Please use "regresssion-RC-x.y.z" label instead regression-RC-11.1.0 release-11.1.0 Issue or pull request that will be included in release 11.1.0 release-blocker This bug is blocking the next release team-extension-platform Extension Platform team type-bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants