-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADO extension fails when run in a container: handleRequestFunction failed, { message: 'read ECONNRESET' } #1575
Comments
This issue has been marked as ready for team triage; we will triage it in our weekly review and update the issue. Thank you for contributing to Accessibility Insights! |
If the issue is that the container is missing system dependencies required to successfully run Chromium, this may be yet another reason that it would be nice to switch the service from Puppeteer to Playwright. Playwright gives a much nicer error message for that case (noting before trying to start that the system is missing required dependencies, enumerating which ones, and offering an |
Investigated this a bit further and confirmed that this does seem to be a result of trying to run in Windows Server Core without having installed the prerequisite On Other errors with similar symptoms:
The latter case (where the correct deps are installed on Linux) happens because Chromium's sandboxing only works in Docker containers if you pass a specific Docker In summary, I think our short-term recommendation we should document needs to be that, in order to run the task, users must run it from one of the following environments:
...noting specifically that Docker containers based on linux, servercore, or nanoserver are not supported. Medium-term, it would be good to detect this case early and improve our error messaging. On Windows, we could do something comparable to Playwright's If we get substantial user requests for linux support, I'm not sure we have a great solution; we could add some sort of |
Updated internal documentation per above comment's short-term recommendations. |
This issue has been marked as ready for team triage; we will triage it in our weekly review and update the issue. Thank you for contributing to Accessibility Insights! |
The remaining work for this is the paragraph starting with "Medium-term" in the above comment, discussing making the error message more clear. Marking as ready for triage for us to discuss if/when to do that. |
We want to do this if it's fairly easy |
Some Windows Server versions (Nano Server and Server Core) lack the needed dependencies to run Chrome. This commit adds a check for this case (based on the information in #1575 (comment)), displaying a warning in the console when it occurs. Specifically, it checks for the availability of the `Server-Media-Foundation` feature (only available on server editions, not client) with non-installed state. This commit adds a new dependency ([wmi-client](https://www.npmjs.com/package/wmi-client)) to `package.json`. In order to use this package and pass linting, we needed to create a declaration file for its types. This is `packages/ado-extension/src/wmic.d.ts`, which declares the `"wmi-client"` `module` and its `wmic` `class`. Addresses #1575. Co-authored-by: madalynrose <madparker@microsoft.com>
Apparently missing Server-Media-Foundation Windows feature has nothing to do with this issue. To run Chrome or Chromium in Windows Server container there is no requirement to install it. To successfully run Chrome or Chromium in Windows/Linux container install required Fonts. In Ubuntu you can install required fonts using following script: apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 libxtst6 procps \
--no-install-recommends \ In Windows Server core enable following optional Windows features and register fonts using Win32 GDI API function. Detailed solution can be found here. [DllImport("gdi32.dll")]
static extern int AddFontResource(string lpFilename);
|
Describe the bug
When run in a container, the ADO extension fails with:
It will sometimes include additional error messages, such as:
ProtocolError: Protocol error (Target.setAutoAttach): Target closed.
caused by: Error: "{ message: 'read ECONNRESET' }"
To Reproduce
You can reproduce the error by running the extension in a container. https://learn.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops#single-job
Repro example
Expected behavior
According to Running Puppeteer in Docker, Troubleshooting there are likely extra steps we should recommend to the user.
It's not clear to me if there's anything we can do on the extension side or if this can be helped with added documentation
Screenshots
Context (please complete the following information)
Are you willing to submit a PR?
Yes
Did you search for similar existing issues?
Additional context
The text was updated successfully, but these errors were encountered: