Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icon_emoji causes bridge to crash. #88

Open
Sandelinos opened this issue Jul 20, 2021 · 1 comment
Open

icon_emoji causes bridge to crash. #88

Sandelinos opened this issue Jul 20, 2021 · 1 comment

Comments

@Sandelinos
Copy link

I've set up the bridge on Debian 10 and every time I send a post with "icon_emoji" specified the bridge crashes.

Here's the crash log.

Tue, 20 Jul 2021 15:01:05 GMT sequelize deprecated Model.findById has been deprecated, please use Model.findByPk instead at node_modules/sequelize/lib/model.js:4208:9
Jul-20-2021 18:01:05.192 +03:00 info [WebService [Hook (redacted for obvious reasons)]] Publishing webhook request for processing
[ERROR] TypeError: cheerio is not a function
    at module.exports (/opt/matrix-webhooks/matrix-appservice-webhooks/src/processing/layers/avatar/slack_icon_emoji.js:13:24)
    at layerChain.then (/opt/matrix-webhooks/matrix-appservice-webhooks/src/processing/WebhookReceiver.js:69:75)
    at tryCatcher (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/opt/matrix-webhooks/matrix-appservice-webhooks/node_modules/bluebird/js/release/async.js:15:14)

I've checked that cheerio is installed.

$ npm ls | grep cheerio
├─┬ [email protected]
│ ├─┬ [email protected]
npm ERR! peer dep missing: winston@^3, required by [email protected]

npm version is v10.24.0

I'm not familiar with node so if there's any important information I missed tell me.

@swarnat
Copy link

swarnat commented Aug 30, 2021

We also recognized that some time ago. Today I found the time to search the reason.
When I read the changelog of Cheerio, the RC.9, which was released 3 months ago, and is used in "latest" docker tag, contains a breaking change.

I prepared PR #91, which should fix this problem. Hope it will getting merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants