paulmaunders / delivery-slot-bot

A puppeteer based bot to monitor supermarket online delivery slots.
MIT License
54 stars 27 forks source link

Issues running EC2 instance #61

Closed diesel279 closed 4 years ago

diesel279 commented 4 years ago

Hi Guys,

running into some issues with this using AWS

NAME="Amazon Linux AMI" VERSION="2018.03"

Following the steps test notifications work but when i run yarn start i get the below

##ERROR## [ec2-user@ip-172-31-14-187 delivery-slot-bot]$ yarn start yarn run v1.22.4 $ node ./src/index.js index.js

Runs one-off

Options: --version Show version number [boolean] --help Show help [boolean]

Error: Failed to launch chrome! /home/ec2-user/delivery-slot-bot/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: libXcursor.so.1: cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

at onClose (/home/ec2-user/delivery-slot-bot/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.<anonymous> (/home/ec2-user/delivery-slot-bot/node_modules/puppeteer/lib/Launcher.js:337:50)
at Interface.emit (events.js:327:22)
at Interface.close (readline.js:424:8)
at Socket.onend (readline.js:202:10)
at Socket.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1218:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I'm also seeing this

[ec2-user@ip-172-31-11-170 chrome-linux]$ ldd chrome | grep not
libXcursor.so.1 => not found libXdamage.so.1 => not found libXfixes.so.3 => not found libcups.so.2 => not found libXss.so.1 => not found libXrandr.so.2 => not found libatk-1.0.so.0 => not found libatk-bridge-2.0.so.0 => not found libpangocairo-1.0.so.0 => not found libpango-1.0.so.0 => not found libcairo.so.2 => not found libatspi.so.0 => not found libgtk-3.so.0 => not found libgdk-3.so.0 => not found libgdk_pixbuf-2.0.so.0 => not found

Can someone help me out here this is not my area so i am struggling a little

diesel279 commented 4 years ago

just switched to RHEL 8.1, ran into similar issues but the dependencies were easier to resolve