8

Background

I am tasked with replacing our IE based printing logic with Chromium so that we can eventually support running our current server software on Windows Server Core or potentially other operating systems that support .Net Core. My current thought is to either use Chromium embedded framework or to make use of Puppeteer. I am leaning towards the later because I feel it would be easier to port between operating systems.

Issue

Originally it failed to start with an error about sandboxing so I added the no-sandbox flag. Now when I try to load Chromium it fails to start with the exception below stating that it cannot load chrome.dll

 PS C:\Program Files (x86)\Google\Chrome\Application>> .\chrome --headless --enable-logging --disable-gpu --screenshot="C:\screen.png" "https://www.chromestatus.com/"

Which yields the following error in the debug.log file:

[0813/133208.016:ERROR:main_dll_loader_win.cc(134)] Failed to load Chrome DLL from c:\Program Files (x86)\Google\Chrome\Application\68.0.3440.106\chrome.dll: The specified module could not be found. (0x7E)

I have checked around the internet and found a few mentions of this error but the suggested fixes don't seem to fix the issue.

scopchanov
  • 7,966
  • 10
  • 40
  • 68
Joshua Cain
  • 121
  • 1
  • 8

2 Answers2

4

I was able to download Chromium 72.0.3592.0 via Chocolatey and the issue is resolved in that version. I tested using Server Core 2016 LTSB.

choco install chromium --pre -y

chrome --headless --disable-gpu --dump-dom --enable-logging https://www.chromestatus.com/ --no-first-run


Edit:

If you are attempting to run Selenium Tests using Docker windowsservercore and chromium: The command line tests of chromium chrome.exe appear to never work from the container command line.

However when you run dotnet test app.csproj or dotnet vstest app.dll inside the container the webdriver successfully starts and drives the browser

J.D. Cain
  • 639
  • 4
  • 16
3

This has been reported to the Chromium team. It appears that Chromium 68+ might have issues with Windows Server 2016.

https://bugs.chromium.org/p/chromium/issues/detail?id=873097

Joshua Cain
  • 121
  • 1
  • 8
  • Yep. I created that ticket, and can confirm from testing from suggestions on the thread, that version 66 works, while 68 throws that error. Haven't tested 67 yet. – LarsWA Aug 16 '18 at 18:42
  • Also ... this error occurs both on windows server core 2016 1709 and the original Windows Server 2016 build. – LarsWA Aug 16 '18 at 18:43
  • I can confirm that Chromium 66.0.3359.181 works fine. – Joshua Cain Aug 17 '18 at 13:13