-
Notifications
You must be signed in to change notification settings - Fork 324
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
[MV3 Beta Bug] Automatic mode does not work automatically on Brave or Chrome #1204
Comments
@BigLep I was not able to reproduce the issue, did you connect to the Brave's internal node at: Kubo RPC: http://127.0.0.1:45005 |
@whizzzkid : my feedback on this was under the heading "Experience with fresh install on Brave without using Kubo (neither Brave-managed Kubo or external Kubo)" I'm intentionally not using Kubo. |
@whizzzkid : when is Automatic mode supposed to work? From the settings menu it says "Automatically switch from your local gateway to your default public gateway if the Kubo RPC is unavailable." If I don't have a Kubo node running (and thus not Kubo RPC endpoint and no local gateway) visiting sites like ipfs.tech don't redirect to my external gateway (e.g., ipfs.io). I would expect when visiting ipfs.tech to be redirected to https://ipfs-tech.ipns.dweb.link/. I can confirm this doesn't appear to work with "IPFS Companion RC-MV3 (Beta @ 9f4981c)" on both Chrome and Brave. |
@BigLep thanks for confirming, this makes sense, however this is what the behaviour is with current mv2. This setting only effect the current url if it's being loaded from local kubo, it then gets redirected to public gateway. If the kubo rpc api is unreachable, it does not touch the request and let it resolve over the network. So, ipfs.tech will not redirect to ipfs.io. However if you don't have kubo available then http://docs.ipfs.tech.ipns.localhost:8081/ would get redirected. |
@whizzzkid : maybe quickest to have a verbal conversation. It's probably on my end, but I guess I don't understand the purpose of "automatic mode". I am interpreting it as, "if your Kubo node isn't working is unavailable for some reason, we'l use your public default gateway for all URLs where we have a regex that matches to a CID or IPNS name." |
Thanks @whizzzkid . I was able to ask @lidel some more companion questions during a 1 on 1. I'm still struggling with this option to make sure I understand what it does. If I use companion, have "automatic mode" enabled, and visit http://docs.ipfs.tech.ipns.localhost:8080/, I don't get automatically redirected. I get a redirect indirect I need to interact with (which make sense from a security regard) (see below). That said, I see this interstitial regardless of whether I have "automatic mode" enabled or not. I am wanting to make sure I understand what "Use Automatic Mode - Automatically switch from your local gateway to your default public gateway if the Kubo RPC is unavailable" means. When does this "automatic mode" get invoked? What is the difference in behavior between enabling it vs. disabling it? |
I see what you mean here, based on the language presented by the options screen. However, this was broken from before: #1090 as the node would never load and the extension would not redirect those requests "automatically". So this is the existing behaviour, not introduced by mv3. Now that I think more about it, it should be fixed in both the places. I think it should be straightforward to implement and will take a look at this. On a side note @lidel do you know of a different reason of why localhost requests that were failing did not redirect to public gatways when "automatic mode" was on? Maybe I missed something. |
@BigLep I created #1223 to validate this, the problem seems to be deeper than just redirecting if automatic mode is on, it fails to redirect to localhost if automatic mode is off. I feel we should just have the recovery screen and let the client be recovered. The automatic mode implementation seems to be opposite of what it's actually supposed to be. |
Some historic notes:
Well, we've introduced a nice UX in #1125 – when local node goes/is offline, and localhost page load fails, we don't magically redirect user to public gateway (which could leak their browser history, and suddenly have no integrity check, as its delegated to third party HTTP server).
So with that in mind, I would not change the behavior of "Automatic Mode" or Recovery Page when local node is not available. The behavior @BigLep described in #1204 (comment) is what we want. Perhaps all we need is to clarify "Automatic Mode" label and description in readme, to note that all it does is toggling redirect to LOCAL gateway?
|
Thanks @whizzzkid and @lidel for explaining the intent. This makes sense to me now. Hopefully I make the time up to you guys by being self-sufficient in future in helping others or improving/reviewing docs. Anyways, I think updating the settings text to be more clear.
Maybe also add extra text or help note:
Basically I think we want to get the message across that "If your local gateway's availability is corroborated with the Kubo RPC endpoint availability, then you likely only want to redirect if your gateway and Kubo RPC are up." |
I dunno why the PR doesn't close the issue automatically 😞 |
Gateways only get invoked when the first-class "IPFS” button in the address bar is hit manually.
The text was updated successfully, but these errors were encountered: