Streetmerchant: Running on Raspberry Pi

Created on 26 Sep 2020  路  3Comments  路  Source: jef/streetmerchant

Description

Attempting to run nvidia-snatcher on Raspberry Pi (raspbian buster) results in this error,

(node:10149) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/home/pi/nvidia-snatcher/node_modules/puppeteer/.local-chromium/linux-800071/chrome-linux/chrome: 26: /home/pi/nvidia-snatcher/node_modules/puppeteer/.local-chromium/linux-800071/chrome-linux/chrome: Syntax error: Unterminated quoted string


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

    at onClose (/home/pi/nvidia-snatcher/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
    at Interface.<anonymous> (/home/pi/nvidia-snatcher/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
    at Interface.emit (events.js:327:22)
    at Interface.close (readline.js:416:8)
    at Socket.onend (readline.js:194:10)
    at Socket.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:10149) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10149) [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.

Possible solution

In https://github.com/jef/nvidia-snatcher/blob/0aa7ab596c907ce72c188eb4b1acdee088307437/src/index.ts#L39-L45 insert executablePath: 'chromium-browser' (based on https://github.com/puppeteer/puppeteer/issues/550#issuecomment-635718872) and re-run npm install.

Most helpful comment

Puppeteer has an env var for this: PUPPETEER_EXECUTABLE_PATH. If using an existing Chromium installation, may also want to set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to 1 to skip Puppeteer downloading its own Chromium, wasting space.

All 3 comments

Would be great if this could be configured via an optional environment variable. That would make it simpler to run on NixOS as well.

Puppeteer has an env var for this: PUPPETEER_EXECUTABLE_PATH. If using an existing Chromium installation, may also want to set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to 1 to skip Puppeteer downloading its own Chromium, wasting space.

Would be great if this could be configured via an optional environment variable. That would make it simpler to run on NixOS as well.

Puppeteer has an env var for this: PUPPETEER_EXECUTABLE_PATH. If using an existing Chromium installation, may also want to set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to 1 to skip Puppeteer downloading its own Chromium, wasting space.

Exactly this! Thanks @amarshall.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhirzzh picture zhirzzh  路  5Comments

lngchn picture lngchn  路  3Comments

RealityMyx picture RealityMyx  路  3Comments

MrRobot245 picture MrRobot245  路  5Comments

FawnPat picture FawnPat  路  4Comments