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

Refused to set unsafe header proxyAuthorization #17502

Closed
prijkes opened this issue Dec 19, 2016 · 13 comments
Closed

Refused to set unsafe header proxyAuthorization #17502

prijkes opened this issue Dec 19, 2016 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies
Milestone

Comments

@prijkes
Copy link

prijkes commented Dec 19, 2016

  • VSCode Version: 1.8.0
  • OS Version: Windows 7 Professional Service Pack 1
  • Installed Chrome version: 55.0.2883.87 m

I'm having trouble to configure Visual Code to use the local proxy here.
Settings wise I think I'm doing everything OK, but Visual Code won't load extensions or do a version update check. In both cases no message or error is displayed, so I've no idea what I'm doing wrong.

When I open the Developer Tools, I do see errors (on opening Visual Code):

Refused to set unsafe header "Proxy-Authorization"
  o @ workbench.main.js:132
https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery Failed to load resource: net::ERR_TUNNEL_CONNECTION_FAILED

On opening the Extensions tab (View -> Extensions)

×>Refused to set unsafe header "Proxy-Authorization"
  o @ workbench.main.js:132
  (anonymous function) @ workbench.main.js:132
  n.Class.derive._oncancel @ workbench.main.js:32
  t.xhrRequest @ workbench.main.js:132
  e.request @ workbench.main.js:132
  n.request @ workbench.main.js:132
  (anonymous function) @ workbench.main.js:132
  then @ workbench.main.js:32
  e.queryGallery @ workbench.main.js:132
  e.query @ workbench.main.js:132
  e.queryGallery @ workbench.main.js:91
  t.query @ workbench.main.js:129
  t.doSearch @ workbench.main.js:128
  (anonymous function) @ workbench.main.js:128
  e.queue @ workbench.main.js:32
  (anonymous function) @ workbench.main.js:32
  (anonymous function) @ workbench.main.js:32
  g @ workbench.main.js:32
  enter @ workbench.main.js:32
  _run @ workbench.main.js:32
  _completed @ workbench.main.js:32
  (anonymous function) @ workbench.main.js:32
×>POST https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery net::ERR_TUNNEL_CONNECTION_FAILED
  (anonymous function) @ workbench.main.js:132
  n.Class.derive._oncancel @ workbench.main.js:32
  t.xhrRequest @ workbench.main.js:132
  e.request @ workbench.main.js:132
  n.request @ workbench.main.js:132
  (anonymous function) @ workbench.main.js:132
  then @ workbench.main.js:32
  e.queryGallery @ workbench.main.js:132
  e.query @ workbench.main.js:132
  e.queryGallery @ workbench.main.js:91
  t.query @ workbench.main.js:129
  t.doSearch @ workbench.main.js:128
  (anonymous function) @ workbench.main.js:128
  e.queue @ workbench.main.js:32
  (anonymous function) @ workbench.main.js:32
  (anonymous function) @ workbench.main.js:32
  g @ workbench.main.js:32
  enter @ workbench.main.js:32
  _run @ workbench.main.js:32
  _completed @ workbench.main.js:32
  (anonymous function) @ workbench.main.js:32
×>An unknown error occurred. Please consult the log for more details.
  e.doShow	@	workbench.main.js:94
  e.show	@	workbench.main.js:94
  t.onError	@	workbench.main.js:129
  (anonymous function)	@	workbench.main.js:128
  done	@	workbench.main.js:32
  v	@	workbench.main.js:32
  enter	@	workbench.main.js:32
  _run	@	workbench.main.js:32
  _chainedError	@	workbench.main.js:32
  n	@	workbench.main.js:32
  v	@	workbench.main.js:32
  enter	@	workbench.main.js:32
  _run	@	workbench.main.js:32
  _error	@	workbench.main.js:32
  (anonymous function)	@	workbench.main.js:32
  done	@	workbench.main.js:32
  v	@	workbench.main.js:32
  enter	@	workbench.main.js:32
  _run	@	workbench.main.js:32
  _error	@	workbench.main.js

Same issue as #6480? (closed with commit df2bf8b)

Steps to Reproduce:

  1. Open user settings (File -> Preferences -> User Settings)
  2. Set the following settings:
  • http.proxy (http://server:port/)
  • http.proxyAuthorization (Basic encoded-base64-username:password-string)
  • http.proxyStrictSSL (false)
  1. Restart Visual Studio Code
  2. Open the Developer Tools (Help -> Toggle Developer Tools)
  3. Open the Console tab within the Developer Tools
@abargstaedt
Copy link

abargstaedt commented Jan 3, 2017

We have exactly the same problem here since they have introduced the new configuration parameter "http.proxyAuthorization".

Refused to set unsafe header "Proxy-Authorization"

Failed to load resource: net::ERR_TUNNEL_CONNECTION_FAILED

@joaomoreno
Copy link
Member

cc @jrieken

@joaomoreno joaomoreno added this to the January 2017 milestone Jan 3, 2017
@joaomoreno joaomoreno added proxy Issues regarding network proxies extensions Issues concerning extensions labels Jan 3, 2017
@jrieken
Copy link
Member

jrieken commented Jan 3, 2017

@joaomoreno
Copy link
Member

Wow, is that a GOTO statement?

@jrieken
Copy link
Member

jrieken commented Jan 4, 2017

You gotta use what a programming language offers ;-)

@joaomoreno
Copy link
Member

(m => `are ${(w => `you ${m} about`)``} that`)`sure`

@jrieken
Copy link
Member

jrieken commented Jan 4, 2017

Well, at least for labels we have mark occurrences. We should now probably use our new freedom and keep a Set around

screen shot 2017-01-04 at 09 55 34

@joaomoreno
Copy link
Member

👍 Set

I still don't understand what that outer is doing. Wouldn't omitting it result in the same behaviour?

@jrieken
Copy link
Member

jrieken commented Jan 4, 2017

I think I started with break and needed that, but then I also like it being explicit

@joaomoreno joaomoreno modified the milestones: February 2017, March 2017 Feb 21, 2017
@joaomoreno joaomoreno modified the milestones: March 2017, April 2017 Mar 29, 2017
@tolot27
Copy link

tolot27 commented Mar 29, 2017

I do get the same error message. If I don't use http.proxyAuthorization and provide the username and password in http.proxy, I get the following error:

[4764:0329/135059:WARNING:http_network_transaction.cc(311)] Blocked proxy response with status 407 to CONNECT request for marketplace.visualstudio.com:443.
[4764:0329/135059:INFO:CONSOLE(103)] "Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll.", source: file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js (103)

Where do I find this protocol?

@henriquedesousa
Copy link

So what's the solution then?!

@joaomoreno joaomoreno modified the milestones: Backlog, April 2017 Apr 21, 2017
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Apr 21, 2017
@joaomoreno joaomoreno removed the extensions Issues concerning extensions label Apr 25, 2017
@hfishere
Copy link

This bug still on concern?

@joaomoreno
Copy link
Member

Proxy authentication comes with #22369.

Documentation with #27838.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies
Projects
None yet
Development

No branches or pull requests

7 participants