Skip to content

Chrome fails to launch #648

Closed
Closed

Description

  • A brief description

Chrome fails to launch.

  • Your Windows build number

10.0.14385

  • Commands required to reproduce the error
/usr/bin/google-chrome
  • Strace of the failing command

https://gist.githubusercontent.com/Manouchehri/da19ce4b9874c0a893210fa509fc1a33/raw/5fea50f4e81233e1cbe65ccdd92a295352ae9197/strace-chrome-wsl-fail.txt

  • Required packages and commands to install
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get update
sudo apt-get install google-chrome-unstable

Activity

  1. imkow commented on Jul 13, 2016

    @imkow

    As BashOnWindows is intended to development purposes, rather than normal usage scenarios with GUIs,
    I think this isn't a problem. Except it's not about GUIs.

  2. Manouchehri commented on Jul 13, 2016

    @Manouchehri
    ContributorAuthor

    Jack (@imkow) GUIs definitely work. See #637.

    Hopper

  3. Gabrielcarvfer commented on Jul 13, 2016

    @Gabrielcarvfer

    The problem is related to socketpair creation. As Chromium relies on sockets for IPC in Linux/BSD/MacOS, you can expect other chromium based stuff to fail (Chrome/Opera/Spotify/...).

  4. aseering commented on Jul 13, 2016

    @aseering
    Contributor

    For what it's worth, there are a number of existing bugs filed in this bug tracker against WSL sockets. (The WSL folks have been working on fixing them.) If you have time to look through them, it would be interesting to know if this is a known or new underlying issue.

  5. bitcrazed commented on Jul 13, 2016

    @bitcrazed
    Contributor

    David Manouchehri (@Manouchehri) While we greatly appreciate your taking the time to stretch Bash/WSL and investigate this issue, we are being quite explicit in that we do not support GUI/desktop apps; we are only supporting command-line applications at this time.

    That several GUI apps do run (to a greater or lesser degree), is purely a side-effect of the team improving our syscall implementation over time.

    We'll be sure to (very) publicly announce if this position changes, but expect that we'll only be supporting command-line scenarios and tools for the foreseeable future.

  6. Manouchehri commented on Jul 13, 2016

    @Manouchehri
    ContributorAuthor

    Well, I was trying to pinpoint the issue with sockets rather than the GUI..

    I'll write an example that doesn't use a GUI since apparently that's too distracting.

  7. Gabrielcarvfer commented on Jul 13, 2016

    @Gabrielcarvfer

    Tried some stuff using socketpair, but it worked.

    The only thing for sure is that the error happens in a check at line 40 from https://github.com/scheib/chromium/blob/master/content/browser/renderer_host/render_sandbox_host_linux.cc

  8. Gabrielcarvfer commented on Jul 13, 2016

    @Gabrielcarvfer

    Seems related to #546 and #514.

  9. therealkenc commented on Jul 17, 2016

    @therealkenc

    There are lots of missing pieces before Chrome will run on WSL. This issue as raised by David Manouchehri (@Manouchehri) is not well formed and I'm glad this has been marked bydesign.

    Anyway, I hit the following for starters:

    1. dir_reader_linux.h: WSL doesn't like something about casting tolinux_dirent* (I think; I hit this before I started taking notes). getdents64() EFAULT - possibly struct linux_dirent alignment related #1769. Can work-around by using DirReaderFallback.

    2. render_sandbox_host_linux.cc: Half-close on socketpair(AF_UNIX, SOCK_SEQPACKET, ...). half close on AF_UNIX #546. This can be worked around easily as it happens by just not calling shutdown().

    3. thread_helpers.cc (44): Check failed: 3UL <= task_stat.st_nlink (3 vs. 1). stat nr_link incorrect for /proc/self/task #1267. This module queries proc/self/task/ and doesn't like what it sees. Code in question looks like:

          // At least "..", "." and the current thread should be present.
          CHECK_LE(3UL, task_stat.st_nlink);    // <--- this fails on WSL, commented out check.
          // Counting threads via /proc/self/task could be racy. For the purpose of`
          // determining if the current proces is monothreaded it works: if at any
          // time it becomes monothreaded, it'll stay so.`
          return task_stat.st_nlink == 3;       // <--- wrong return value on WSL (hacked to <= 3)
      
    4. stack_trace_posix.cc (584): Failed to parse the contents of /proc/self/maps. I haven't looked into why. pause in read of /proc/self/maps #708

    5. file_path_watcher_linux.cc: general unhappiness due to lack of inotify in WSL Filesystem watchers like libinotify do not work #216. Replace with file_path_watcher_stub.cc

    6. The work around in Run any Desktop Environment in WSL #637 doesn't take because chrome wants the unix socket for dbus, period. dbus doesn't seem to work #376 and Exchanging SCM_CREDENTIALS with SCM_RIGHTS #1326 etc. Can probably be worked-around but I didn't bother, because...

    7. address_tracker_linux.cc(172): Could not bind NETLINK socket: Invalid argment. os.networkInterfaces error in NodeJS / Yeoman #468

    I quit at the NETLINK issue. There are some others I haven't listed; notably chrome has it's own hand rolled version of strace built into the debug build that doesn't work for reasons.

  10. therealkenc commented on Jul 17, 2016

    @therealkenc

    I should add that the Mozilla people deserve a big kudos for writing sane portable posix code #481. Chrome has no business firing up a file watcher, having a whole IP address tracking subsytem, or poking around /proc. It's a browser, Google.

  11. Manouchehri commented on Jul 17, 2016

    @Manouchehri
    ContributorAuthor

    I disagree that it's a poor question; opening this issue got you to clearly identify ~7 issues for WSL.

  12. therealkenc commented on Jul 17, 2016

    @therealkenc

    No, it didn't. Not even a little bit. Four of the seven issues are known to the WSL team. That Google dicks with Linux kernel internals in (1), (3), and (4) is on Google not Microsoft. Seeing what it would take to get Chrome working was an exercise of no value to the WSL team. If any of those three were even marginally inside WSL's scope (like #546) I would have opened an actionable and reproducible test case.

  13. Gabrielcarvfer commented on Jul 17, 2016

    @Gabrielcarvfer

    Google guys don't agree with you. It's a whole OS inside a browser. xD

  14. 71 remaining items

  15. illyaMs commented on Feb 8, 2019

    @illyaMs

    Combining the tips from therealkenc (#648 (comment)) and Jean Honlet (@jehon) (#648 (comment)) worked for me as well. Had issue running automated tests based on Chromium from win10/WSL.

    Thanks!

  16. caseyjkey commented on Aug 26, 2019

    @caseyjkey

    Chrome now works out of the box with sandbox on 16273 thanks to Ben Hillis (@benhillis) work in #2242. There are a couple of caveats (there are always caveats). First, the pthread_mutex_unlock(&m->mutex) fail (which is #486) will still trigger if you have pulse audio installed. Which you do, if you installed the whole ubuntu-desktop meta package. This had me confused earlier as well (see the strikeout). There are two ways around. One is to push though it with the PulseAudio 8 PPA. The other is to purge pulse from your system. I'd recommend the latter.

    The other caveat, which is of the soft variety, is that chrome would really rather be living in an environment with a functioning dbus and opengl (ie mesa llvmpipe). Putting it all together, something like the following should get you there:

    sudo update && sudo apt upgrade
    sudo apt install ubuntu-desktop wget mesa-utils
    sudo apt purge pulseaudio libpulse0 && sudo apt autoremove
    wget https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
    sudo dpkg -i google-chrome-unstable_current_amd64.deb
    sudo apt -f install           # probably
    export DISPLAY=localhost:0
    export NO_AT_BRIDGE=1
    exec dbus-run-session -- bash
    sudo service dbus start
    google-chrome-unstable        # look mom, no flags
    

    And there you have it.

    I want to use Capybara to run some automated tests with Chrome, how do I choose to run the google-chrome-dev instead of the default Chrome? Only Chrome 78 (unstable) will run, however, Selenium (for Capybara) requires webdriver. Webdriver only support version 77.

    WSL-Chrome-78

  17. darrenm95 commented on Feb 6, 2020

    @darrenm95

    I still get an issue when trying to run google chrome on windows subsystem for linux. Using ubuntu 16.04. Has anyone got any ideas why I am getting the followings errors?

    [28834:28834:0206/151626.871150:ERROR:browser_switcher_service.cc(238)] XXX Init()
    [28918:32:0206/151627.109653:ERROR:platform_shared_memory_region_posix.cc(52)] Descriptor access mode (2) differs from expected (0)
    [28943:50:0206/151627.224939:ERROR:platform_shared_memory_region_posix.cc(52)] Descriptor access mode (2) differs from expected (0)
    [28929:36:0206/151627.235707:ERROR:platform_shared_memory_region_posix.cc(52)] Descriptor access mode (0) differs from expected (2)
    [28961:65:0206/151627.236391:ERROR:platform_shared_memory_region_posix.cc(52)] Descriptor access mode (2) differs from expected (0)
    [28868:28868:0206/151627.432404:ERROR:gl_surface_glx.cc(459)] GLX 1.3 or later is required.
    [28868:28868:0206/151627.432430:ERROR:gl_initializer_x11.cc(148)] GLSurfaceGLX::InitializeOneOff failed.
    [28868:28868:0206/151627.438697:ERROR:viz_main_impl.cc(159)] Exiting GPU process due to errors during initialization
    [28834:28834:0206/151628.837524:ERROR:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token '<'", source: chrome://welcome/welcome_app.js (1)
    [28894:13:0206/151628.841397:ERROR:platform_shared_memory_region_posix.cc(52)] Descriptor access mode (0) differs from expected (2)
    [28834:28853:0206/151629.981332:FATAL:gpu_data_manager_impl_private.cc(439)] GPU process isn't usable. Goodbye.
    Trace/breakpoint trap (core dumped)

  18. ambrt commented on Mar 19, 2020

    @ambrt

    Have same thing . I came to flags below. It flashes the website correctly (in VcXsrv)
    then crashes.
    Its at WSL 1.
    sudo DISPLAY=:0 google-chrome --disable-features=VizDisplayCompositor --no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage --unlimited-storage --ignore-certificate-errors --enable-font-antialiasing --font-render-hinting=medium http://example.com

    The error stack is this

    [30371:30371:0319/144325.480839:ERROR:edid_parser.cc(102)] Too short EDID data: manufacturer id
    [30371:30398:0319/144325.630878:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [30371:30398:0319/144325.650220:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [30371:30398:0319/144325.650262:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [30371:30451:0319/144325.809533:ERROR:object_proxy.cc(632)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    [30371:30451:0319/144325.810376:ERROR:object_proxy.cc(632)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    [30371:30451:0319/144325.811266:ERROR:object_proxy.cc(632)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    libGL error: No matching fbConfigs or visuals found
    libGL error: failed to load driver: swrast
    [30396:30396:0319/144325.943947:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization
    [30371:30383:0319/144326.480351:ERROR:browser_gpu_channel_host_factory.cc(138)] Failed to launch GPU process.
    Xlib:  extension "MIT-SHM" missing on display ":0".
    

    also frequent shared memory errors

    [25681:25687:0319/172018.623518:ERROR:platform_shared_memory_region_posix.cc(52)] Descriptor access mode (0) differs from expected (2)
    

    The network seems to work because if i will run with sudo DISPLAY=:1 xvfb-run (...) --dump-dom --headless http://example.com
    It dumps dom correctly then crashes with

    [0319/144741.169122:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 1 time(s)
    [0319/144741.313374:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 2 time(s)
    [0319/144741.462192:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 3 time(s)
    [0319/144741.611385:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 4 time(s)
    [0319/144741.767465:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 5 time(s)
    [0319/144741.926318:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 6 time(s)
    [0319/144741.927170:ERROR:browser_gpu_channel_host_factory.cc(138)] Failed to launch GPU process.
    
  19. G-Rath commented on Mar 19, 2020

    @G-Rath

    therealkenc I've followed your instructions in your original comment, but chrome seems to having some issues.

    Here are some details:

    Windows 10 Pro
    Version: 1909
    OS Build: 18363.720

    VcXsrv X Server: 1.20.6.0 (12 Jan 2020)
    Google Chrome 80.0.3987.149

    I can run both google-chrome-stable & google-chrome-unstable if I use sudo & --no-sandbox, but --headless crashes:

    g-rath@DESKTOP-MUGH739:/c/Users/G-Rath$ sudo google-chrome-stable --no-sandbox --headless https://google.com
    [0320/095942.195820:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 1 time(s)
    [0320/095942.337443:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 2 time(s)
    [0320/095942.473931:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 3 time(s)
    [0320/095942.610071:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 4 time(s)
    [0320/095942.748664:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 5 time(s)
    [0320/095942.882727:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 6 time(s)
    [0320/095942.978725:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 7 time(s)
    [0320/095943.069493:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 8 time(s)
    [0320/095943.157845:WARNING:gpu_process_host.cc(1165)] The GPU process has crashed 9 time(s)
    [0320/095943.157879:FATAL:gpu_data_manager_impl_private.cc(1034)] The display compositor is frequently crashing. Goodbye.
    Failed to generate minidump.Illegal instruction (core dumped)
    

    This is very annoying because headless is what I want, so I can run feature tests 😬

    Heres the output for trying to run google-chrome-stable:

    g-rath@DESKTOP-MUGH739:/c/Users/G-Rath$ /usr/bin/google-chrome-stable
    Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Permission denied
    Trace/breakpoint trap (core dumped)
    g-rath@DESKTOP-MUGH739:/c/Users/G-Rath$ stat /usr/bin/google-chrome-stable
      File: /usr/bin/google-chrome-stable -> /opt/google/chrome/google-chrome
      Size: 32              Blocks: 0          IO Block: 512    symbolic link
    Device: 2h/2d   Inode: 844424932927321  Links: 1
    Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
    Access: 2020-03-19 17:46:48.000000000 +1300
    Modify: 2020-03-17 10:50:01.000000000 +1300
    Change: 2020-03-19 17:46:55.208091200 +1300
     Birth: -
    

    If I then run it with --no-sandbox, Chrome opens and then crashes with a lot of permission errors.

    For some reason it seems that Chrome is creating its cache (and I assume other files) in a way that means they end up being owned by root?

    Let me know if you'd like me to create a new issue, or have any questions :)

    Additionally, webpages don't actually load; I just get a white screen.

  20. ambrt commented on Mar 23, 2020

    @ambrt

    The comment above about not working solution must be related to chrome version. The newest version 80.* is failing me also.

    I used version 77 that i happened to have installed on wsl some time ago and it manages to open non https website, via VcXsrv.
    sudo DISPLAY=:0 /home/user/node_modules/puppeteer/.local-chromium/linux-674921/chrome-linux/chrome --disable-features=VizDisplayCompositor --no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage --unlimited-storage --ignore-certificate-errors --disable-gpu --enable-font-antialiasing --font-render-hinting=medium --use-gl=wgl --disable-software-rasterizer http://example.com

    It still opens https sites as a blank page.

  21. MolloKhan commented on May 6, 2020

    @MolloKhan

    I downloaded the latest version today (81.0.4044) and I got this error as well. I don't know why this ticket is closed =/

  22. savethebyte commented on Jul 10, 2020

    @savethebyte

    I have used chrome 83 and 84, and I am still recieving the error in WSL.

    [0709/221720.544454:ERROR:platform_shared_memory_region_posix.cc(46)] Descriptor access mode (0) differs from expected (2)
    [0709/221720.548263:WARNING:crash_handler_host_linux.cc(366)] Could not translate tid - assuming crashing thread is thread group leader; syscall_supported=0
    [0709/221720.675739:WARNING:crash_handler_host_linux.cc(366)] Could not translate tid - assuming crashing thread is thread group leader; syscall_supported=0
    --2020-07-09 22:17:20--  https://clients2.google.com/cr/report
    Resolving clients2.google.com (clients2.google.com)... 172.217.6.110, 2607:f8b0:4009:813::200e
    Connecting to clients2.google.com (clients2.google.com)|172.217.6.110|:443... connected.
    [1594351040.818][DEBUG]: DevTools WebSocket Event: Inspector.targetCrashed 5A70B9C03C3188FDCA221C0B94718B5F {
    
    }
    [1594351040.818][INFO]: Done waiting for pending navigations. Status: tab crashed
    HTTP request sent, awaiting response... [1594351040.868][INFO]: [c6f38322f1211be529223d6f0a3aafb7] RESPONSE ClickElement ERROR unknown error: session deleted because of page crash
    from tab crashed
      (Session info: headless chrome=83.0.4103.116)
    [1594351040.868][DEBUG]: Log type 'driver' lost 0 entries on destruction
    [1594351040.868][DEBUG]: Log type 'browser' lost 3 entries on destruction
    200 OK
    Length: unspecified [text/plain]
    Saving to: ‘/dev/fd/4’
    
    Crash dump id: aa6abc501aeb718e
    
         0K                                                         744K=0s
    
  23. Ananthavijay commented on Oct 23, 2021

    @Ananthavijay

    I get this error in wsl when I run google-chrome

    [1023/204234.433299:ERROR:exception_handler_server.cc(361)] getsockopt: Invalid argument (22)                                                                                                                            
    
    
  24. kohheepeace commented on Nov 12, 2021

    @kohheepeace

    I followed this docs https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

    And I got these errors

    $ google-chrome
    [2014:2014:1112/172745.466766:ERROR:browser_dm_token_storage_linux.cc(94)] Error: /etc/machine-id contains 0 characters (32 were expected).
    [1112/172745.479719:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
    [1112/172745.479781:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
    Trace/breakpoint trap
  25. ricklambrechts commented on Jan 3, 2022

    @ricklambrechts

    For the people that are expierencing issues after using: https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

    Check the wsl version with:

    wsl --list --verbose
    

    If the wsl distro is version 1 then convert the distro to version 2 with:
    Check this documentation: https://docs.microsoft.com/en-us/windows/wsl/basic-commands#set-wsl-version-to-1-or-2

    wsl --set-version <name> 2
    
  26. mochammadrafi commented on Apr 19, 2022

    @mochammadrafi

    Any solution?

  27. simonLeary42 commented on Jun 5, 2023

    @simonLeary42

    A simple wsl --update fixed this issue for me. I'm not sure what version I had because wsl --version apparently wasn't a valid command back then. I'm now using 1.2.5.0

  28. gelodefaultbrain commented on Jul 18, 2024

    @gelodefaultbrain

    Hi, what did you guys do? I just did

    gelswsl@LAPTOP-MCLLQCCH:~$ google-chrome
    Killed
    

    what is happening?

  29. gelodefaultbrain commented on Jul 18, 2024

    @gelodefaultbrain

    Hi, what did you guys do? I just did

    gelswsl@LAPTOP-MCLLQCCH:~$ google-chrome
    Killed
    

    what is happening?

    Hi Had to update wsl as well as mentioned here. Well with that it caused my running application to restart as well 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions