edisonchee / slimbot

Telegram Bot API for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

this._timeout.refresh error on version 4.3.1

Jeffrey-Kimani opened this issue · comments

occurs a couple of seconds later after the bot is initialized

Unhandled rejection TypeError: this._timeout.refresh is not a function
    at getUpdates.then.catch.finally (notification-service\node_modules\slimbot\src\slimbot.js:66:23)
    at PassThroughHandlerContext.finallyHandler (notification-service\node_modules\bluebird\js\release\finally.js:56:23)
    at PassThroughHandlerContext.tryCatcher (notification-service\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (notification-service\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (notification-service\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (notification-service\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (notification-service\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (notification-service\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (notification-service\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (notification-service\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

Same problem here ! Using inside an Angular Service.

I'm using timeout.refresh to continue long polling. Can I check what Node versions you are running?

10.16.0 here.

I'm looking it into it, thanks for raising it

@Jeffrey-Kimani @fcsgehrke I've published 4.3.2 to NPM, please update and let me know if it works. The only change is to call this._timeout.refresh if it's a function.

Meanwhile, I couldn't reproduce this._timeout.refresh is not a function on my end. Do any of you mind showing your code or repo?