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

Can't install cypress #15454

Closed
steverb1 opened this issue Mar 12, 2021 · 10 comments
Closed

Can't install cypress #15454

steverb1 opened this issue Mar 12, 2021 · 10 comments
Labels
stale no activity on this issue for a long period topic: installation Issue during installation or downloading Cypress

Comments

@steverb1
Copy link

steverb1 commented Mar 12, 2021

I'm trying to install cypress, there is as proxy involved. I've read everything on the Cypress web site about proxies and tried everything I know to try. Still can't install it.
I'm doing this from a PowerShell window.

Here's the setup:
I have a .npmrc file with
registry=https://{address of our internal npm repository}

I have verified that Cypress is there.

In the PowerShell window, before installing I do:

$env:HTTP_PROXY = "{our internal proxy}"
npm config set registry https://{same address above, to internal npm repository}

After "npm install cypress" I get this error:

===================================================

> cypress@6.6.0 postinstall C:\Code\CypressTest\node_modules\cypress
> node index.js --exec install

Installing Cypress (version: 6.6.0)

  ×  Downloading Cypress
    → Cypress Version: 6.6.0
     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/6.6.0?platform=win32&arch=x64
Error: tunneling socket could not be established, cause=connect ECONNREFUSED xxx.xxx.xxx.xxx:80

Platform: win32 (10.0.18363)
Cypress Version: 6.6.0

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress@6.6.0 postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress@6.6.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

======================================================

Any ideas on what I am missing?

@cbruge
Copy link

cbruge commented Mar 13, 2021

Try also adding https_proxy, HTTPS_PROXY and http_proxy, maybe even all_proxy.
I dont know what it was but Cypress requires either upper or lowercase🤔
additionally npm config set proxy / npm config set https-proxy might help

@jennifer-shehane
Copy link
Member

@cbruge The proxy configuration is not sensitive to capitalization: https://github.com/cypress-io/cypress/blob/develop/cli/lib/tasks/download.js#L19:L19

@cbruge
Copy link

cbruge commented Mar 15, 2021

@jennifer-shehane thats great news! Maybe I mixed things up, have been using Cypress since v3.x🙈

@steverb1
Copy link
Author

steverb1 commented Mar 15, 2021

So, I ended up installing it from the binary. Now, when trying to run my first sample test, I get:

 Cypress failed to make a connection to the Chrome DevTools Protocol
 Error: connect ECONNREFUSED 127.0.0.1:51606

I'm sure this is something to do with the internal company network (it is locked down pretty good) but I don't know where to start. What kinds of questions do I need to ask our security folks?

@steverb1
Copy link
Author

Now, seeing other people have had this same issue in the past. So maybe not related to our company network. Is there a resolution for this? Running Cypress 6.6.0

@steverb1
Copy link
Author

Also, I can run a test in Cypress successfully in Edge, but not Chrome.

@steverb1
Copy link
Author

Here's an update: I can run Cypress with Chrome, but only if Chrome is not already open. If Chrome is already open I get the error "Cypress failed to make a connection to the Chrome DevTools Protocol".
Is that the expected behavior?
If so, can you warn users that Chrome should not be running prior to firing up Cypress?

@jennifer-shehane
Copy link
Member

@steverb1 That is not expected behavior. This can happen if you have 2 Cypress applications running at the same time. #5613

I think it may also happen if you are connecting to the chrome debugging port in some other manner #14835

But I haven't seen that error in a while outside of those reasons.

@sainthkh sainthkh added the topic: installation Issue during installation or downloading Cypress label Apr 22, 2021
@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label May 17, 2023
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period topic: installation Issue during installation or downloading Cypress
Projects
None yet
Development

No branches or pull requests

5 participants