Twitch-watcher icon indicating copy to clipboard operation
Twitch-watcher copied to clipboard

Raspberry pi

Open Kron00 opened this issue 4 years ago • 19 comments

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

Kron00 avatar Apr 17 '20 16:04 Kron00

What is the error?

D3vl0per avatar Apr 17 '20 16:04 D3vl0per

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 [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 info lifecycle [email protected]~start: [email protected] 7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~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 [email protected]~start: CWD: /home/pi/.local/share/Trash/files/Valorant-watcher-master 10 silly lifecycle [email protected]~start: Args: [ '-c', 'node app "docker-compose.yml"' ] 11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 12 info lifecycle [email protected]~start: Failed to exec start script 13 verbose stack Error: [email protected] 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 [email protected] 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 [email protected] start: node app "docker-compose.yml" 22 error Exit status 1 23 error Failed at the [email protected] start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Kron00 avatar Apr 17 '20 17:04 Kron00

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

D3vl0per avatar Apr 17 '20 19:04 D3vl0per

what what command is that?

Kron00 avatar Apr 17 '20 19:04 Kron00

13 verbose stack Error: [email protected] start: node app "docker-compose.yml"

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

22 error [email protected] start: node app "docker-compose.yml"

D3vl0per avatar Apr 17 '20 19:04 D3vl0per

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:

D3vl0per avatar Apr 17 '20 19:04 D3vl0per

i dont knwo anything so like im kinda dumb

Kron00 avatar Apr 17 '20 19:04 Kron00

Choice one @Kronull

D3vl0per avatar Apr 17 '20 19:04 D3vl0per

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

D3vl0per avatar Apr 17 '20 19:04 D3vl0per

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

Do not mix it!

D3vl0per avatar Apr 17 '20 19:04 D3vl0per

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.

KanarekLife avatar Apr 22 '20 06:04 KanarekLife

@KanarekLife True

D3vl0per avatar Apr 22 '20 10:04 D3vl0per

@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 <[email protected]>"
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"]

KanarekLife avatar Apr 22 '20 11:04 KanarekLife

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.

yohudood avatar May 06 '20 07:05 yohudood

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

cyborgcodede avatar May 06 '20 11:05 cyborgcodede

rpi 2a or b and node 10.19.0

yohudood avatar May 06 '20 11:05 yohudood

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

D3vl0per avatar May 06 '20 13:05 D3vl0per

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 avatar May 06 '20 19:05 yohudood

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

yohudood avatar May 06 '20 20:05 yohudood