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

Please release Spectron 16, compatible with electron 14 #1027

Closed
sps-gold opened this issue Sep 6, 2021 · 8 comments
Closed

Please release Spectron 16, compatible with electron 14 #1027

sps-gold opened this issue Sep 6, 2021 · 8 comments

Comments

@sps-gold
Copy link

sps-gold commented Sep 6, 2021

Please release a compatible version of spectron (likely 16) for the recent electron 14 release

@VerteDinde
Copy link
Collaborator

Hey @sps-gold, unfortunately Spectron is fairly dependent on the remote module. This module was deprecated in Electron 12, and In Electron 14 it was removed from Electron itself for security reasons, replaced by an external @electron/remote module. Spectron is currently largely unmaintained, and fixing Spectron to work without the remote module will require a fairly large refactor (we provided more information in an issue in the spring here: #896).

We're working on getting Spectron up and running, but it unfortunately may take some time. Apologies for the delay!

@sps-gold
Copy link
Author

Thank you @VerteDinde for looking into it and for the updates.
Its no longer a blocker for me now after I managed to get the tests running with electron 14 and following changes:

Here's what I did,

  1. upgrade spectron packages like - upgrade to electron 14.0.0 #1031
    (actually for now I just upgraded packages in my own package.json without touching spectron package)
  2. update chromedriver in wdio config
    drivers: {
    chrome: {
    version: "93.0.4577.15",

@juanmartin
Copy link

@sps-gold Where did you edit the wdio config? I can't find it in my project. Need to fix the same issue as my tests are failing due to having Electron v14 and Spectron v15 which still uses Chromium 91 where I need 93.

@juanmartin
Copy link

I have tried locking down electron-chromedriver dependency of Spectron to v14 to have Chrome v93 within my project but my tests throw:

javascript error: Cannot convert undefined or null to object

when doing app.start()
They used to work on older versions

@sps-gold
Copy link
Author

@juanmartin my project uses selenium standalone service, so I can just update the configuration to specify chromedriver version as in documentation here https://webdriver.io/docs/selenium-standalone-service/

@sps-gold
Copy link
Author

following PR looks similar you may follow to debug error in your case - #738

@juanmartin
Copy link

following PR looks similar you may follow to debug error in your case - #738

Yeah I stumbled upon that one, so it seems to be needing electron.remote which was completely deprecated in v14.
I've migrated to use @electron/remote in our project. Does this mean I cannot use Spectron anymore until it moves to @electron/remote or is there a way I can force the use of this module within Spectron?

@sps-gold
Copy link
Author

closing as spectron is deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants