FabianBartl / HARIBOT

A discord bot specialized for the "MINT TANK Community" discord server. Bot invite below:
https://discord.com/oauth2/authorize?client_id=1024235031037759500&permissions=8&scope=bot
MIT License
2 stars 3 forks source link

npm svgexport for /score doesn't work on debian (raspberrry pi) #40

Open FabianBartl opened 1 year ago

FabianBartl commented 1 year ago
(node:6830) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/usr/local/lib/node_modules/svgexport/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: 22: Syntax error: "(" unexpected

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

    at onClose (/usr/local/lib/node_modules/svgexport/node_modules/puppeteer/lib/launcher/BrowserRunner.js:159:20)
    at Interface.<anonymous> (/usr/local/lib/node_modules/svgexport/node_modules/puppeteer/lib/launcher/BrowserRunner.js:149:65)
    at Interface.emit (events.js:326:22)
    at Interface.close (readline.js:416:8)
    at Socket.onend (readline.js:194:10)
    at Socket.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:6830) 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:6830) [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.
Ignoring exception in command <nextcord.application_command.SlashApplicationCommand object at 0x7f9431ce50>:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/nextcord/application_command.py", line 906, in invoke_callback_with_hooks
    await self(interaction, *args, **kwargs)
  File "/home/pi/HARIBOT/src/main.py", line 497, in sc_score
    await interaction.followup.send(file=File(score_card_file_func(format)), ephemeral=private)
  File "/usr/local/lib/python3.9/dist-packages/nextcord/file.py", line 133, in __init__
    self.fp = open(fp, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/HARIBOT/tmp/score-card_386249332711620608.png'

The above exception was the direct cause of the following exception:

nextcord.errors.ApplicationInvokeError: Command raised an exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/HARIBOT/tmp/score-card_386249332711620608.png'

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