D3vl0per / Twitch-watcher

Automatic watching the twitch to get Valorant drop
MIT License
226 stars 66 forks source link

Raspberry pi #20

Open Kron00 opened 4 years ago

Kron00 commented 4 years ago

Will this work with the raspberry pi because I've been trying it on it and I keep getting errors.

D3vl0per commented 4 years ago

What is the error?

Kron00 commented 4 years ago

It might be something simple im a little new to linux.

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'start', 1 verbose cli 'docker-compose.yml', 1 verbose cli '-d' ] 2 info using npm@6.14.4 3 info using node@v10.15.2 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle valorant-watcher@2.0.0~prestart: valorant-watcher@2.0.0 6 info lifecycle valorant-watcher@2.0.0~start: valorant-watcher@2.0.0 7 verbose lifecycle valorant-watcher@2.0.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle valorant-watcher@2.0.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/.local/share/Trash/files/Valorant-watcher-master/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games 9 verbose lifecycle valorant-watcher@2.0.0~start: CWD: /home/pi/.local/share/Trash/files/Valorant-watcher-master 10 silly lifecycle valorant-watcher@2.0.0~start: Args: [ '-c', 'node app "docker-compose.yml"' ] 11 silly lifecycle valorant-watcher@2.0.0~start: Returned: code: 1 signal: null 12 info lifecycle valorant-watcher@2.0.0~start: Failed to exec start script 13 verbose stack Error: valorant-watcher@2.0.0 start: node app "docker-compose.yml" 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:189:13) 13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:189:13) 13 verbose stack at maybeClose (internal/child_process.js:970:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid valorant-watcher@2.0.0 15 verbose cwd /home/pi/.local/share/Trash/files/Valorant-watcher-master 16 verbose Linux 4.19.97-v7+ 17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "start" "docker-compose.yml" "-d" 18 verbose node v10.15.2 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error valorant-watcher@2.0.0 start: node app "docker-compose.yml" 22 error Exit status 1 23 error Failed at the valorant-watcher@2.0.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

D3vl0per commented 4 years ago

@Kronull Are you tired to node app "docker-compose.yml" command?

Kron00 commented 4 years ago

what what command is that?

D3vl0per commented 4 years ago

13 verbose stack Error: valorant-watcher@2.0.0 start: node app "docker-compose.yml"

17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "start" "docker-compose.yml" "-d"

22 error valorant-watcher@2.0.0 start: node app "docker-compose.yml"

D3vl0per commented 4 years ago

What are you typed in the console? @Kronull

  1. node app
  2. npm start
  3. docker-compose up
  4. docker-compose up -d
  5. Else:
Kron00 commented 4 years ago

i dont knwo anything so like im kinda dumb

D3vl0per commented 4 years ago

Choice one @Kronull

D3vl0per commented 4 years ago

Come for here: https://gitter.im/valorant-watcher/support I want to talk this with you.

D3vl0per commented 4 years ago

He use this command: npm start docker-compose up -d npm start OR docker-compose up -d

Do not mix it!

KanarekLife commented 4 years ago

I think that valorant-watcher do not work on rpi because image https://hub.docker.com/r/d3vm/valorant-watcher/tags is based on amd64 architecture. To make it work on rpi you would have to create additional image with arm64 arch.

D3vl0per commented 4 years ago

@KanarekLife True

KanarekLife commented 4 years ago

@D3vl0per You might add something like that to the Dockerfile and it might work:

FROM arm64v8/node:13.12.0-alpine3.10 AS arm64v8
LABEL maintainer="D3v <info@zsmark.dev>"
RUN apk add --no-cache chromium nss freetype freetype-dev harfbuzz ca-certificates ttf-freefont

WORKDIR /usr/src/app
COPY . .
RUN npm install
CMD ["npm","start"]
yohudood commented 4 years ago

when running on rpi i get this error

🔎 Checking config file... ✅ Json config found! (node:6658) UnhandledPromiseRejectionWarning: ReferenceError: e is not defined at readLoginData (/home/pi/Valorant-watcher/app.js:201:31) at main (/home/pi/Valorant-watcher/app.js:355:18) at Object. (/home/pi/Valorant-watcher/app.js:366:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) (node:6658) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:6658) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

cyborgcodede commented 4 years ago

For me it's working perfectly fine on a RPi 4B (armv7l), which version of NodeJS do you use?

yohudood commented 4 years ago

rpi 2a or b and node 10.19.0

D3vl0per commented 4 years ago

@yohudood Nice catch! https://github.com/D3vl0per/Valorant-watcher/blob/fa07ae02575ed22e83b5ca61a00d4c3de0810ddb/app.js#L200-L201

yohudood commented 4 years ago

now a new error

🔎 Checking config file... ✅ Json config found!

📱 Launching browser... (node:4480) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! spawn /usr/bin/chromium ENOENT

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

at onClose (/home/pi/Valorant-watcher/node_modules/puppeteer-core/lib/Launcher.js:750:14)
at ChildProcess.helper.addEventListener.error (/home/pi/Valorant-watcher/node_modules/puppeteer-core/lib/Launcher.js:741:65)
at ChildProcess.emit (events.js:198:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)

(node:4480) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:4480) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

yohudood commented 4 years ago

sorry it was my own fault i configured chromium instead of chromium-browser