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

Empty Cypress window on Windows 7 #14470

Closed
Dron007 opened this issue Jan 9, 2021 · 9 comments
Closed

Empty Cypress window on Windows 7 #14470

Dron007 opened this issue Jan 9, 2021 · 9 comments
Labels
OS: windows stage: needs information Not enough info to reproduce the issue stale no activity on this issue for a long period

Comments

@Dron007
Copy link

Dron007 commented Jan 9, 2021

On npx cypress open I get an empty window with menu:

I tried with standalone installation, with cypress-example-kitchensink and with my test server. Same result everywhere.

>npx cypress --version
Cypress package version: 6.2.1
Cypress binary version: 6.2.1
Electron version: 11.1.1
Bundled Node version:
12.18.3
>npx cypress info

Displaying Cypress info...

Detected 1 browser installed:

1. Canary
  - Name: chrome
  - Channel: canary
  - Version: 89.0.4364.0
  - Executable: C:\Users\Dron\AppData\Local\Google\Chrome SxS\Application\chrome.exe

Note: to run these browsers, pass <name>:<channel> to the '--browser' field

Examples:
- cypress run --browser chrome:canary

Learn More: https://on.cypress.io/launching-browsers

Proxy Settings: none detected
Environment Variables: none detected

Application Data: C:\Users\Dron\AppData\Roaming\cypress\cy\development
Browser Profiles: C:\Users\Dron\AppData\Roaming\cypress\cy\development\browsers
Binary Caches: C:\Users\Dron\AppData\Local\Cypress\Cache

Cypress Version: 6.2.1
System Platform: win32 (6.1.7601)
System Memory: 17.2 GB free 8.97 GB

I am not sure why it only shows Canary Chrome. I have usual Chrome here in C:\Users\Dron\AppData\Local\Google\Chrome\Application\chrome.exe

I tried opening Cypress with debug:

set DEBUG=cypress:*
npx cypress open --env server_url=http://127.0.0.1:3000 2> err.txt 1> log.txt

See results of err.txt and log.txt here.
In log.txt there is an error Error: Module did not self-register ... registry-js but it is probably different issue. I commented out temporarily its usage in Cypress\resources\app\packages\server\lib\util\chrome_policy_check.js and error got disappeared but I still see the empty screen.

@jennifer-shehane
Copy link
Member

Duplicate of #9572

I would love to track down why this happens for some Window's users. Are you using yarn by chance to install?

@Dron007
Copy link
Author

Dron007 commented Jan 11, 2021

Yes, I use Yarn but the same problem occurs in standalone installation so I doubt it is Yarn-related. I use classic scheme and I know that there were some problems with Elector apps so I checked with Aero too. Same result.

If you need some additional logs or actions from me please ask.

@Dron007
Copy link
Author

Dron007 commented Jan 11, 2021

Looking at logs and description of that issue I am not sure this one is duplicate. I don't see any loading icon and in logs in my case after "cypress:server:windows creating electron window" there are almost no records, only handlers of my menu clicks.

@jennifer-shehane
Copy link
Member

If you're using yarn 2, there's an issue with opening Cypress: #6377

@Dron007
Copy link
Author

Dron007 commented Jan 12, 2021

No, I don't use it. There is probably some other error with registry-js. After I removed filtering of errors by setting set DEBUG=* I see

2021-01-11T19:17:49.933Z get-windows-proxy Could not load native extension for Windows registry access. The most likely reason is that your Node version has changed since installing. Try re-installing get-windows-proxy.

I see that registry-js in Cypress is a rather old forked version. Maybe it needs update.

@Dron007
Copy link
Author

Dron007 commented Jan 13, 2021

It seems that I found the workaround but I think there should be a better way. I just replaced all Electron files with the older version taken from the electron-api-demos project (from node_modules/electron/dist folder). I also had to rename electron.exe to Cypress.exe. To minimize dependencies I used separate folder and set CYPRESS_RUN_BINARY:

set DEBUG=*
set CYPRESS_RUN_BINARY=C:\download\Cypress\Cypress.exe
set ELECTRON_ENABLE_LOGGING=true
npx cypress open --env server_url=http://127.0.0.1:3000 2> err.txt 1> log.txt

Now I can see the content of the Electron window, example tests etc. I haven't checked thoroughly how it works though.

What could be the reason of such problem with the new Electron and Chrome? I am able to run the simple Electron app with the latest version.

@jennifer-shehane
Copy link
Member

We don't think that the registry-js being out of date is the culprit in this situation. The get-windows-proxy shouldn't have anything to do with the Desktop GUI rendering. We use it to auto setup proxies for Windows users.

Regardless, I am looking into having the dep updated in our dependencies because this should stay up to date with our Electron version. #14668 cypress-io/get-windows-proxy#7

@Dron007
Copy link
Author

Dron007 commented Feb 4, 2021

I checked with Cypress v6.4 (64-bit) and the issue was still reproducable but when I tried 32-bit version downloaded from here it opened correctly.
I have Win7 64-bit so zip archive with 64-bit Cypress had been downloaded by default.

When I try simple Electron examples they work fine with both 32-bit and 64-bit versions so it is probably not because of Electron.

Hope it would help in fixing it. There are still errors about get-windows-proxy and registry-js but they are not related to this case (in case of problems with proxy I'll add separate issue).

@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 cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: windows stage: needs information Not enough info to reproduce the issue stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

3 participants