Giter Site home page Giter Site logo

george-lim / firefox-lambda Goto Github PK

View Code? Open in Web Editor NEW
7.0 6.0 1.0 14 KB

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

Dockerfile 84.43% Shell 15.57%
linux firefox lambda docker-image playwright github-container-registry ecr-public xvfb headless-browser

firefox-lambda's People

Contributors

george-lim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

laromicas

firefox-lambda's Issues

[pid=30][err] *** You are running in headless mode.

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 ->
Screenshot 2022-04-27 155012

my app.py only change the firefox path to /opt/firefox/firefox
and set headless=True

Run playwright on lambda with node

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?

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.