microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.47k stars 822 forks source link

Cannot run Firefox #4964

Closed saschanaz closed 4 years ago

saschanaz commented 4 years ago

I'm using vcxsrv and trying to run Firefox on it, on WSL1 Ubuntu.

$ DISPLAY=:0 firefox
Exiting due to channel error.

###!!! [Parent][MessageChannel] Error: (msgtype=0x1E0059,name=PBrowser::Msg_UpdateEffects) Channel error: cannot send/recv

[Parent 13504, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-CTCO4D/firefox-73.0.1+build1/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23
[Parent 13504, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-CTCO4D/firefox-73.0.1+build1/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23
[Parent 13504, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-CTCO4D/firefox-73.0.1+build1/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23
[Parent 13504, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-CTCO4D/firefox-73.0.1+build1/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23
[Parent 13504, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-CTCO4D/firefox-73.0.1+build1/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23
[Parent 13504, Main Thread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-CTCO4D/firefox-73.0.1+build1/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 23
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.

image

saschanaz commented 4 years ago

Switched to WSL 2 and it works now.

tshirtman commented 4 years ago

Damn, i’ve been fighting on that since yesterday, and couldn’t find much anything about it, sadly i don’t think i’ll be able to switch to WSL2 on this machine, as i’m not admin on it, and it doesn’t have a recent enough windows build yet, came pretty close to having an acceptable setup in WSL with it, but the only browser i could get to work as of yet is w3m, which is a bit limited, and i can run firefox in a docker with x11vnc and a client to have something somehow integrated in my i3 setup, but that’s not great, having firefox working natively would be great, i have the exact same symptoms, a lot of these messages in the logs, (channel error cannot send/recv, and file_descriptor_set_posix.cc), and the same "sorry. We just need to do one smal thing to keep going", that never go away.

Chrome fails with different errors

Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Permission denied. (SIGTRAP).

Electron apps close with the same message, not sure if the cause is the same as with firefox.

w3m works without issue, and about everything else network is fine.

saschanaz commented 4 years ago

I could run Firefox normally on WSL1 in 2019, maybe something changed on Firefox side 🤔

tshirtman commented 4 years ago

Any idea of the timeframe you had that working, i guess i’ll check with a version from early 2019 and try to bisect the version if that works. thanks a ton for sharing btw :) edit: wonderful, firefox 67 works!

saschanaz commented 4 years ago

edit: wonderful, firefox 67 works!

That's fairly old, but 👍

tshirtman commented 4 years ago

yeah, i’ll try more recent ones, it seems this one is not liked at all by the system, i just got two reboots :| we’ll see 🤞

tshirtman commented 4 years ago

So it’s apparently self updating, whatever version i’m on, and breaking itself (and doing something windows doesn’t like at all) in the process, one pretty blunt workaround i found is to make the extracted folder read only (chmod -R ugo-w firefox) before even running it, and i then go to about:config to stop it from even trying to update, doing that, it seems firefox 69.0 is the last version i can make work (70 and 71 start but have weird issues, like the viewport apparently not updating, while the rest of the UI working almost correctly). The downside of my workaround is that i can’t apparently install addons, as they are stuck in "installing" state forever.

Oh well, at least that’s progress, and hopefully these bits will help someone else if they happen to be in the same situation.

ghost commented 4 years ago

How can i install firefox old version using WSL1

DesktopECHO commented 4 years ago

When I was working on xWSL the only decent browser I could get to work reliably was Mozilla Seamonkey:

cat <<EOF | sudo tee /etc/apt/sources.list.d/mozilla.list
deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main
EOF

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2667CA5C
sudo apt-get update
sudo apt-get install seamonkey-mozilla-build
tshirtman commented 4 years ago

i had more issues with it, so i looked for alternatives, and pale moon & basilisk seems to be the closest to firefox, and seems to run both flawlessly. https://basilisk-browser.org https://www.palemoon.org/

Dulatr commented 4 years ago

Just wanted to say that this issue thread saved me so much headache with getting firefox working. I would like to add that apparently they stopped with the ability to turn off multiprocessing after version 68, after moving the autostart tab settings to remote.force and gutting the disabling. So maybe that's why you're having so much difficulty with the newer versions.

For anyone else stumbling across or interested in this thread here's a post about the change.

Works for me right now (seems stable so far) on:

kousu commented 3 years ago

Firefox also didn't work very well for me on ubuntu1804.exe with vcxsrv. It ran but kept crashing with the screens shown above.

However, Palemoon did work!

I used it to run Windows 2000 inside of Linux inside of WSL inside of QEMU inside of Linux:

2021-03-20-190437_1364x766_scrot

It worked! Even minesweeper :)

DesktopECHO commented 2 years ago

An update to my findings from two years ago -- If you're looking for something Chromium-based, QtWebEngine is the way to go.

Any browser based on it (like Falkon) works great in WSL1. Not quite as good at playing fullscreen video compared to SeaMonkey, but completely stable. Be sure to add the following flag for WSL1:

export QTWEBENGINE_CHROMIUM_FLAGS="--single-process"