george-lim / firefox-lambda Goto Github PK
View Code? Open in Web Editor NEWA Lambda container image that provides a Playwright-patched version of Firefox
Home Page: https://gallery.ecr.aws/george-lim/firefox-lambda
License: MIT License
A Lambda container image that provides a Playwright-patched version of Firefox
Home Page: https://gallery.ecr.aws/george-lim/firefox-lambda
License: MIT License
Hi, i having trouble running this in aws lambda, when i run it locally from the Dockerfile and tested locally works fine, but when make a ecr image to create a lambda from this and tested, i have the following error ->
my app.py only change the firefox path to /opt/firefox/firefox
and set headless=True
FROM public.ecr.aws/george-lim/firefox-lambda:1.0.1 as firefox
FROM public.ecr.aws/lambda/nodejs:12
COPY --from=firefox /opt/firefox /opt/firefox
RUN yum install -y
dbus-glib-0.100-7.2.amzn2
gtk3-3.22.30-3.amzn2
libXt-1.1.5-3.amzn2.0.2
&& yum clean all
COPY app.js package*.json ./
RUN npm install
ENV FIREFOX_BINARY_PATH=/opt/firefox/firefox
CMD [ "app.lambdaHandler" ]
I have built docker with above file and deployed lambda with this container.
But I have failed. Following is the lambda logs.
<launched> pid=23
[err] *** You are running in headless mode.
[err] ExceptionHandler::GenerateDump cloned child 34
[err] ExceptionHandler::SendContinueSignalToChild sent continue signal to child
[err] ExceptionHandler::WaitForContinueSignal waiting for continue signal...
=========================== logs ===========================
<launching> /opt/firefox/firefox -no-remote -headless -profile /tmp/playwright_firefoxdev_profile-BYvMgD -juggler-pipe -silent
<launched> pid=23
[err] *** You are running in headless mode.
[err] ExceptionHandler::GenerateDump cloned child 34
[err] ExceptionHandler::SendContinueSignalToChild sent continue signal to child
[err] ExceptionHandler::WaitForContinueSignal waiting for continue signal...
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
at Connection.sendMessageToServer (/var/task/node_modules/playwright/lib/client/connection.js:69:15)
at Proxy.<anonymous> (/var/task/node_modules/playwright/lib/client/channelOwner.js:44:61)
at /var/task/node_modules/playwright/lib/client/browserType.js:61:73
at BrowserType._wrapApiCall (/var/task/node_modules/playwright/lib/client/channelOwner.js:72:34)
at BrowserType.launch (/var/task/node_modules/playwright/lib/client/browserType.js:52:21)
at Runtime.exports.lambdaHandler [as handler] (/var/task/app1.js:6:39)
at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)
END RequestId: ec405a11-a666-42ff-a6e3-a87050e38716
REPORT RequestId: ec405a11-a666-42ff-a6e3-a87050e38716 Duration: 1636.06 ms Billed Duration: 2771 ms Memory Size: 512 MB Max Memory Used: 166 MB Init Duration: 1134.78 ms ```
What should I do for this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.