DevExpress / testcafe-browser-provider-electron

This is the Electron browser provider plugin for TestCafe.
https://testcafe.io
MIT License
49 stars 30 forks source link

Connection fails in Windows VM #96

Closed sam-yh closed 1 year ago

sam-yh commented 1 year ago

Hi, I'm trying to use the browser-provider-electron plugin in a windows virtual machine (the host is linux). When executing the command yarn testcafe electron: Path-To-File, which refers to this config file

module.exports = {
    mainWindowUrl: 'Existing, publicly available webpage',
    enableNavigateEvents: true,
    electronPath: Valid path to the electron app
}

it fails with this error message:

ERROR Unable to open the "electron:" browser due to the following error:

Error: Unable to connect
    at NodeInspect._callee2$ (C:\Users\windows10\Documents\test_automation\node_modules\testcafe-browser-provider-electron\lib\node-inspect.js:123:39)
    at tryCatch (C:\Users\windows10\Documents\test_automation\node_modules\regenerator-runtime\runtime.js:62:40)
    at Generator.invoke [as _invoke] (C:\Users\windows10\Documents\test_automation\node_modules\regenerator-runtime\runtime.js:296:22)
    at Generator.prototype.<computed> [as next] (C:\Users\windows10\Documents\test_automation\node_modules\regenerator-runtime\runtime.js:114:21)
    at step (C:\Users\windows10\Documents\test_automation\node_modules\babel-runtime\helpers\asyncToGenerator.js:17:30)
    at C:\Users\windows10\Documents\test_automation\node_modules\babel-runtime\helpers\asyncToGenerator.js:28:13

The identical setup works in a windows host system.

Dmitry-Ostashev commented 1 year ago

Hello, I tried to reproduce the issue with the following environment:

Host machine: Ubuntu 22.04 VM: Windows 10 VM vendor: Oracle VirtualBox Electron: 24.1.1 Node.js: 18.16.0 TestCafe: 2.5.0 testcafe-browser-provider-electrion: 0.0.19

Everything worked correctly in my case. Could you please specify the software versions you use?

sam-yh commented 1 year ago

Hi, thank you for your time!

Your response prompted me to update both my electron version and the plugin version, which turned out not to exactly match the configuration on the windows host system (I should have done this before opening an issue). It works now. My assumption is that both updates (electron and plugin version) were necessary.