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

Deprecation warnings from electron / node during cypress open #6750

Closed
jennifer-shehane opened this issue Mar 17, 2020 · 4 comments · Fixed by #6753 or Flygsand/site#83
Closed

Deprecation warnings from electron / node during cypress open #6750

jennifer-shehane opened this issue Mar 17, 2020 · 4 comments · Fixed by #6753 or Flygsand/site#83
Assignees
Labels
type: regression A bug that didn't appear until a specific Cy version release v4.2.0 🐛 Issue present since 4.2.0

Comments

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Mar 17, 2020

Current behavior:

Since updating to 4.2.0, I'm seeing some deprecation warnings in the stdout when running cypress open

Opening Cypress...
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false".  It will change to be "true" in Electron 9.  For more information please check https://github.com/electron/electron/issues/18397
(node:87713) DeprecationWarning: Passing functions, DOM objects and other non-cloneable JavaScript objects to IPC methods is deprecated and will throw an exception beginning with Electron 9.
(node:87713) DeprecationWarning: Passing functions, DOM objects and other non-cloneable JavaScript objects to IPC methods is deprecated and will throw an exception beginning with Electron 9.

Desired behavior:

Would like for users of cypress to either not have these deprecation warnings shown to them or fix the usecases so the deprecation warnings do not need to be shown at all.

Deprecation warnings

I believe all of these originate from #6555

  1. Electron [Discussion] Requiring Native Modules in the Renderer Process to be NAPI or Context Aware electron/electron#18397

    This is being used here, looks like this issue is already noted https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/util/electron-app.js#L18:L18

  2. Node - also coming from Electron. Explanation of this one here: https://www.electronjs.org/docs/breaking-changes#sending-non-js-objects-over-ipc-now-throws-an-exception

Versions

4.2.0

@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Mar 17, 2020
@jennifer-shehane jennifer-shehane added v4.2.0 🐛 Issue present since 4.2.0 browser: electron type: regression A bug that didn't appear until a specific Cy version release stage: ready for work The issue is reproducible and in scope and removed stage: ready for work The issue is reproducible and in scope browser: electron labels Mar 17, 2020
@flotwig
Copy link
Contributor

flotwig commented Mar 17, 2020

Bleh, the app.allowRendererProcessReuse should not be appearing, that's why that code is there in electron-app... maybe something is different in the packaged app.

I can look into the IPC warnings, most likely just need to filter out non-clonable objects in the desktop-gui's IPC code.

@flotwig
Copy link
Contributor

flotwig commented Mar 17, 2020

Found some info to help clean up objects so they can be cleanly cloned and avoid the second deprecation warning: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: ready for work The issue is reproducible and in scope stage: work in progress labels Mar 17, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 17, 2020

The code for this is done in cypress-io/cypress#6753, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Mar 17, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 30, 2020

Released in 4.3.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.3.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: regression A bug that didn't appear until a specific Cy version release v4.2.0 🐛 Issue present since 4.2.0
Projects
None yet
2 participants