browsh
browsh copied to clipboard
Waiting for Firefox to connect (WSL)
I've just installed browsh but every time I run it it gets stuck on "Waiting for Firefox to connect". I've got browsh version 1.6.4
and Firefox version 67.0.4
. This is on Windows Subsystem for Linux running Ubuntu 18.04, not sure if that should be an issue. My log file:
Looking in /home/bus/.config/browsh/config.toml for config.
Attempting to connect to Firefox Marionette
Starting Firefox in headless mode
Using Firefox at: /usr/bin/firefox
Using default profile at: /home/bus/.config/browsh/firefox_profile
Sending `WebDriver:NewSession` to Firefox Marionette
Sending `Addon:Install` to Firefox Marionette
Starting Browsh CLI client
Starting websocket server...
FF-MRNT: 50:{"applicationType":"gecko","marionetteProtocol":3}
Webextension not connected. Message not sent: /tty_size,317,98
FF-MRNT: 690:[1,0,null,{"sessionId":"08f8bd50-2fef-4a6c-b6e9-607d4f986dc6","capabilities":{"browserName":"firefox","browserVersion":"67.0.4","platformName":"linux","platformVersion":"4.4.0-17134-Microsoft","acceptInsecureCerts":false,"pageLoadStrategy":"normal","setWindowRect":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"strictFileInteractability":false,"unhandledPromptBehavior":"dismiss and notify","rotatable":false,"moz:accessibilityChecks":false,"moz:buildID":"20190620092152","moz:headless":true,"moz:processID":3901,"moz:profile":"/home/bus/.config/browsh/firefox_profile","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}]
Sending `Marionette:Quit` to Firefox Marionette
*errors.errorString normal
/home/travis/gopath/src/browsh/interfacer/src/browsh/tty.go:109 (0x847dfb)
/home/travis/gopath/src/browsh/interfacer/src/browsh/tty.go:57 (0x847bee)
/home/travis/gopath/src/browsh/interfacer/src/browsh/tty.go:45 (0x8479a9)
/home/travis/.gimme/versions/go1.10.8.linux.amd64/src/runtime/asm_amd64.s:2361 (0x457b41)
I am getting the same error. I am running macOS.
Thank you for making and maintaining this project! 😄 EDIT: running through docker appears to work just fine 🐳
I had this problem as well w/ running a new version of firefox (67.0.4), and a Ubuntu server that was a month or two since being updated. doing a update and a reboot fixed the issue for me.
same problem here. I'm also running XMing X11 system and I opened Firefox through WSL but still browsh is not noticing it.
I have the same problem with Firefox 67.0.4 and 68.0 on Ubuntu 18.04:
# Firefox memory usage increases like crazy in a matter of a few seconds. CPU usage is also quite significant.
$ ps u | grep firefox
ghuls 12602 287 34.1 13758940 11206036 pts/2 Sl+ 15:55 3:04 /usr/lib/firefox/firefox --marionette --headless --profile /home/luna.kuleuven.be/ghuls/.config/browsh/firefox_profile
ghuls 12653 86.1 0.3 2568452 115052 pts/2 Sl+ 15:55 0:55 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 180443 -parentBuildID 20190706110151 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 12602 true tab
ghuls 12705 0.0 0.2 2525284 73604 pts/2 Sl+ 15:55 0:00 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 5982 -prefMapSize 180443 -parentBuildID 20190706110151 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 12602 true tab
ghuls 12920 0.0 0.0 16136 1000 pts/3 S+ 15:56 0:00 grep --color=auto firefox
$ ps u | grep firefox
ghuls 12602 282 36.6 14570972 12014108 pts/2 Sl+ 15:55 3:17 /usr/lib/firefox/firefox --marionette --headless --profile /home/luna.kuleuven.be/ghuls/.config/browsh/firefox_profile
ghuls 12653 88.9 0.3 2571508 115492 pts/2 Rl+ 15:55 1:02 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 180443 -parentBuildID 20190706110151 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 12602 true tab
ghuls 12705 0.1 0.2 2530404 85312 pts/2 Sl+ 15:55 0:00 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 5982 -prefMapSize 180443 -parentBuildID 20190706110151 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 12602 true tab
ghuls 12926 0.0 0.0 16136 1004 pts/3 S+ 15:56 0:00 grep --color=auto firefox
$ ps u | grep firefox
ghuls 12602 285 41.1 16060892 13496952 pts/2 Sl+ 15:55 3:45 /usr/lib/firefox/firefox --marionette --headless --profile /home/luna.kuleuven.be/ghuls/.config/browsh/firefox_profile
ghuls 12653 100 0.4 2588916 131620 pts/2 Rl+ 15:55 1:19 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 180443 -parentBuildID 20190706110151 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 12602 true tab
ghuls 12705 0.1 0.2 2530404 85312 pts/2 Sl+ 15:55 0:00 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 5982 -prefMapSize 180443 -parentBuildID 20190706110151 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 12602 true tab
ghuls 12931 0.0 0.0 16136 1044 pts/3 S+ 15:56 0:00 grep --color=auto firefox
Debug log:
Looking in /home/ghuls/.config/browsh/config.toml for config.
Attempting to connect to Firefox Marionette
Starting Firefox in headless mode
Using Firefox at: /usr/bin/firefox
Using default profile at: /home/ghuls/.config/browsh/firefox_profile
Sending `WebDriver:NewSession` to Firefox Marionette
Sending `Addon:Install` to Firefox Marionette
Starting Browsh CLI client
Starting websocket server...
Webextension not connected. Message not sent: /tty_size,206,52
FF-MRNT: 50:{"applicationType":"gecko","marionetteProtocol":3}
FF-MRNT: 707:[1,0,null,{"sessionId":"bb41eac1-a8a2-4ef9-b672-1821018dc6b1","capabilities":{"browserName":"firefox","browserVersion":"68.0","platformName":"linux","platformVersion":"4.15.0-48-generic","acceptInsecureCerts":false,"pageLoadStrategy":"normal","setWindowRect":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"strictFileInteractability":false,"unhandledPromptBehavior":"dismiss and notify","rotatable":false,"moz:accessibilityChecks":false,"moz:buildID":"20190706110151","moz:headless":true,"moz:processID":13097,"moz:profile":"/home/ghuls/.config/browsh/firefox_profile","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}]
FF-MRNT: 61:[1,1,null,{"value":"{8ff2d753-2dc8-46de-a837-fa28331d9fcf}"}]
+1, for Win10 WSL. Latest Win10 + Latest Ubuntu 18 WSL. Browsh just hung:
Seems firefox headless works fine under WSL.
Please take a look. Very useful software, BTW. Thanks.
Are they any instructions for setting up a firefox headless ssh server?
Before the issue got resolved, the only workaround I think is: set up a firefox remote server. And in WSL, ssh to that server.
Same problem running the docker image:
docker run -it --rm browsh/browsh
I just double checked running the latest Docker image and it seems to be fine. That docker command really should work. Maybe it's just a lack of resources, RAM maybe?
I've got 32gb on this system, with nothing else running.
Same problem here, with both Ubuntu 19.10 running in proot on Android, as well as WLS Pengwin based on Debian.
debug.log (identical logs for both cases):
Looking in /home/zx/.config/browsh/config.toml for config.
Attempting to connect to Firefox Marionette
Sending `WebDriver:NewSession` to Firefox Marionette
Starting Browsh CLI client
Starting websocket server...
FF-MRNT: 50:{"applicationType":"gecko","marionetteProtocol":3}
Webextension not connected. Message not sent: /tty_size,103,34
FF-MRNT: 695:[1,0,null,{"sessionId":"98f36dd2-ec53-41d9-823c-05d191ecee06","capabilities":{"browserName":"firefox","browserVersion":"72.0.2","platformName":"linux","platformVersion":"4.9.112-16352588","acceptInsecureCerts":false,"pageLoadStrategy":"normal","setWindowRect":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"strictFileInteractability":false,"unhandledPromptBehavior":"dismiss and notify","rotatable":false,"moz:accessibilityChecks":false,"moz:buildID":"20200117190643","moz:headless":true,"moz:processID":1327,"moz:profile":"/home/zx/.mozilla/firefox/5zs1rvb9.default-release","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}]
Tested by manually launching Firefox in headless mode with "firefox --headless --marionette &" and then launch Browsh with "browsh --firefox.use-existing --debug".
It seems like Firefox launches successfully in headless mode, and successfully send something to Browsh, but nothing happens after that?
Also what does this mean?
Webextension not connected. Message not sent: /tty_size,103,34
Edit: Tried with both Firefox 72.0.2 and 63.0.3, both giving the same issue.
I get the exact same error running the Docker container. Also the
Webextension not connected. Message not sent: /tty_size,153,33
and nothing more...
I'm getting a similar debug message to ZZZXXX0110. I'm on WSL Ubuntu 20.04 LTS. I've attempted to build from source but that did nothing. debug.log
Attempting to connect to Firefox Marionette
Starting Firefox in headless mode
Using Firefox at: /usr/bin/firefox
Using default profile at: /home/djd/.config/browsh/firefox_profile
FF-CONSOLE: 1592383682998 Marionette INFO Listening on port 2828
Sending `WebDriver:NewSession` to Firefox Marionette
Sending `Addon:Install` to Firefox Marionette
FF-MRNT: 50:{"applicationType":"gecko","marionetteProtocol":3}
Starting Browsh CLI client
Starting websocket server...
Webextension not connected. Message not sent: /tty_size,120,30
FF-MRNT: 690:[1,0,null,{"sessionId":"8a4b5aaa-1117-46bd-a588-af812f00ae72","capabilities":{"browserName":"firefox","browserVersion":"77.0.1","platformName":"linux","platformVersion":"4.4.0-18362-Microsoft","acceptInsecureCerts":false,"pageLoadStrategy":"normal","setWindowRect":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"strictFileInteractability":false,"unhandledPromptBehavior":"dismiss and notify","rotatable":false,"moz:accessibilityChecks":false,"moz:buildID":"20200602222727","moz:headless":true,"moz:processID":2600,"moz:profile":"/home/djd/.config/browsh/firefox_profile","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}]
Same WSL 2 ubuntu 19.04
are you guys running windows installer or from linux deb ?
ref: wsl2 ubu20
I used linux deb inside a docker container. But it has been a while...
I was able to get it working properly in WSL2 with some wrangling. Specifically, the first launch of browsh needs to be browsh --firefox.with-gui
- once you've launched with gui once, browsh runs properly afterwards.
Perhaps a browsh --initialize
that aliases to browsh --firefox.with-gui
?
EDIT: Or not. There seems to be a flaw with the current Firefox headless mode (See the 61 open bugs regarding Firefox Headless over at Bugzilla)