Skip to content

chrome.ipfs: launch|shutdown should control getResolveMethodType #13237

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

Closed
lidel opened this issue Dec 17, 2020 · 1 comment
Closed

chrome.ipfs: launch|shutdown should control getResolveMethodType #13237

lidel opened this issue Dec 17, 2020 · 1 comment

Comments

@lidel
Copy link

lidel commented Dec 17, 2020

This issue is part of IPFS integration.
Tested version: brave-browser-nightly-1.20.36-linux-amd64

Background

chrome.ipfs.launch executed on empty profile triggers go-ipfs download, initializes the repo and starts the IPFS node.
This is good! makes it possible to integrate launch and shutdown with backend selector in IPFS Companion extension Preferences:

2020-12-17--22-03-28
This screenshot comes from wip work tracked in ipfs/ipfs-companion#947

The bug(?)

I noticed that calling chrome.ipfs.launch from IPFS Companion does not change value returned by chrome.ipfs.getResolveMethodType.

The node is installed and started, IPFS node is running, but the ResolveMethodType setting remains at ask which will result in redundant backend selection prompt: user already chose Brave, no need to ask them again when they load something via ipfs://

Expected behavior

Would it be possible for:

  • launch to flip it to local
  • shutdown to gateway
    ?

This way, when node Brave backend was selected via Preferences screen above, no additional confirmation needs to happen, and if Companion user decides to use a different backend, then node can be shut down automatically and with ResolveMethodType equal gateway it will continue to work nicely with external nodes (for example: if "external" node type is selected via Companion, it will redirect dweb.link to gateway provided by IPFS Desktop)

Alternative behavior

make chrome.ipfs.launch trigger "IPFS consent" dropdown, and return false if user chose to not enable node.

@bbondy
Copy link
Member

bbondy commented Jan 10, 2021

I think this is not a bug. I think it was probably posted because before launch was incorrectly starting the node. Closing, but let me know if you disagree.

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

No branches or pull requests

3 participants