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

breakage with extensions connecting to localhost #15107

Closed
aspiers opened this issue Apr 4, 2021 · 12 comments
Closed

breakage with extensions connecting to localhost #15107

aspiers opened this issue Apr 4, 2021 · 12 comments
Labels
closed/works-for-me feature/shields The overall Shields feature in Brave. feature-request OS/Desktop webcompat/not-shields-related Sites are breaking because of something other than Shields. workaround/shields-down

Comments

@aspiers
Copy link

aspiers commented Apr 4, 2021

Description

At least three extensions which want to open websockets connections to servers on localhost don't work, with connection errors shown on the extension consoles.

Steps to Reproduce

  1. Install and set up Atomic Chrome or Edit with Emacs, so that servers are listening for connections on some localhost port.
  2. Try to edit a <textarea> field
  3. Observe lack of functionality, and errors such as WebSocket connection to 'ws://localhost:64292/' failed and net::ERR_BLOCKED_BY_CLIENT in the extension console logs, as described in Doesn't work with Brave: WebSocket connection to localhost fails danhper/atomic-chrome#36 and Doesn't work on Brave: net::ERR_BLOCKED_BY_CLIENT stsquad/emacs_chrome#179 respectively.

Actual result:

See danhper/atomic-chrome#36 and stsquad/emacs_chrome#179 for exact results.

Expected result:

No connection errors, and extensions work perfectly.

Reproduces how often:

100% reproducible

Brave version (brave://version info)

This was on Brave version 1.21.73 Chromium: 89.0.4389.72 (Official Build) (64-bit).

I have also tested on Google Chrome version 89.0.4389.72 (Official Build) (64-bit) and both extensions work perfectly.

Version/Channel Information:

Only tried with 1.21.73 so far.

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No
  • Does the issue resolve itself when disabling Brave Rewards? No
  • Is the issue reproducible on the latest version of Chrome? No, Chrome 89 works perfectly
@aspiers
Copy link
Author

aspiers commented Apr 4, 2021

I have just tested with a third extension GhostText which works in the same way, and witnessed exactly the same results, i.e. Brave is broken and Chrome is not.

@ryanbr
Copy link

ryanbr commented Apr 6, 2021

Related to this: #15004

@aspiers
Copy link
Author

aspiers commented Apr 6, 2021

Thanks @ryanbr, that's really good to know. Just to confirm: I tried testing with shields down and it didn't help. Is that because the block is happening within the extension rather than within the (unshielded) webpage I'm trying to use the extension on?

@aspiers aspiers changed the title breakage with extensions connecting to localhost websockets breakage with extensions connecting to localhost Apr 6, 2021
@aspiers
Copy link
Author

aspiers commented Apr 6, 2021

As confirmed on stsquad/emacs_chrome#179 this is also a problem with regular HTTP connections, not just websockets. I've updated the title and description accordingly.

@ryanbr
Copy link

ryanbr commented Apr 7, 2021

Not ideal, but turning off ads & trackers in shields globally (via brave://settings/shields) should help with an extension. For a website, it can be tuned more for a per-site basis. @aspiers

@aspiers
Copy link
Author

aspiers commented Apr 8, 2021

Thanks for the info! Is there any way to turn it off for just an extension?

@ryanbr
Copy link

ryanbr commented Apr 8, 2021

Not currently

@bsclifton bsclifton added the webcompat/not-shields-related Sites are breaking because of something other than Shields. label Apr 12, 2021
@bsclifton bsclifton added this to To do in Web Compatibility via automation Apr 12, 2021
@nickform
Copy link

I am being affected by what seems to be this issue but for sites (not extensions) and have two questions. First, what is the rationale behind the policy to block requests to localhost? Second, what is the workflow to workaround this on a per-site basis as referred to by @ryanbr ? Thanks for reading.

@khwerhahn
Copy link

My Websockets also fail. They work both in Firefox and Chrome. Agree with @nickform on the reason that is the case on localhost.

@ShivanKaul
Copy link
Collaborator

@aspiers or anyone else, could you confirm if Shields down or turning off adblocking in general helped with extensions connecting to locahost?

@aspiers
Copy link
Author

aspiers commented Jan 10, 2023

Sorry I can't; I stopped using Brave a while back.

@ShivanKaul
Copy link
Collaborator

I went through the extensions listed here:

  1. https://github.com/danhper/atomic-chrome/ doesn't have a valid Chrome Web Store link any more.
  2. https://github.com/stsquad/emacs_chrome/ doesn't have a valid Chrome Web Store link any more.
  3. https://ghosttext.fregante.com/ works correctly on Brave on the troubleshooting page: https://ghosttext.fregante.com/troubleshooting/

We have been blocking localhost connections using adblock, and adblock doesn't apply to extensions unless you manually turn on brave://flags/#brave-extension-network-blocking. So this is definitely unexpected behaviour, but given that I'm unable to repro, I'm going to close this out. Please let us know if you run into any other extensions that don't work on Brave because of localhost connection issues.

@ShivanKaul ShivanKaul closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
Web Compatibility automation moved this from To do to Done May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed/works-for-me feature/shields The overall Shields feature in Brave. feature-request OS/Desktop webcompat/not-shields-related Sites are breaking because of something other than Shields. workaround/shields-down
Projects
Development

No branches or pull requests

7 participants