Giter VIP home page Giter VIP logo

Comments (6)

lifesaverluke avatar lifesaverluke commented on May 25, 2024 7

I've pre-compiled Lambda layers for various stable Chromium versions that work on AWS Lambda (they include the .so file mentioned above). They are available for download here.

from serverless-chrome.

nealshail avatar nealshail commented on May 25, 2024 2

+1 here too, I'm getting a message

libnss3.so: cannot open shared object file

from serverless-chrome.

orr3 avatar orr3 commented on May 25, 2024

+1 Same here.

Trying to install and deploy the exempel https://github.com/adieuadieu/serverless-chrome/tree/master/examples/serverless-framework/aws.
Only change made was a downgrade of serverless-plugin-chrome from "1.0.0-69" to "1.0.0-55.3" because the source was not found.

After deployment the pdf function throws Error 500, and here are the logs with DEBUG variable.

2021-03-22 13:59:23.409 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 1
2021-03-22 13:59:23.911 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 2
2021-03-22 13:59:24.414 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 3
2021-03-22 13:59:24.916 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 4
2021-03-22 13:59:25.417 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 5
2021-03-22 13:59:25.919 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 6
2021-03-22 13:59:26.420 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 7
2021-03-22 13:59:26.921 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 8
2021-03-22 13:59:27.423 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 9
2021-03-22 13:59:27.924 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Waiting for Chrome 10
2021-03-22 13:59:27.927 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: Error trying to spawn chrome: Error: connect ECONNREFUSED 127.0.0.1:9222
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 9222
}
2021-03-22 13:59:27.927 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: stdout log: 
2021-03-22 13:59:27.928 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	INFO	@serverless-chrome/lambda: stderr log: /var/task/headless-chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

2021-03-22 13:59:27.929 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	ERROR	Error occured in serverless-plugin-chrome wrapper when trying to ensure Chrome for default() handler. {
  chromePath: '/var/task/headless-chromium',
  flags: [ '--window-size=1280,1696', '--hide-scrollbars' ]
} Error: Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs.
    at /var/task/src/handlers/pdf.js:3415:13
    at Generator.throw (<anonymous>)
    at step (/var/task/src/handlers/pdf.js:3350:193)
    at /var/task/src/handlers/pdf.js:3350:404
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
2021-03-22 13:59:27.929 (+01:00)	c635fd57-275d-4cf3-84ef-d17f78f6239f	ERROR	Invoke Error 	{"errorType":"Error","errorMessage":"Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs.","stack":["Error: Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs.","    at /var/task/src/handlers/pdf.js:3415:13","    at Generator.throw (<anonymous>)","    at step (/var/task/src/handlers/pdf.js:3350:193)","    at /var/task/src/handlers/pdf.js:3350:404","    at processTicksAndRejections (internal/process/task_queues.js:97:5)"]}

from serverless-chrome.

ozeron avatar ozeron commented on May 25, 2024

+1 here, same behaviour
Anyone does know how to fix this?

from serverless-chrome.

rsboni avatar rsboni commented on May 25, 2024

+1 here, same problem and no additional log info.
No apparent Fix.
Anyone fixed it?

from serverless-chrome.

umihico avatar umihico commented on May 25, 2024

Instead of fixing this, we can just use native chromium with certain conditions, JFYI.
https://github.com/umihico/docker-selenium-lambda/

from serverless-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.