Cannot install behind corporate proxy with authentication

See original GitHub issue

Current behavior:

I still experience installation issue behind the proxy of my company (same as #4583 and #4988).

λ npm i -D cypress
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142

> cypress@3.8.3 postinstall c:\Projects\RnD\tmp\fluxys-framework\node_modules\cypress
> node index.js --exec install

Installing Cypress (version: 3.8.3)

 ×  Downloading Cypress
   → Cypress Version: 3.8.3
    Unzipping Cypress
    Finishing Installation
The Cypress App could not be downloaded.

Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration

Otherwise, please check network connectivity and try again:

----------

URL: https://download.cypress.io/desktop/3.8.3?platform=win32&arch=x64
Error: tunneling socket could not be established, statusCode=407

----------

Platform: win32 (10.0.17134)
Cypress Version: 3.8.3

I have set both my HTTP_PROXY and HTTPS_PROXY (and even the NO_PROXY) environment variables in the following format:

HTTP_PROXY=http://domain%5Cusername:password@proxy_addr:port

No need to say that this environment variables are working fine for NPM.

Desired behavior:

Be able to download and install cypress without error.

Versions

Cypress 3.8.3 Windows 10 Enterprise (1803)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Thundixcommented, Mar 11, 2020

Hello,

I ran into the same issue, I ran the npm install with --ignore-scripts

This will download the npm packages, then download the binary and point to it via CYPRESS_RUN_BINARY env variable

0reactions
FabienDehoprecommented, Apr 16, 2020

In conclusion, and for others who can encounter the same issue, use the local proxy Px and configure like this: px --server=you.proxy:port --hostonly --username=domain\username --save then px --install and finally logoff and logon to start the proxy.

Then change your http_proxy and https_proxy to point to px: http://localhost:3128.

The px.ini file should look like something like this:

[proxy]
server = proxy-server:port
pac = 
port = 3128
listen = 
allow = 
gateway = 0
hostonly = 1
noproxy = 
useragent = 
username = domain\username
auth = 

[settings]
workers = 2
threads = 5
idle = 30
socktimeout = 20.0
proxyreload = 60
foreground = 0
log = 0


Read more comments on GitHub >

github_iconTop Results From Across the Web

Using NPM Install Behind A Corporate Proxy Server - Medium
Go to command prompt or terminal depending on your machine(tip: hit Win + R and type cmd). In the command prompt type the...
Read more >
Unable To Install Packages With NPM Due To Corporate Proxy
In this article, I will explain how you can resolve the issue where NMP packages are not getting installed because of corporate network ......
Read more >
Configuring a corporate proxy - JHipster
When JHipster is used in a company, you probably will need to configure all tools to bypass the corporate proxy. You can try...
Read more >
NPM install doesn't work from behind our proxy which requires ...
Try to add double quote to your commands : NPM CONFIG SET PROXY = "http://<domain>%5C<username>:<passwordwith#>@ddcrpit311v1.corp.
Read more >
Using npm behind corporate proxy .pac - Stack Overflow
I've just had a very similar problem, where I couldn't get npm to work behind our proxy server. My username is of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found