Error occured in serverless-plugin-chrome wrapper when trying to ensure Chrome for handler()
See original GitHub issueHi,
I’ve got the next error with serverless-chrome-plugin
ERROR Error occured in serverless-plugin-chrome wrapper when trying to ensure Chrome for handler() handler. { functions: [ 'processsqsevent' ], flags: [ '--window-size=1280,1696', '--hide-scrollbars' ], chromePath: '/var/task/headless-chromium' } Error: Unable to start Chrome. If you have the DEBUG env variable set,there will be more in the logs. at /var/task/api/process_sqs.js:257:5970 at Generator.throw (<anonymous>) at n (/var/task/api/process_sqs.js:257:5007) at /var/task/api/process_sqs.js:257:5129 at processTicksAndRejections (internal/process/task_queues.js:93:5)
Debug mode shows the next errors:
INFO @serverless-chrome/lambda: Error trying to spawn chrome: Error: connect ECONNREFUSED 127.0.0.1:9222 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 9222 }
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
Node version 12.13.1
Any thoughts? Could anybody help?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:6
Hi there!
Based on the fact that I did not find the answer to my question, the fastest way to restore broken functionality in my project is to migrate to chrome-aws-lambda.
That’s my way:
build_chrome_layer.sh
copy_chrome_artifact.sh
serverless.yaml
serverless.yaml
That’s it. Hope it will be helpful.
@godrose Morning! This error is due the fact that you are trying to install a lot of dependencies. Please, check the lambda layers documentation to avoid this issue. https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html