Code Monkey home page Code Monkey logo

Comments (7)

jlandure avatar jlandure commented on July 20, 2024 2

I can reproduce and got the same error:

docker run -it --rm --entrypoint "" --cap-add=SYS_ADMIN zenika/alpine-chrome chromium-browser --headless 
[0617/133728.690224:WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
[0617/133728.699507:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/133728.699569:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/133728.748218:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib/chromium/swiftshader/libGLESv2.so: Error loading shared library /usr/lib/chromium/swiftshader/libGLESv2.so: No such file or directory
[0617/133728.757197:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/133728.758195:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/133728.757239:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/133728.806071:ERROR:gl_implementation.cc(292)] Failed to load /usr/lib/chromium/swiftshader/libGLESv2.so: Error loading shared library /usr/lib/chromium/swiftshader/libGLESv2.so: No such file or directory
[0617/133728.814312:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/133728.814364:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/133728.817746:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/133728.822965:ERROR:browser_gpu_channel_host_factory.cc(121)] Failed to launch GPU process.
[0617/133729.029743:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context.

Is these errors are really errors for your needs @harobed ?

  1. First try
    I've tried with this Dockerfile to validate the 2 missing libs: libGLESv2 & libEGL
    (mesa-egl & mesa-gles in the alpine world)
FROM zenika/alpine-node:latest

# Update apk repositories
RUN echo "http://dl-2.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories
RUN echo "http://dl-2.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN echo "http://dl-2.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories

# Install chromium
RUN apk -U --no-cache \
	--allow-untrusted add \
    zlib-dev \
    chromium \
    xvfb \
    wait4ports \
    xorg-server \
    dbus \
    ttf-freefont \
    mesa-egl \
    mesa-gles \
    grep \ 
    udev \
    && apk del --purge --force linux-headers binutils-gold gnupg zlib-dev libc-utils \
    && rm -rf /var/lib/apt/lists/* \
    /var/cache/apk/* \
    /usr/share/man \
    /tmp/* \
    /usr/lib/node_modules/npm/man \
    /usr/lib/node_modules/npm/doc \
    /usr/lib/node_modules/npm/html \
    /usr/lib/node_modules/npm/scripts

# Bug Chrome 64
RUN mkdir /usr/lib/chromium/swiftshader/ \
    && cp /usr/lib/libGLESv2.so.2 /usr/lib/chromium/swiftshader/libGLESv2.so \
    && cp /usr/lib/libEGL.so.1 /usr/lib/chromium/swiftshader/libEGL.so

# Add Chrome as a user
RUN adduser -D chrome \
    && chown -R chrome:chrome /usr/src/app
# Run Chrome non-privileged
USER chrome

ENV CHROME_BIN=/usr/bin/chromium-browser
ENV CHROME_PATH=/usr/lib/chromium/

# Autorun chrome headless with no GPU
ENTRYPOINT ["chromium-browser", "--headless", "--disable-gpu"]

But I got the same kind of errors :

chromium-browser --headless --disable-gpu
[0617/141648.009875:WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
[0617/141648.013228:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context.
[0617/141648.061756:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/141648.061797:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/141648.108290:ERROR:gl_surface_egl.cc(819)] eglInitialize SwiftShader failed with error EGL_NOT_INITIALIZED
[0617/141648.108341:ERROR:gl_initializer_x11.cc(170)] GLSurfaceEGL::InitializeOneOff failed.
[0617/141648.113755:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/141648.113798:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/141648.116685:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/141648.167168:ERROR:gl_surface_egl.cc(819)] eglInitialize SwiftShader failed with error EGL_NOT_INITIALIZED
[0617/141648.167214:ERROR:gl_initializer_x11.cc(170)] GLSurfaceEGL::InitializeOneOff failed.
[0617/141648.171997:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/141648.172042:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/141648.174234:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/141648.234626:ERROR:gl_surface_egl.cc(819)] eglInitialize SwiftShader failed with error EGL_NOT_INITIALIZED
[0617/141648.234674:ERROR:gl_initializer_x11.cc(170)] GLSurfaceEGL::InitializeOneOff failed.
[0617/141648.244113:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/141648.244169:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/141648.247146:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0617/141648.298806:ERROR:gl_surface_egl.cc(819)] eglInitialize SwiftShader failed with error EGL_NOT_INITIALIZED
[0617/141648.298863:ERROR:gl_initializer_x11.cc(170)] GLSurfaceEGL::InitializeOneOff failed.
[0617/141648.304208:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/141648.304252:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
[0617/141648.304624:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
  1. Disabling "software-rasterizer"
    Using the flag --disable-software-rasterizer, we no longer have problems.

Give it a try:

docker container run -it --rm --cap-add=SYS_ADMIN zenika/alpine-chrome --disable-software-rasterizer
[0617/142641.879307:WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
[0617/142641.889469:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context.
[0617/142641.899154:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0617/142641.899213:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics
  1. And the rest of the errors?
    Puppeteer seems to get the same errors (seen here)
[1206/142247.390930:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context.
[1206/142247.391165:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[1206/142247.391182:ERROR:service_manager.cc(889)] Failed to resolve service name: metrics

from alpine-chrome.

HenryQW avatar HenryQW commented on July 20, 2024

Same error as @jlandure

from alpine-chrome.

jlandure avatar jlandure commented on July 20, 2024

Hi @HenryQW 👋
Sounds like more a warning than an error...
Like described about the "Lost UI shared context." error here

Should I be worried by the above errors?
@drmrbrewer Nah, these are fine :) They come from chromium internals and are probably used by the chromium developers.

from alpine-chrome.

jlandure avatar jlandure commented on July 20, 2024

Hi @harobed do you still have these errors?

from alpine-chrome.

jlandure avatar jlandure commented on July 20, 2024

Hi @harobed @HenryQW
Last call, I will close the issue in 3 days if you do not give any news...

from alpine-chrome.

joeyaurel avatar joeyaurel commented on July 20, 2024

I'm running into the same problem on OSX running docker container run -it --rm zenika/alpine-chrome:with-node --no-sandbox.

from alpine-chrome.

jlandure avatar jlandure commented on July 20, 2024

Hi @nickreynke and welcome 👋
Like explained here, this is more a warning than an error. Your app should work seamlessly.
Do you have any problems?
Perhaps we can add a "Troubleshooting" section on the README? 🤔

from alpine-chrome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.