Closed EEO27 closed 3 months ago
Could you try again with the beta version I prepared earlier? If it doesn't work, please set the environment variable HTTP_PROXY to the proxy server you see in cypress when running without the plugin (http://proxy.o-xxx.xxx.nl:8080/). Remove the trailing slash on the proxy URL, I'm not sure at the moment if that might cause issues.
Hello!
I can confirm that I finaly found a differend proxy that have worked for me. I found that there was an another proxy which I have to use to acces the internet. It was http://**proxys**.xxx.xxx.nl:8080/)
The results are as folowing:
set HTTP_PROXY=http://proxys.xxx.xxx.nl:8080 && npx cypress-ntlm run --> Perfectly working in CLI
set HTTP_PROXY=http://proxys.xxx.xxx.nl:8080 && npx cypress-ntlm run --headed --> Perfectly working in CLI & headed!
set HTTP_PROXY=http://proxys.xxx.xxx.nl:8080 && npx cypress-ntlm open --> Endless loading Cypress interface
So there is a different behaviour between npx cypress-ntlm open and npx cypress-ntlm run --headed But for now, it is working perfectly. thank you for your plugin and support!!
Great news!
It is wierd that the open
command behaves differently. The code in the plugin is close to identical in the two cases, so I'm wondering if there might be something in cypress itself that behaves differently on open.
I experimented a bit and found:
npx cypress-ntlm open --e2e --browser electron
opens the test runner window where you can pick and run tests. The main cypress window is also open, with a never ending spinnernpx cypress-ntlm run --headed --no-exit
keeps the test runner from exiting after test completion, that way you can inspect failing tests.Apparently cypress itself is doing something proxy unfriendly at startup. Likely it is checking for updates or connecting to the cloud service.
@EEO27 - The root cause for npx cypress-ntlm open
stalling (without extra arguments) should be resolved with Cypress 13.9.0 after they merged my PR.
This sounds perfect!
Op wo 8 mei 2024 om 18:29 schreef Björn Weström @.***>:
@EEO27 https://github.com/EEO27 - The root cause for npx cypress-ntlm open stalling (without extra arguments) should be resolved with Cypress 13.9.0 after they merged my PR.
— Reply to this email directly, view it on GitHub https://github.com/bjowes/cypress-ntlm-auth/issues/250#issuecomment-2100959831, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4GAZOPNG7QS2H5XM2TBDSDZBJHIJAVCNFSM6AAAAABFICI6QGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQHE2TSOBTGE . You are receiving this because you were mentioned.Message ID: @.***>
This is the third time I need your help, every time I get a little closer. At this point I see the following Proxy settings and results in Cypress:
With ntlm-auth-plugin
Proxy server: http://127.0.0.1:58505 Proxy bypass list: <-loopback>
Result: Intranet: Available. Internet not available (google.com and acc-webaplication.nl) API request with NTLM auth are working on O-Domain & A-Domain (connection with backand = OK) ################################################
Without ntlm-auth-plugin
Proxy server: http://proxy.o-xxx.xxx.nl:8080/ Proxy bypass list: 127.0.0.1,::1,localhost
Result: Intranet: Not available Internet: Available (google.com and acc-webaplication.nl) API Request with NTLM auth: Not working, this is as expected, because the NTLM-Auth is not running ################################################
Recap: When I run Cypress+ntlm-auth-plugin the proxy settings are changing in a way where I cant connect to the internet. So I cant load the frontend of the ACC environment (different domain). But the API request to the ACC-backend with the NTLM authorisation is working perfectly.
How could I achieve connection with the internet while I run Cypress +ntlm-plugin? How does the <-loopback> work? Should exclude anything on it? Do you have anysuggestion for this situation?
And in .npmrc I have the following: registry=https://nexus.o-xxx.xxx.nl/repository/npm-all strict-ssl=false
I have proxysettings on my pc like this:
Logs when try to connect google.com cypress:plugin:ntlm-auth Tunnel to www.google.com:443 +2s cypress:plugin:ntlm-auth Got unexpected error on PROXY_TO_SERVER_SOCKET. Target: content-autofill.googleapis.com:443 AggregateError at internalConnectMultiple (node:net:1114:18) at afterConnectMultiple (node:net:1667:5) { code: 'ETIMEDOUT',
]