-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support for Electron >= 29 #119
Comments
We have not researched the issue yet because we are focused on other tasks. You can try using VSCode Uncaught Exceptions breakpoints for debugging. |
Hello @Bayheck, I believe that this issue should be reopened because the problem for Electron 29+ is not the same as for Electron 28. As originally stated by @lesn1kk, applying the fix from #110 does not solve the problem for Electron 29+. So this issue is not a duplicate. What's the plan regarding the maintenance of this Electron plugin? It has not been made compatible with Electron 28 (2023/12) yet, despite the availability of a documented solution. Will it be deprecated? Thanks in advance for clarifying the situation (and letting us prepare ourselves accordingly). |
I managed to make our TestCafe tests start with Electron 30.0.9 by patching module.exports = function (config, testPageUrl) {
const appEntryPoint = require.resolve(config.appPath);
config.appEntryPoint = appEntryPoint;
process.argv.push(appEntryPoint);
const originalAppCodeLoaded = process.appCodeLoaded;
process.appCodeLoaded = () => {
require('./electron-mocks')(config, testPageUrl);
originalAppCodeLoaded();
};
}; Note that I got rid of the decorator for |
I will reopen the issue, but we cannot give any estimates of when we will fix it. |
UPDATE: the patch above works fine with Electron 30.0.9. But we just upgraded to 30.1.1 and the tests do not start anymore. |
After some preliminary investigations, it looks like this function of the TestCafe |
The problem is actually related to this code block in Hammerhead. It triggers an error that breaks the The solution is to wait for a fix of Electron. The workaround is to comment out the code block in |
I have reported the issue to the Electron team. |
This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open. |
We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you. |
This is still an issue. I assume some changes are needed in testcafe-browser-provider-electron even with the electron fix, but I don't know. |
We were able to run our e2e using Electron Since we are also running against compiled exe, in such case the // src/injectable/index.js
module.exports = function (config, testPageUrl) {
if (config.appPath) {
const appEntryPoint = require.resolve(config.appPath);
config.appEntryPoint = appEntryPoint;
process.argv.push(appEntryPoint);
}
const originalAppCodeLoaded = process.appCodeLoaded;
process.appCodeLoaded = () => {
require('./electron-mocks')(config, testPageUrl);
originalAppCodeLoaded();
};
}; |
Hi,
It looks like the provider does not work with Electron version 29 and above (considering also the workaround proposed in another issue).
Do you plan adding such support in nearest future?
Could you provide me some details how can I debug the hook responsible for decorating and mocking the electron stuff?
Thanks
The text was updated successfully, but these errors were encountered: