cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.69k stars 3.16k forks source link

Secure coding is not enabled for restorable state (Sonoma) #28158

Open pavinduLakshan opened 10 months ago

pavinduLakshan commented 10 months ago

Current behavior

Seeing the following warning when running the Cypress in headed mode in Chrome 118.

2023-10-27 15:49:35.592 Cypress[5949:37879] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.

Desired behavior

Cypress should not print these kind of warnings

Test code to reproduce

Running any Cypress project on Mac OS 14 shows this warning

Cypress Version

12.5.1

Node version

v16.17.0

Operating System

MacOS 14.1

Debug Logs

No response

Other

No response

PabloGarcia10 commented 10 months ago

Did you have any success? I'm with the same problem here..

jennifer-shehane commented 10 months ago

@pavinduLakshan @PabloGarciaQATesting Is this causing any changes to how your tests or run or impacting the run at all?

PabloGarcia10 commented 10 months ago

@jennifer-shehane Yes it is, I cannot run the tests or open even open cypress interface

pavinduLakshan commented 10 months ago

In my case, it had no effect on the issue I was facing. My issue was related to a misconfigured host mapping.

jennifer-shehane commented 10 months ago

Can anyone provide a repo to run where this warning is showing? It's likely specific to something involved in the repo since this isn't occuring for everyone.

glyph commented 10 months ago

@jennifer-shehane I ran across this while looking at a completely different issue https://github.com/beeware/toga/issues/2188 so I thought it might be useful to note here that this is probably at least Sonoma-specific

matt384 commented 10 months ago

Facing this issues as well, cypress was working great and now completely blocks. I tried clearing Library/Caches/Cypress... but it didn't work.

MacOS 14.0 @glyph I do believe this is sonoma specific. An unrelated app with the same issue here

mrlonis commented 10 months ago

Here's an app that reproduces this: https://github.com/mrlonis/example-angular-app.

I am on Intel Mac-OS 14.1.1

czuniga9 commented 10 months ago

I get this warning but it doesn't stop cypress from working. Here's a thread with details about the warning.

obecker-csdisco commented 9 months ago

Have the same problem, 'Cypress open' doesn't connect to Chrome anymore.

Sonoma 14.1

Cypress run still works and so does Cypess run --headed (using electron)

but

Cypess run --headed --no-exit --browser chrome

does not (same issue as Cypress open)

obecker-csdisco commented 9 months ago

Running with debug enabled attached output (https://github.com/cypress-io/cypress/files/13420424/debug.log))

jennifer-shehane commented 9 months ago

@obecker-csdisco I'm not seeing the "Secure coding is not enabled for restorable state" message anywhere in your debug logs. Are you describing this same issue?

nbouvrette commented 9 months ago

I'm having the same issue on Cypress 13.6.0 and Node v18.18.2. I'm also on Sonoma - to reproduce:

1) clone https://github.com/Avansai/next-multilingual 2) npm install 3) npm run test

obecker-csdisco commented 9 months ago

@obecker-csdisco I'm not seeing the "Secure coding is not enabled for restorable state" message anywhere in your debug logs. Are you describing this same issue?

Sorry, doesn't show up in the logs but in terminal.


$ cypress open
2023-12-04 08:33:25.124 Cypress[11676:59495] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
obecker-csdisco commented 8 months ago

Any update on this Issue ?

jennifer-shehane commented 8 months ago

I imagine this is coming from Electron, they implemented a fix for this, but it doesn't look like they're backporting it to older versions for some reason: https://github.com/electron/electron/pull/40296

We're working on an Electron update, but were not going to get up to Electron 29 quite yet.

jennifer-shehane commented 8 months ago

I just want to note more clearly, as did the engineer at Electron, that this log message is a warning and can be ignored.

If you are encountering an error, early exit, hanging or unusual failures after this warning is displayed - that is not indicating that this warning message is the cause of the abnormal behavior in cypress. If you're encountering these situations, please open a new issue with full debug logs, a description of the problem, and a way to reproduce it and we can investigate if there is a bug causing the test run to act abnormally

obecker-csdisco commented 8 months ago

Not using Electron, but Chrome. Unfortunately I have no simple way to reproduce this.

My best "guess" at this point is that it is env related, as I have engineers using the same repo and being able to run cypress open successfully with chrome. Same version of MacOS, Chrome and Node

nnaydenow commented 3 months ago

Same here: macOS: Sonoma - version 14.5 Node: v20.11.0 Cypress: 13.6.4

I've noticed that the issue appears only in Chrome and Edge but it's a problem because we need to run our tests on Chrome browser.