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

Stopped working with Brave #91

Closed
mikhoul opened this issue May 16, 2020 · 7 comments
Closed

Stopped working with Brave #91

mikhoul opened this issue May 16, 2020 · 7 comments

Comments

@mikhoul
Copy link

mikhoul commented May 16, 2020

When I try to look at a source:

image

Console:

image

Regards :octocat:

@mikhoul
Copy link
Author

mikhoul commented May 16, 2020

Same thing happen when I try to download a source:

image

@mikhoul
Copy link
Author

mikhoul commented May 16, 2020

Here the sanitized HAR file:
redacted_jifpbeccnghkjeaalbbjmodiffmgedin.zip

@Rob--W
Copy link
Owner

Rob--W commented May 17, 2020

Brave unconditionally intercepts update requests to Google (even if not originating from the browser process...), and replaces it with a request to go-updater.brave.com:
https://github.com/brave/brave-core/blob/f453ab2a5e8425afea9bd980fb688d8fec137f53/browser/net/brave_common_static_redirect_network_delegate_helper.cc#L77

Someone reported this issue to me last year, but I unfortunately forgot to follow up to that.

A work-around is to replace "clients2" with "clients3" since they seem to point to the same resources.

Another workaround is to use two slashes in front of the path, since Brave's URL interception logic is based on a match pattern that is equivalent to https://clients2.google.com/service/update2/crx"* (combined with the source in Chromium).

I'll look into a way to detect Brave and add a work-around.

Rob--W added a commit that referenced this issue Jul 1, 2020
The logic is applied to the CHROME build without further checks that
specifically targets the Brave browser, because the server's behavior
is the same either way.

Moreover, I would more likely notice a behavioral regression in Chromium
than Brave, because I do not use the latter myself.
@gslin
Copy link

gslin commented May 4, 2021

It seems Brave has changed this code, so // not working anymore (tested against master branch of crxviewer):

bool IsUpdaterURL(const GURL& gurl) {
  static std::vector<URLPattern> updater_patterns(
      {URLPattern(URLPattern::SCHEME_HTTPS,
                  std::string(component_updater::kUpdaterJSONDefaultUrl) + "*"),
       URLPattern(
           URLPattern::SCHEME_HTTP,
           std::string(component_updater::kUpdaterJSONFallbackUrl) + "*"),
#if BUILDFLAG(ENABLE_EXTENSIONS)
       URLPattern(
           URLPattern::SCHEME_HTTPS,
           std::string(extension_urls::kChromeWebstoreUpdateURL) + "*")
#endif
  });
  return std::any_of(
      updater_patterns.begin(), updater_patterns.end(),
      [&gurl](URLPattern pattern) { return pattern.MatchesURL(gurl); });
}

Rob--W added a commit that referenced this issue Mar 28, 2022
- Rely on CORS instead of work-arounds for public XPI files from AMO (#92)
- Add work-around for crx access in Brave (#91)
- Support source viewing of extensions from Microsoft Edge (#95)
- Remove web_accessible_resourced to avoid UUID leak (#100)
- Correct 0-padding of hashes (#104)
- Update jsbeautifier to v1.14.0 (#110)
- Support source viewing of extensions from Thunderbird (#111)
- Fix domain front of AMO in Firefox add-on (#115)
- Recognize CRX3 files served by addons.opera.com (#118)
- Opera only: Add work-around to access addons.opera.com (#119)
- web only: Add crx keyword to input field for keyword search (#99)
- web only: Avoid breakage of web version when an extension runs a script (#113)
- Refactor: remove unsupported declarativeWebRequest path
- Refactor: Use declarative page actions to show button.
@Rob--W
Copy link
Owner

Rob--W commented Mar 28, 2022

Could you confirm whether version 1.6.12 fixes the issue for you?

@gslin
Copy link

gslin commented Mar 28, 2022

Cool thanks, I didn't install 1.6.12 but I installed 1.6.11 from Google official webstore and it's working...

Not sure what happened, but anyway it's a good news :-)

@Rob--W
Copy link
Owner

Rob--W commented Mar 28, 2022

I'll remove the workaround with a future update then, as a cleanup.

On Brave's end this probably started working again due to the changes from brave/brave-core@b3802c6

Rob--W added a commit that referenced this issue Apr 18, 2022
This reverts commit 791fef1.

The work-around is not needed any more because Brave refactored, per
https://github.com/Rob--W/crxviewer/issues/91#issuecomment-1080216994
Rob--W added a commit that referenced this issue Apr 18, 2022
- Work around Chrome bug to show button (#120)
- Remove obsolete work-around for Brave (#91)

This release only affects the Chrome and Opera builds,
the Firefox and web builds have not changed.
@Rob--W Rob--W closed this as completed Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants