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

[BUG] Cannot launch compiled electron application #3997

Closed
jperl opened this issue Sep 29, 2020 · 0 comments · Fixed by #4006
Closed

[BUG] Cannot launch compiled electron application #3997

jperl opened this issue Sep 29, 2020 · 0 comments · Fixed by #4006

Comments

@jperl
Copy link
Contributor

jperl commented Sep 29, 2020

Context:

  • Playwright Version: [email protected]
  • Operating System: Mac
  • Node.js version: v12.18.3
  • Browser: Electron

Code Snippet

Throws error: Exception has occurred: TypeError: Cannot read property 'evaluateHandle' of undefined

const { electron } = require("playwright-electron");
(async () => {
  const app = await electron.launch(
    "/Applications/Slack.app/Contents/MacOS/Slack"
  );
  await app.close();
})();

Works with spectron

const { Application } = require("spectron");

(async () => {
  const app = new Application({
    path: "/Applications/Slack.app/Contents/MacOS/Slack",
  });
  await app.start();
  console.log("title", await app.client.getTitle());
  await app.stop();
})();

Describe the bug

It seems the issue is that _nodeElectronHandle never resolves causing the _onPage to throw an error.

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

Successfully merging a pull request may close this issue.

1 participant