geluk / matrix-webhook-gateway

Webhook gateway for Matrix / Synapse. Create and manage webhooks in Matrix channels for multiple services.
MIT License
18 stars 4 forks source link

stop working after Matrix v1.32.2 update #5

Closed Dual-0 closed 3 years ago

Dual-0 commented 3 years ago

Hello,

after I've updated matrix to v1.32.2 my matrix-webhook-gateway doesn't work anymore

npm run start

> webhook-gateway@0.0.0 start /opt/matrix-webhook-gateway
> ts-node --compiler ttypescript entry.ts -v

2021-04-26 13:40:39.945.000      DEBUG  [webhook-srv]           Loading configuration file: './gateway-config.yaml'

2021-04-26 13:40:39.981.000      DEBUG  [webhook-srv]           Generating appservice.yaml
2021-04-26 13:40:39.986.000      DEBUG  [webhook-srv]           Creating DB connection with sqlite3
2021-04-26 13:40:40.99.000       DEBUG  [webhook-srv]           There are no pending migrations
2021-04-26 13:40:40.116.000      INFO   [webhook-srv]           Matrix bridge running on 127.0.0.1:8023
2021-04-26 13:40:40.145.000      WARN   [bridge]                [-] POST http://127.0.0.1:8008/_matrix/client/r0/register (AS) HTTP 400 Error: "{\"errcode\":\"M_UNKNOWN\",\"error\":\"An access token should not be provided on requests to /register (except if type is m.login.application_service)\"}"

 M_UNKNOWN      An access token should not be provided on requests to /register (except if type is m.login.application_service)

systemd

[Unit]
Description=Matrix-Webhook daemon
After=matrix-synapse.service
BindsTo=matrix-synapse.service

[Service]
Type=simple
WorkingDirectory=/opt/matrix-webhook-gateway
ExecStart=npm run start
Restart=always

[Install]
WantedBy=matrix.target
Dual-0 commented 3 years ago

After git pull and npm ci I've got this error

> webhook-gateway@0.0.0 start /opt/matrix-webhook-gateway
> ts-node --compiler ttypescript entry.ts -v

/opt/matrix-webhook-gateway/node_modules/ts-node/src/index.ts:513
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
src/bridge/events/MessageHandler.ts:6:12 - error TS1243: 'async' modifier cannot be used with 'abstract' modifier.

6   abstract async handleMessage(context: MessageContext): Promise<boolean>;
             ~~~~~

    at createTSError (/opt/matrix-webhook-gateway/node_modules/ts-node/src/index.ts:513:12)
    at reportTSError (/opt/matrix-webhook-gateway/node_modules/ts-node/src/index.ts:517:19)
    at getOutput (/opt/matrix-webhook-gateway/node_modules/ts-node/src/index.ts:752:36)
    at Object.compile (/opt/matrix-webhook-gateway/node_modules/ts-node/src/index.ts:968:32)
    at Module.m._compile (/opt/matrix-webhook-gateway/node_modules/ts-node/src/index.ts:1056:42)
    at Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Object.require.extensions.<computed> [as .ts] (/opt/matrix-webhook-gateway/node_modules/ts-node/src/index.ts:1059:12)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webhook-gateway@0.0.0 start: `ts-node --compiler ttypescript entry.ts -v`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webhook-gateway@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-04-26T21_23_14_658Z-debug.log
geluk commented 3 years ago

I fixed this issue a while ago, but forgot to let you know. If you update to the latest version, it will work again.