adieuadieu / serverless-chrome

🌐 Run headless Chrome/Chromium on AWS Lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to load GLES library with the latest prebuild binary

nemnemnemy opened this issue · comments

I downloaded the following zip and unzip it on amazon linux 2.
https://github.com/adieuadieu/serverless-chrome/releases/download/v1.0.0-57/stable-headless-chromium-amazonlinux-2.zip

Then, I ran the following command.
./headless-chromium --headless --no-sandbox --single-process --disable-gpu --version

Then I got the following error. Do I need anything else to run the headless-chromium? Where can I find a portable binary that works by itself?

[0502/065852.689593:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale
[0502/065852.717915:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale
[0502/065852.717915:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale
Fontconfig error: Cannot load default config file: No such file: (null)
[0502/065852.727725:ERROR:egl_util.cc(70)] Failed to load GLES library: /chrome/swiftshader/libGLESv2.so: /chrome/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
[0502/065852.732127:ERROR:gpu_channel_manager.cc(749)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0502/065852.732156:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[0502/065852.732198:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub
[0502/065852.730431:FATAL:platform_font_skia.cc(97)] Check failed: InitDefaultFont(). Could not find the default font

I am facing the same error when building an image from amazon/aws-lambda-python:3.9.

./headless-chromium --headless --no-sandbox --single-process --disable-gpu --version

[0708/173920.791282:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale
[0708/173920.799911:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale
[0708/173920.800427:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale
[0708/173920.806907:ERROR:egl_util.cc(70)] Failed to load GLES library: /tmp/driver/swiftshader/libGLESv2.so: /tmp/driver/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
[0708/173920.809363:ERROR:gpu_channel_manager.cc(749)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0708/173920.809408:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[0708/173920.809464:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub

Can we get a fix for this please? Easy container to use but cannot proceed because of this problem.