-
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
Opening .eth creates 2 tabs #873
Comments
Original tab fails because browser is unable to connect to the server ( By default IPFS Companion tries to recover from various HTTP failures by checking for DNSLink record and recovering in a new tab, and that is what you observe here. That being said, I agree I suspect the fix is to change this line: // Check if error can be recovered via EthDNS
if (isRecoverableViaEthDNS(request, state)) {
const url = new URL(request.url)
url.hostname = `${url.hostname}.link`
const redirectUrl = url.toString()
log(`onErrorOccurred: attempting to recover from DNS error (${request.error}) using EthDNS for ${request.url} → ${redirectUrl}`, request)
- // TODO: update existing tab
- return createTabWithURL(request, redirectUrl, browser, recoveredTabs)
+ browser.tabs.update({ url: fixedUrl })
+ return
} @abueide is this something you would be interested in submitting PR for? |
@lidel sure, I tested it and its working now. Should I replace the ones in the isRecoverable and isRecoverableViaDNSLink functions for the PR as well? |
@abueide yes, I believe it will be less confusing than having two tabs for now. Instead of changing this everywhere please:
Thanks! |
Describe the bug
A clear and concise description of what the bug is.
when I click on this link: http://ipfs.eth I end up with two tabs: www.ipfs.eth (doesn't load, says it could not connect), and another new tab gets opened to ipfs.eth.link which loads properly. Why is it loading in a new tab instead of redirecting in the old tab? I don't want two tabs every time I click/type in a .eth link. It happens on http://almonit.eth too. Happens in firefox/chrome.
To Reproduce
Steps to reproduce the behavior:
Click on this link with ipfs companion installed in firefox: http://ipfs.eth
Expected behavior
A single tab redirecting to ipfs.eth.link, or at least an option to disable ens name resolution.
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: