Closed Neoderek closed 5 years ago
Hi! i was configuring other modules and mm telegrambot start to let me an error. Before works fine. I dont touch mmm-tools.
0|mmserver | { Error: ETELEGRAM: 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running 0|mmserver | at request.then.resp (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/node-telegram-bot-api/src/telegram.js:213:15) 0|mmserver | at tryCatcher (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/bluebird/js/release/util.js:16:23) 0|mmserver | at Promise._settlePromiseFromHandler (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/bluebird/js/release/promise.js:512:31) 0|mmserver | at Promise._settlePromise (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/bluebird/js/release/promise.js:569:18) 0|mmserver | at Promise._settlePromise0 (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/bluebird/js/release/promise.js:614:10) 0|mmserver | at Promise._settlePromises (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/bluebird/js/release/promise.js:693:18) 0|mmserver | at Async._drainQueue (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/bluebird/js/release/async.js:133:16) 0|mmserver | at Async._drainQueues (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/bluebird/js/release/async.js:143:10) 0|mmserver | at Immediate.Async.drainQueues [as _onImmediate] (/home/dietpi/MagicMirror/modules/MMM-TelegramBot/node_modules/bluebird/js/release/async.js:17:14) 0|mmserver | at runCallback (timers.js:696:18) 0|mmserver | at tryOnImmediate (timers.js:667:5) 0|mmserver | at processImmediate (timers.js:649:5) 0|mmserver | code: 'ETELEGRAM', 0|mmserver | response: 0|mmserver | IncomingMessage { 0|mmserver | _readableState: 0|mmserver | ReadableState { 0|mmserver | objectMode: false, 0|mmserver | highWaterMark: 16384, 0|mmserver | buffer: BufferList { length: 0 }, 0|mmserver | length: 0, 0|mmserver | pipes: null, 0|mmserver | pipesCount: 0, 0|mmserver | flowing: true, 0|mmserver | ended: true, 0|mmserver | endEmitted: true, 0|mmserver | reading: false, 0|mmserver | sync: true, 0|mmserver | needReadable: false, 0|mmserver | emittedReadable: false, 0|mmserver | readableListening: false, 0|mmserver | resumeScheduled: false, 0|mmserver | emitClose: true, 0|mmserver | destroyed: false, 0|mmserver | defaultEncoding: 'utf8', 0|mmserver | awaitDrain: 0, 0|mmserver | readingMore: true, 0|mmserver | decoder: null, 0|mmserver | encoding: null }, 0|mmserver | readable: false, 0|mmserver | _events: 0|mmserver | { end: [Array], 0|mmserver | close: [Array], 0|mmserver | data: [Function], 0|mmserver | error: [Function] }, 0|mmserver | _eventsCount: 4, 0|mmserver | _maxListeners: undefined, 0|mmserver | socket: 0|mmserver | TLSSocket { 0|mmserver | _tlsOptions: [Object], 0|mmserver | _secureEstablished: true, 0|mmserver | _securePending: false, 0|mmserver | _newSessionPending: false, 0|mmserver | _controlReleased: true, 0|mmserver | _SNICallback: null, 0|mmserver | servername: 'api.telegram.org', 0|mmserver | alpnProtocol: false, 0|mmserver | authorized: true, 0|mmserver | authorizationError: null, 0|mmserver | encrypted: true, 0|mmserver | _events: [Object], 0|mmserver | _eventsCount: 7, 0|mmserver | connecting: false, 0|mmserver | _hadError: false, 0|mmserver | _handle: [TLSWrap], 0|mmserver | _parent: null, 0|mmserver | _host: 'api.telegram.org', 0|mmserver | _readableState: [ReadableState], 0|mmserver | readable: true, 0|mmserver | _maxListeners: undefined, 0|mmserver | _writableState: [WritableState], 0|mmserver | writable: true, 0|mmserver | allowHalfOpen: false, 0|mmserver | _sockname: null, 0|mmserver | _pendingData: null, 0|mmserver | _pendingEncoding: '', 0|mmserver | server: undefined, 0|mmserver | _server: null, 0|mmserver | ssl: [TLSWrap], 0|mmserver | _requestCert: true, 0|mmserver | _rejectUnauthorized: true, 0|mmserver | parser: null, 0|mmserver | _httpMessage: null, 0|mmserver | [Symbol(res)]: [TLSWrap], 0|mmserver | [Symbol(asyncId)]: -1, 0|mmserver | [Symbol(lastWriteQueueSize)]: 0, 0|mmserver | [Symbol(timeout)]: null, 0|mmserver | [Symbol(kBytesRead)]: 0, 0|mmserver | [Symbol(kBytesWritten)]: 0, 0|mmserver | [Symbol(connect-options)]: [Object] }, 0|mmserver | connection: 0|mmserver | TLSSocket { 0|mmserver | _tlsOptions: [Object], 0|mmserver | _secureEstablished: true, 0|mmserver | _securePending: false, 0|mmserver | _newSessionPending: false, 0|mmserver | _controlReleased: true, 0|mmserver | _SNICallback: null, 0|mmserver | servername: 'api.telegram.org', 0|mmserver | alpnProtocol: false, 0|mmserver | authorized: true, 0|mmserver | authorizationError: null, 0|mmserver | encrypted: true, 0|mmserver | _events: [Object], 0|mmserver | _eventsCount: 7, 0|mmserver | connecting: false, 0|mmserver | _hadError: false, 0|mmserver | _handle: [TLSWrap], 0|mmserver | _parent: null, 0|mmserver | _host: 'api.telegram.org', 0|mmserver | _readableState: [ReadableState], 0|mmserver | readable: true, 0|mmserver | _maxListeners: undefined, 0|mmserver | _writableState: [WritableState], 0|mmserver | writable: true, 0|mmserver | allowHalfOpen: false, 0|mmserver | _sockname: null, 0|mmserver | _pendingData: null, 0|mmserver | _pendingEncoding: '', 0|mmserver | server: undefined, 0|mmserver | _server: null, 0|mmserver | ssl: [TLSWrap], 0|mmserver | _requestCert: true, 0|mmserver | _rejectUnauthorized: true, 0|mmserver | parser: null, 0|mmserver | _httpMessage: null, 0|mmserver | [Symbol(res)]: [TLSWrap], 0|mmserver | [Symbol(asyncId)]: -1, 0|mmserver | [Symbol(lastWriteQueueSize)]: 0, 0|mmserver | [Symbol(timeout)]: null, 0|mmserver | [Symbol(kBytesRead)]: 0, 0|mmserver | [Symbol(kBytesWritten)]: 0, 0|mmserver | [Symbol(connect-options)]: [Object] }, 0|mmserver | httpVersionMajor: 1, 0|mmserver | httpVersionMinor: 1, 0|mmserver | httpVersion: '1.1', 0|mmserver | complete: true, 0|mmserver | headers: 0|mmserver | { server: 'nginx/1.12.2', 0|mmserver | date: 'Mon, 18 Jun 2018 20:57:47 GMT', 0|mmserver | 'content-type': 'application/json', 0|mmserver | 'content-length': '143', 0|mmserver | connection: 'keep-alive', 0|mmserver | 'access-control-allow-origin': '', 0|mmserver | 'access-control-expose-headers': 'Content-Length,Content-Type,Date,Server,Connection' }, 0|mmserver | rawHeaders: 0|mmserver | [ 'Server', 0|mmserver | 'nginx/1.12.2', 0|mmserver | 'Date', 0|mmserver | 'Mon, 18 Jun 2018 20:57:47 GMT', 0|mmserver | 'Content-Type', 0|mmserver | 'application/json', 0|mmserver | 'Content-Length', 0|mmserver | '143', 0|mmserver | 'Connection', 0|mmserver | 'keep-alive', 0|mmserver | 'Access-Control-Allow-Origin', 0|mmserver | '', 0|mmserver | 'Access-Control-Expose-Headers', 0|mmserver | 'Content-Length,Content-Type,Date,Server,Connection' ], 0|mmserver | trailers: {}, 0|mmserver | rawTrailers: [], 0|mmserver | aborted: false, 0|mmserver | upgrade: false, 0|mmserver | url: '', 0|mmserver | method: null, 0|mmserver | statusCode: 409, 0|mmserver | statusMessage: 'Conflict', 0|mmserver | client: 0|mmserver | TLSSocket { 0|mmserver | _tlsOptions: [Object], 0|mmserver | _secureEstablished: true, 0|mmserver | _securePending: false, 0|mmserver | _newSessionPending: false, 0|mmserver | _controlReleased: true, 0|mmserver | _SNICallback: null, 0|mmserver | servername: 'api.telegram.org', 0|mmserver | alpnProtocol: false, 0|mmserver | authorized: true, 0|mmserver | authorizationError: null, 0|mmserver | encrypted: true, 0|mmserver | _events: [Object], 0|mmserver | _eventsCount: 7, 0|mmserver | connecting: false, 0|mmserver | _hadError: false, 0|mmserver | _handle: [TLSWrap], 0|mmserver | _parent: null, 0|mmserver | _host: 'api.telegram.org', 0|mmserver | _readableState: [ReadableState], 0|mmserver | readable: true, 0|mmserver | _maxListeners: undefined, 0|mmserver | _writableState: [WritableState], 0|mmserver | writable: true, 0|mmserver | allowHalfOpen: false, 0|mmserver | _sockname: null, 0|mmserver | _pendingData: null, 0|mmserver | _pendingEncoding: '', 0|mmserver | server: undefined, 0|mmserver | _server: null, 0|mmserver | ssl: [TLSWrap], 0|mmserver | _requestCert: true, 0|mmserver | _rejectUnauthorized: true, 0|mmserver | parser: null, 0|mmserver | _httpMessage: null, 0|mmserver | [Symbol(res)]: [TLSWrap], 0|mmserver | [Symbol(asyncId)]: -1, 0|mmserver | [Symbol(lastWriteQueueSize)]: 0, 0|mmserver | [Symbol(timeout)]: null, 0|mmserver | [Symbol(kBytesRead)]: 0, 0|mmserver | [Symbol(kBytesWritten)]: 0, 0|mmserver | [Symbol(connect-options)]: [Object] }, 0|mmserver | _consuming: false, 0|mmserver | _dumped: false, 0|mmserver | req: 0|mmserver | ClientRequest { 0|mmserver | _events: [Object], 0|mmserver | _eventsCount: 5, 0|mmserver | _maxListeners: undefined, 0|mmserver | output: [], 0|mmserver | outputEncodings: [], 0|mmserver | outputCallbacks: [], 0|mmserver | outputSize: 0, 0|mmserver | writable: true, 0|mmserver | _last: false, 0|mmserver | chunkedEncoding: false, 0|mmserver | shouldKeepAlive: true, 0|mmserver | useChunkedEncodingByDefault: true, 0|mmserver | sendDate: false, 0|mmserver | _removedConnection: false, 0|mmserver | _removedContLen: false, 0|mmserver | _removedTE: false, 0|mmserver | _contentLength: null, 0|mmserver | _hasBody: true, 0|mmserver | _trailer: '', 0|mmserver | finished: true, 0|mmserver | _headerSent: true, 0|mmserver | socket: [TLSSocket], 0|mmserver | connection: [TLSSocket], 0|mmserver | _header: 0|mmserver | 'POST /XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/getUpdates HTTP/1.1\r\nhost: api.telegram.org\r\ncontent-type: application/x-www-form-urlencoded\r\ncontent-length: 19\r\nConnection: keep-alive\r\n\r\n', 0|mmserver | _onPendingData: [Function: noopPendingOutput], 0|mmserver | agent: [Agent], 0|mmserver | socketPath: undefined, 0|mmserver | timeout: undefined, 0|mmserver | method: 'POST', 0|mmserver | path: 0|mmserver | '/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/getUpdates', 0|mmserver | _ended: true, 0|mmserver | res: [Circular], 0|mmserver | aborted: undefined, 0|mmserver | timeoutCb: null, 0|mmserver | upgradeOrConnect: false, 0|mmserver | parser: null, 0|mmserver | maxHeadersCount: null, 0|mmserver | [Symbol(isCorked)]: false, 0|mmserver | [Symbol(outHeadersKey)]: [Object] }, 0|mmserver | request: 0|mmserver | Request { 0|mmserver | _events: [Object], 0|mmserver | _eventsCount: 5, 0|mmserver | _maxListeners: undefined, 0|mmserver | method: 'POST', 0|mmserver | simple: false, 0|mmserver | resolveWithFullResponse: true, 0|mmserver | forever: true, 0|mmserver | readable: true, 0|mmserver | writable: true, 0|mmserver | explicitMethod: true, 0|mmserver | _qs: [Querystring], 0|mmserver | _auth: [Auth], 0|mmserver | _oauth: [OAuth], 0|mmserver | _multipart: [Multipart], 0|mmserver | _redirect: [Redirect], 0|mmserver | _tunnel: [Tunnel], 0|mmserver | _rp_resolve: [Function], 0|mmserver | _rp_reject: [Function], 0|mmserver | _rp_promise: [Promise], 0|mmserver | _rp_callbackOrig: undefined, 0|mmserver | callback: [Function], 0|mmserver | _rp_options: [Object], 0|mmserver | headers: [Object], 0|mmserver | setHeader: [Function], 0|mmserver | hasHeader: [Function], 0|mmserver | getHeader: [Function], 0|mmserver | removeHeader: [Function], 0|mmserver | localAddress: undefined, 0|mmserver | pool: [Object], 0|mmserver | dests: [], 0|mmserver | __isRequestRequest: true, 0|mmserver | _callback: [Function: RP$callback], 0|mmserver | uri: [Url], 0|mmserver | proxy: null, 0|mmserver | tunnel: true, 0|mmserver | setHost: true, 0|mmserver | originalCookieHeader: undefined, 0|mmserver | _disableCookies: true, 0|mmserver | _jar: undefined, 0|mmserver | port: 443, 0|mmserver | host: 'api.telegram.org', 0|mmserver | body: 'offset=0&timeout=10', 0|mmserver | path: 0|mmserver | '/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/getUpdates', 0|mmserver | httpModule: [Object], 0|mmserver | agentClass: [Function], 0|mmserver | agentOptions: [Object], 0|mmserver | agent: [Agent], 0|mmserver | _started: true, 0|mmserver | href: 0|mmserver | 'https://api.telegram.org/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/getUpdates', 0|mmserver | req: [ClientRequest], 0|mmserver | ntick: true, 0|mmserver | response: [Circular], 0|mmserver | originalHost: 'api.telegram.org', 0|mmserver | originalHostHeaderName: 'host', 0|mmserver | responseContent: [Circular], 0|mmserver | _destdata: true, 0|mmserver | _ended: true, 0|mmserver | _callbackCalled: true }, 0|mmserver | toJSON: [Function: responseToJSON], 0|mmserver | caseless: Caseless { dict: [Object] }, 0|mmserver | body: 0|mmserver | { ok: false, 0|mmserver | error_code: 409, 0|mmserver | description: 0|mmserver | 'Conflict: terminated by other getUpdates request; make sure that only one bot instance is running' } } }
And... i have only 1 bot configured on config.txt
{ module: 'MMM-TelegramBot', config: { telegramAPIKey : "55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", allowedUser : ["Neo"], // This is NOT the username of bot. adminChatId : xxxxxxx, } },
I dont sure whats happend, but bot works on Telegram ok.
I restart a chat whit the bot:
Image
When i use /commands on bot, log:
0|mmserver | [TELBOT][2018-06-18 22:06:14]Message is coming from CHAT:XXXXX <-- (mi tl id)
Hi! i was configuring other modules and mm telegrambot start to let me an error. Before works fine. I dont touch mmm-tools.
And... i have only 1 bot configured on config.txt
{ module: 'MMM-TelegramBot', config: { telegramAPIKey : "55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", allowedUser : ["Neo"], // This is NOT the username of bot. adminChatId : xxxxxxx, } },
I dont sure whats happend, but bot works on Telegram ok.
I restart a chat whit the bot:
Image
When i use /commands on bot, log: