juliangruber / browser-run

Run code inside a browser from the command line
447 stars 62 forks source link

`browser-launcher` is no longer maintained #112

Closed seangenabe closed 6 years ago

seangenabe commented 8 years ago

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.

juliangruber commented 8 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!

juliangruber commented 8 years ago
juliangruber commented 8 years ago

(btw i'm not looking forward to working in that windows vm, but i guess it just as to be done!)

ashnur commented 8 years ago

I have acces to windows 10 without running it in a vm, what has to be done in it?

juliangruber commented 8 years ago

development :P you could for example create windows-chrome which would be a windows port of osx-chrome

ashnur commented 8 years ago

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.

juliangruber commented 8 years ago

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.

ashnur commented 8 years ago

i sympathize with the sentiment, however this will take longer :)

juliangruber commented 8 years ago

check out the todo list above :P

ashnur commented 8 years ago

i am not sure what's your point?

juliangruber commented 8 years ago

it's almost done already

ashnur commented 8 years ago

ok, so how should I detect google chrome on windows?

juliangruber commented 8 years ago

no need to detect it, just figure out the path and launch it with the right parameters. check out browser-launcher for inspiration

ashnur commented 8 years ago

Are you referring to this https://github.com/substack/browser-launcher/blob/master/lib/windows/chrome.js? Because https://gist.github.com/vweevers/e8c3863759fd8f9659ce

juliangruber commented 8 years ago

yeah, just do what works!

juliangruber commented 8 years ago

@ashnur linux work is complete for now. how far are you with windows?

ashnur commented 8 years ago

Should be able to finish windows-chrome later today, after work :).

ashnur commented 8 years ago

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.

juliangruber commented 8 years ago

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 :)

ashnur commented 8 years ago

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.

juliangruber commented 8 years ago

create a nodejs http server, launch a browser pointing at its address, see if the request comes in

ashnur commented 8 years ago

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 :)

juliangruber commented 8 years ago

cool, i'll start integrating it

juliangruber commented 8 years ago

...once you publish it :)

ashnur commented 7 years ago

https://www.npmjs.com/package/windows-chrome

eugeneware commented 7 years ago

@juliangruber I've written the Windows Edge module to keep this moving. Tested in Windows 10 in a VM.

https://github.com/eugeneware/windows-edge

juliangruber commented 7 years ago

only one browser left! windows-firefox 🎆

matthiasg commented 7 years ago

can this mode already be enabled through some option ? right now it still defaults to browser-launcher.

PS: Related, what about chrome headless mode ?

refactorized commented 6 years ago

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.

vweevers commented 6 years ago

I'll create windows-firefox.

vweevers commented 6 years ago

Published: windows-firefox. Supports headless mode and filtering installed versions by release channel or version. Also made create-firefox-profile.

juliangruber commented 6 years ago

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