Closed seangenabe closed 6 years ago
yeah, i'm considering rewriting this logic once again, since browser-launcher2 also wasn't fully functioning for me. i was thinking about doing it @sindresorhus style, with one package per os and browser. i'll report back here!
(btw i'm not looking forward to working in that windows vm, but i guess it just as to be done!)
I have acces to windows 10 without running it in a vm, what has to be done in it?
development :P you could for example create windows-chrome
which would be a windows port of osx-chrome
what was the issue with browser-launcher2
, is it related to browser detection? I am looking at https://github.com/vweevers/win-detect-browsers right now.
i have never used the module with windows, however i really want to have a modular solution to this problem, hence i'm creating the individual modules.
i sympathize with the sentiment, however this will take longer :)
check out the todo list above :P
i am not sure what's your point?
it's almost done already
ok, so how should I detect google chrome on windows?
no need to detect it, just figure out the path and launch it with the right parameters. check out browser-launcher for inspiration
Are you referring to this https://github.com/substack/browser-launcher/blob/master/lib/windows/chrome.js? Because https://gist.github.com/vweevers/e8c3863759fd8f9659ce
yeah, just do what works!
@ashnur linux work is complete for now. how far are you with windows?
Should be able to finish windows-chrome later today, after work :).
Ok, so apart from me promising stuff irresponsibly (stuff came up :( ), I am almost done, but I would like to test it. And then I would like to know why @juliangruber didn't use the cb
argument in linux-chrome
, and if it's ok if I will use it in the windows modules because I understand that I don't have to detect, "just figure out the path", however that's also nowhere trivial on windows. Basically it's a bunch of guesswork, and I will have to use an async interface. I am open to suggestions if anything I said is incorrect or if you see a better way.
linux-chrome doesn't have a cb
because it doesn't do any asynchronous work, it can just return the browser process object right away. If you need to do async work, use a callback :)
Cool, thanks for the clarification. Will do that then. Btw, does anyone here have a suggestion how I could write a test for this? Because then I could perhaps run a few automated tests on different version of windows not just Win 10.
create a nodejs http server, launch a browser pointing at its address, see if the request comes in
ok, the test passes now, and the browser starts seemingly properly but I am still very unhappy about the whole situation. I want to do some further testing and removing the bloat. https://github.com/ashnur/windows-chrome I am fairly sure there are several things that are still completely wrong about what I did but at least I know it's going to work :)
cool, i'll start integrating it
...once you publish it :)
@juliangruber I've written the Windows Edge module to keep this moving. Tested in Windows 10 in a VM.
only one browser left! windows-firefox 🎆
can this mode already be enabled through some option ? right now it still defaults to browser-launcher.
PS: Related, what about chrome headless mode ?
I would really like to see this especially if it enables better headless config via headless chrome for instance, ( which is really just a start-up param ). What about falling back to browser-launch for firefox/win in the mean time? I would look at taking on the firefox/win issue, but have no stable windows env to work on atm.
Maybe one of those free MS VMs hmmm.
I'll create windows-firefox
.
Published: windows-firefox
. Supports headless mode and filtering installed versions by release channel or version. Also made create-firefox-profile
.
Thank you everyone for your awesome contributions! We now have all major browsers covered.
Let's continue our work in https://github.com/juliangruber/broser/issues
substack hasn't updated
browser-launcher
for 2 years; bugs aren't getting fixed. So I can't run this, for example, with Chrome on Windows.I suggest using another package such as
browser-launcher2
instead.