cypress icon indicating copy to clipboard operation
cypress copied to clipboard

Secure coding is not enabled for restorable state (Sonoma)

Open pavinduLakshan opened this issue 8 months ago • 16 comments

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

pavinduLakshan avatar Oct 27 '23 10:10 pavinduLakshan

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

PabloGarcia10 avatar Oct 31 '23 15:10 PabloGarcia10

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

jennifer-shehane avatar Oct 31 '23 16:10 jennifer-shehane

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

PabloGarcia10 avatar Oct 31 '23 16:10 PabloGarcia10

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

pavinduLakshan avatar Nov 01 '23 03:11 pavinduLakshan

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.

jennifer-shehane avatar Nov 02 '23 20:11 jennifer-shehane

@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

glyph avatar Nov 03 '23 05:11 glyph

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

matt384 avatar Nov 03 '23 18:11 matt384

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

I am on Intel Mac-OS 14.1.1

mrlonis avatar Nov 14 '23 04:11 mrlonis

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

czuniga9 avatar Nov 16 '23 21:11 czuniga9

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 avatar Nov 20 '23 23:11 obecker-csdisco

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

obecker-csdisco avatar Nov 21 '23 00:11 obecker-csdisco

@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?

jennifer-shehane avatar Nov 28 '23 20:11 jennifer-shehane

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

nbouvrette avatar Dec 02 '23 18:12 nbouvrette

@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 avatar Dec 04 '23 16:12 obecker-csdisco

Any update on this Issue ?

obecker-csdisco avatar Dec 20 '23 16:12 obecker-csdisco

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 avatar Dec 28 '23 22:12 jennifer-shehane

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

jennifer-shehane avatar Jan 02 '24 15:01 jennifer-shehane

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

obecker-csdisco avatar Jan 03 '24 23:01 obecker-csdisco