matrix-hacks / matrix-puppet-facebook

a puppetted facebook bridge
98 stars 21 forks source link

Crash on receiving /me message on Matrix #20

Closed BrianMwit closed 7 years ago

BrianMwit commented 7 years ago

After user reply on Matrix with a message starting with a /me, the puppet crash.

Unhandled rejection Error: dont know how to handle this msgtype
    at App.handleMatrixMessageEvent (/home/brian/matrix-puppet-facebook/node_modules/matrix-puppet-bridge/src/base.js:753:34)
    at App.handleMatrixEvent (/home/brian/matrix-puppet-facebook/node_modules/matrix-puppet-bridge/src/base.js:702:19)
    at Bridge._onConsume (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/lib/bridge.js:669:30)
    at /home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/lib/bridge.js:843:14
    at tryCatcher (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromises (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/promise.js:700:14)
    at Async._drainQueue (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)

/home/username/matrix-puppet-facebook/node_modules/matrix-js-sdk/node_modules/olm/olm.js:19
"undefined"!==typeof module&&(module.exports=a);process.on("uncaughtException",function(a){if(!(a instanceof T))throw a;});a.inspect=function(){return"[Emscripten Module object]"}}else if(ma)a.print||(a.print=print),"undefined"!=typeof printErr&&(a.printErr=printErr),a.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)";},a.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");z("object"===typeof a);return a},"undefined"!=
                                                                                                                ^

TypeError: promise is not a function
    at App.handleMatrixMessageEvent (/home/brian/matrix-puppet-facebook/node_modules/matrix-puppet-bridge/src/base.js:757:12)
    at App.handleMatrixEvent (/home/brian/matrix-puppet-facebook/node_modules/matrix-puppet-bridge/src/base.js:702:19)
    at Bridge._onConsume (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/lib/bridge.js:669:30)
    at /home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/lib/bridge.js:843:14
    at tryCatcher (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromises (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/promise.js:700:14)
    at Async._drainQueue (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/home/brian/matrix-puppet-facebook/node_modules/matrix-appservice-bridge/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)
kfatehi commented 7 years ago

Thanks for the report! Please upgrade and it will no longer crash as a result of this (instead, the error is printed to the protocol room as originally intended)