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

Pass along proxy environment variables to the browser process #487

Open
wwilsman opened this issue Aug 10, 2021 · 4 comments
Open

Pass along proxy environment variables to the browser process #487

wwilsman opened this issue Aug 10, 2021 · 4 comments
Labels
✨ enhancement New feature or request

Comments

@wwilsman
Copy link
Contributor

Always thought this was handled automatically by the browser with system-level proxies. But that may not always be the case, or system-level proxies might not always be available for some people.

If proxy env vars are defined, we should pass them along to Chromium explicitly with a flag.

@wwilsman
Copy link
Contributor Author

If you're running into an issue getting asset discovery to work with proxy settings, the flag can be passed along to Chromium explicitly via a Percy config file option:

version: 2
discovery:
  launch-options:
    args: ["--proxy-server=XXX"]

@Robdel12 Robdel12 added the ✨ enhancement New feature or request label Aug 11, 2021
@AdrianLThomas
Copy link

Thank you @wwilsman that work around worked for me. We run Cypress against an IP whitelisted website, where we use a proxy to run the tests against. However, when running Percy the screenshots indicated a broken layout. Running Percy in verbose mode indicated an error net::ERR_ABORTED for those CSS assets.

Updating the config to pass Chrome the proxy settings resolved the issue. Surprisingly, it also seemed to pass for Firefox (even though Firefox doesn't appear to support passing of a proxy via a command).

I think this should probably be added to the documentation too as it has taken a good chunk of time to get to the bottom of this.

Thanks again for sharing!

@Robdel12
Copy link
Contributor

Hey @AdrianLThomas! We should be fixing in the near future -- this should be handled automatically.

Surprisingly, it also seemed to pass for Firefox (even though Firefox doesn't appear to support passing of a proxy via a command).

Percy doesn't capture screenshots on your machine. The config that was passed was to the SDKs asset discovery browser, which is there to find & capture the right assets to rerender in Percy's browsers. Here's more info on how Percy works: https://docs.percy.io/docs/debugging-sdks#how-percy-works

@AdrianLThomas
Copy link

Hey @AdrianLThomas! We should be fixing in the near future -- this should be handled automatically.

Surprisingly, it also seemed to pass for Firefox (even though Firefox doesn't appear to support passing of a proxy via a command).

Percy doesn't capture screenshots on your machine. The config that was passed was to the SDKs asset discovery browser, which is there to find & capture the right assets to rerender in Percy's browsers. Here's more info on how Percy works: https://docs.percy.io/docs/debugging-sdks#how-percy-works

Wonderful, makes sense. Thanks for the response!

samarsault pushed a commit that referenced this issue Mar 3, 2023
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants