claabs / epicgames-freegames-node

Automatically login and find available free games the Epic Games Store. Sends you a prepopulated checkout link so you can complete the checkout after logging in. Supports multiple accounts, login sessions, and scheduled runs.
https://hub.docker.com/r/charlocharlie/epicgames-freegames
MIT License
1.33k stars 90 forks source link

failed to lunch the browser process #259

Closed D3FALT404 closed 2 years ago

D3FALT404 commented 2 years ago

Describe the bug

When I try to run through npm run start:ts I get an error message on raspberry pi. Screenshots or Logs

epicgames-freegames-node@4.1.0 start:ts DEBUG=puppeteer-extra-plugin:portal* ts-node src/index.ts

puppeteer-extra-plugin:portal Initialized { webPortalConfig: { listenOpts: { port: 3000 }, baseUrl: 'https://epic.exmaple.com', localtunnel: false } } +0ms puppeteer-extra-plugin:portal basePath: / +0ms [2022-07-08 16:10:57.486 +0200] INFO: Started epicgames-freegames-node [2022-07-08 16:10:57.502 +0200] INFO: Checking free games for user: "klwid@gmail.com" [2022-07-08 16:10:57.771 +0200] ERROR: Failed to launch the browser process! /home/pi/epicgames-freegames-node/node_modules/puppeteer/.local-chromium/linux-9 91974/chrome-linux/chrome: 1: Syntax error: Unterminated quoted string

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

user: "xxx@gmail.com"
err: {
  "type": "Error",
  "message": "Failed to launch the browser process!\n/home/pi/epicgames-free                                                                                                                                                                                                                                             games-node/node_modules/puppeteer/.local-chromium/linux-991974/chrome-linux/chro                                                                                                                                                                                                                                             me: 1: Syntax error: Unterminated quoted string\n\n\nTROUBLESHOOTING: https://gi                                                                                                                                                                                                                                             thub.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n",
  "stack":
      Error: Failed to launch the browser process!
      /home/pi/epicgames-freegames-node/node_modules/puppeteer/.local-chromi                                                                                                                                                                                                                                             um/linux-991974/chrome-linux/chrome: 1: Syntax error: Unterminated quoted string

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

          at onClose (/home/pi/epicgames-freegames-node/node_modules/puppete                                                                                                                                                                                                                                             er/src/node/BrowserRunner.ts:275:9)
          at Interface.<anonymous> (/home/pi/epicgames-freegames-node/node_m                                                                                                                                                                                                                                             odules/puppeteer/src/node/BrowserRunner.ts:261:50)
          at Interface.emit (node:events:549:35)
          at Interface.emit (node:domain:482:12)
          at Interface.close (node:internal/readline/interface:536:10)
          at Socket.onend (node:internal/readline/interface:262:10)
          at Socket.emit (node:events:549:35)
          at Socket.emit (node:domain:482:12)
          at endReadableNT (node:internal/streams/readable:1359:12)
          at processTicksAndRejections (node:internal/process/task_queues:82                                                                                                                                                                                                                                             :21)
}

Additional context

D3FALT404 commented 2 years ago

nvm I didn't know that it wont work on arm cpu

Fredwuz commented 2 years ago

You can edit the puppeteer.ts file https://github.com/claabs/epicgames-freegames-node/blob/a7629cb5b837b3a9242bf0a0e13b94006bc58dad/src/common/puppeteer.ts#L100-L103 here and add executablePath: '/usr/bin/chromium-browser', like this

export const launchArgs: Parameters<typeof puppeteer.launch>[0] = {
  headless: true,
  executablePath: '/usr/bin/chromium-browser',
  args: [

it does work but sometimes I get a Navigation Timeout Error and you have to have chromium installed