TimboKZ / discord-spoiler-bot

🗣️🛑 Spoiler support for Discord
https://www.npmjs.com/package/discord-spoiler-bot
MIT License
61 stars 19 forks source link

'CGFontGetGlyphPath' Error #26

Closed dkmnllth closed 6 years ago

dkmnllth commented 6 years ago

Hello o/

I'm getting an error that's keeping the bot from functioning properly where 1) the "spoiler" term isn't being retracted upon spoiler command 2) gifs aren't being implemented and 3) hover functionality isn't working - instead if the window is up and the spoiler is viewable, the content is automatically revealed. Here's a screenshot of the issue (content is hidden due to use of Grab app to screenshot): spoiler bot error

Here's the code block of error text:


Mar 13 14:52:33  node[4057] <Error>: The function ‘CGFontGetGlyphPaths’ is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance.
(node:4057) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Message
    at item.request.gen.end (/Users/brendenhurley/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:71:65)
    at then (/Users/brendenhurley/node_modules/snekfetch/src/index.js:215:21)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:118:7)
(node:4057) 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:4057) [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.

##Apologies if this error has less to do with your code specifically - relatively new to js and discord bots so struggling my way through. I'm running macOS High Sierra (Version 10.12.6). lmk if you need anymore information!
TimboKZ commented 6 years ago

Hey there, it looks like there might be a compatibility issue between node-canvas package and your particular Node.js version (or something similar).

The "hover functionality not working" is an issue with the new Discord update that autoplays all GIFs by default. AFAIK you can go to settings and turn autoplay off, but asking every user on the server to do that is too much of a hassle.

Considering that recent Discord update pretty much killed the bot I'm reluctant to work on any time-consuming fixes, but it looks like yours is just a dependency issue.

What Node.js version are you using?

dkmnllth commented 6 years ago

I'm running 9.8.0

dkmnllth commented 6 years ago

I think it might be a mix of cairo and node-canvas issues: https://github.com/Automattic/node-canvas/issues/531
The 'CGFontGetGlyphPath' seems like an old bug that they still haven't fixed. Notably, I'm also getting this error when installing node-canvas: https://github.com/Automattic/node-canvas/issues/1111 Unfortunately neither of these issues seem like they have solutions atm.

TimboKZ commented 6 years ago

The first one looks quite relevant to what you're experiencing. Since this is beyond my control, I'm closing this issue.