Skip to content

Unable to select valid proxy from PAC for websocket connections #15344

Closed

Description

@felixrieseberg
  • Output of node_modules/.bin/electron --version: 3.0.4
  • Operating System (Platform and Version): Windows 10 & 7, macOS 10.13
  • Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): All of 2.x.x

When attempting to create a websocket connection, Chrome's network stack attempts to process the pac file to find which proxy to use. It seems that we are able to read the pac file, but unable to pull the correct proxy from it. We are returned an empty string for the proxy file. What's interesting here is that the pac file can be read + resolve a proxy to use for all non websocket connections. Below is a netlog sample showing this that results in the final net_error of "net_error = -336 (ERR_NO_SUPPORTED_PROXIES)":

Expected Behavior
All connections use the same proxy.

Actual behavior

1853: HTTP_STREAM_JOB_CONTROLLER
wss://mpmulti-0k2e.lb.slack-msgs.com/?token=xoxs-[REDACTED]&start_args=%3Fagent%3Dwebapp_[REDACTED]%26agent_version%3D1539741404%26eac_cache_ts%3Dtrue%26cache_ts%3D0%26name_tagging%3Dtrue%26ms_latest%3Dtrue&flannel=3&lazy_channels=1
Start Time: 2018-10-17 07:26:22.489

t=17026 [st= 0] +HTTP_STREAM_JOB_CONTROLLER [dt=91]
--> is_preconnect = false
--> url = "wss://mpmulti-0k2e.lb.slack-msgs.com/?token=xoxs-[REDACTED]&start_args=%3Fagent%3Dwebapp_[REDACTED]%26agent_version%3D1539741404%26eac_cache_ts%3Dtrue%26cache_ts%3D0%26name_tagging%3Dtrue%26ms_latest%3Dtrue&flannel=3&lazy_channels=1"
t=17026 [st= 0] HTTP_STREAM_JOB_CONTROLLER_BOUND
--> source_dependency = 1852 (URL_REQUEST)
t=17026 [st= 0] +PROXY_SERVICE [dt=74]
t=17026 [st= 0] SUBMITTED_TO_RESOLVER_THREAD
--> thread_number = 0
t=17100 [st=74] PROXY_SERVICE_RESOLVED_PROXY_LIST
--> pac_string = ""
t=17100 [st=74] -PROXY_SERVICE
t=17100 [st=74] HTTP_STREAM_JOB_CONTROLLER_PROXY_SERVER_RESOLVED
--> proxy_server = ""
t=17117 [st=91] -HTTP_STREAM_JOB_CONTROLLER

To Reproduce
We're still working on getting this reproduced internally. However, this bug did affect an organization with 35,000+ users with a 100% repro rate.

Screenshots
Sorry, no screenshots.

Additional Information
I know this isn't exactly good enough to get going just yet, so we'll amend this issue once we know more!

Activity

  1. added
    bug/regression ↩️
    app/Slack
    on Oct 23, 2018
  2. self-assigned this
    on Oct 24, 2018
  3. deepak1556 commented on Oct 24, 2018

    @deepak1556
    Member

    Its a bug when using native proxy resolvers with windows and mac. Will backport https://chromium-review.googlesource.com/c/chromium/src/+/1143093 to fix this. Can you share the complete net log, thanks!

  4. added a commit that references this issue on Oct 24, 2018
    9e03783
  5. codebytere commented on Oct 25, 2018

    @codebytere
    Member

    Close in #15374.

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

Metadata

Metadata

Assignees

Labels

3-0-xapp-feedback-programapp/Slackbug/regression ↩️platform/macOSplatform/windows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions