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] Browser doesnt get installed on Windows Server #3046

Closed
sentoxaio opened this issue Jul 20, 2020 · 7 comments
Closed

[BUG] Browser doesnt get installed on Windows Server #3046

sentoxaio opened this issue Jul 20, 2020 · 7 comments

Comments

@sentoxaio
Copy link

Context:

  • Playwright Version: "^1.2.1"
  • Operating System: Windows Server
  • Node version: v14.1.0.
  • Browser: Firefox
  • Extra: Installed via installed packed with electron-builder

Error
(intermediate value) is not iterable when starting browser instance

Describe the bug
When installing and running it locally everything works but once you try to run in on a Google Windows Server, it throws that error which basically says that no browser is intalled.

@sentoxaio sentoxaio changed the title [BUG] [BUG] Browser doesnt get installed on Windows Server Jul 20, 2020
@aslushnikov
Copy link
Contributor

@sentoxaio how do I reproduce this? Can you lead me with a step-by-step description to reproduce this?

@sentoxaio
Copy link
Author

sentoxaio commented Jul 21, 2020

We're using playwright (playwright-firefox) in an electron app, when people use our app (packaged with electron-builder with playwright unpacked) on a windows server, playwright throws the "(intermediate value) is not iterable" error when starting the browser.

How to reproduce:

  1. Open a Windows Server
  2. Install playwright-firefox
  3. Try to run it

@aslushnikov
Copy link
Contributor

@sentoxaio the essence of the problem seems to be in the playwright is packaged with electron-builder. Can you share more details on this?

@sentoxaio
Copy link
Author

sentoxaio commented Jul 22, 2020

There is not much more to say about it. Playwright is kept unpacked and the PLAYWRIGHT_BROWSERS_PATH is set to 0

Let me know what kind of details you are looking for.

@aslushnikov
Copy link
Contributor

aslushnikov commented Jul 23, 2020

@sentoxaio Well, if PLAYWRIGHT_BROWSERS_PATH is set to 0, then browsers won't get downloaded - that's expected. What's not working then?

Let me know what kind of details you are looking for.

I have no experience with electron-builder and I've never dealt with packaging playwright there. I'll appreciate detailed steps on what I should do to repro things!

@dgozman
Copy link
Contributor

dgozman commented Jul 24, 2020

Referencing #2539 for more context.

@sentoxaio
Copy link
Author

sentoxaio commented Jul 28, 2020

@aslushnikov

I'll appreciate detailed steps on what I should do to repro things!

Its pretty easy to repro that. First you need an electron app which uses playwright-firefox (not as a window for the app, it should start a nightly session). Then you add this to your package.json:

"build": {
  "appId": "your.id",
   "win": {
	        "target": "nsis",
		"asar": true,
		"asarUnpack": [
			"node_modules/playwright-firefox/.local-browsers/**/*"
		]
	},
}

and then you just need to run npm run electron-builder.
To be honest I am not sure how to reproduce the error then since I never got it myself. But according to users it happened on Windows Servers but sometimes also locally.

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