bassrock / homebridge-flair

Homebridge Plugin for Flair Smart Vents
18 stars 6 forks source link

Error 500 after HB 1.1.1 upgrade #9

Closed SRamsdell1 closed 3 years ago

SRamsdell1 commented 4 years ago

I upgraded HB to v1.1.1 which appears to have upgraded the node version and potentially deprecated and API ...

Afterwards logs are filled with the following errors .... FYI, I replaced what appeared as keys with "[REDACTED]"

[7/27/2020, 20:57:31] [Flair] Error: Request failed with status code 500 at createError (/usr/lib/node_modules/homebridge-flair/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/lib/node_modules/homebridge-flair/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-flair/node_modules/axios/lib/adapters/http.js:236:11) at IncomingMessage.emit (events.js:228:7) at endReadableNT (_stream_readable.js:1185:12) at processTicksAndRejections (internal/process/task_queues.js:81:21) { config: { url: '/api/vents/[REDACTED]/current-reading', method: 'get', headers: { Accept: 'application/json, text/plain, /', Authorization: 'Bearer [REDACTED], 'User-Agent': 'axios/0.19.2' }, baseURL: 'https://api.flair.co', transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, validateStatus: [Function: validateStatus], data: undefined }, request: ClientRequest { _events: [Object: null prototype] { socket: [Function], abort: [Function], aborted: [Function], error: [Function], timeout: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 6, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: 'api.flair.co', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 9, connecting: false, _hadError: false, _parent: null, _host: 'api.flair.co', _readableState: [ReadableState], readable: true, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular],

  [Symbol(asyncId)]: 8294,
  [Symbol(kHandle)]: [TLSWrap],
  [Symbol(lastWriteQueueSize)]: 0,
  [Symbol(timeout)]: null,
  [Symbol(kBuffer)]: null,
  [Symbol(kBufferCb)]: null,
  [Symbol(kBufferGen)]: null,
  [Symbol(kBytesRead)]: 0,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
  _tlsOptions: [Object],
  _secureEstablished: true,
  _securePending: false,
  _newSessionPending: false,
  _controlReleased: true,
  _SNICallback: null,
  servername: 'api.flair.co',
  alpnProtocol: false,
  authorized: true,
  authorizationError: null,
  encrypted: true,
  _events: [Object: null prototype],
  _eventsCount: 9,
  connecting: false,
  _hadError: false,
  _parent: null,
  _host: 'api.flair.co',
  _readableState: [ReadableState],
  readable: true,
  _maxListeners: undefined,
  _writableState: [WritableState],
  writable: false,
  allowHalfOpen: false,
  _sockname: null,
  _pendingData: null,
  _pendingEncoding: '',
  server: undefined,
  _server: null,
  ssl: [TLSWrap],
  _requestCert: true,
  _rejectUnauthorized: true,
  parser: null,
  _httpMessage: [Circular],
  [Symbol(res)]: [TLSWrap],
  [Symbol(asyncId)]: 8294,
  [Symbol(kHandle)]: [TLSWrap],
  [Symbol(lastWriteQueueSize)]: 0,
  [Symbol(timeout)]: null,
  [Symbol(kBuffer)]: null,
  [Symbol(kBufferCb)]: null,
  [Symbol(kBufferGen)]: null,
  [Symbol(kBytesRead)]: 0,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(connect-options)]: [Object]
},
_header: 'GET /api/vents/[REDACTED]/current-reading HTTP/1.1\r\n' +
  'Accept: application/json, text/plain, */*\r\n' +
  'Authorization: Bearer [REDACTED] +
  'User-Agent: axios/0.19.2\r\n' +
  'Host: api.flair.co\r\n' +
  'Connection: close\r\n' +
  '\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: Agent {
  _events: [Object: null prototype],
  _eventsCount: 1,
  _maxListeners: undefined,
  defaultPort: 443,
  protocol: 'https:',
  options: [Object],
  requests: {},
  sockets: [Object],
  freeSockets: {},
  keepAliveMsecs: 1000,
  keepAlive: false,
  maxSockets: Infinity,
  maxFreeSockets: 256,
  maxCachedSessions: 100,
  _sessionCache: [Object]
},
socketPath: undefined,
method: 'GET',
path: '/api/vents/[REDACTED]/current-reading',
_ended: true,
res: IncomingMessage {
  _readableState: [ReadableState],
  readable: false,
  _events: [Object: null prototype],
  _eventsCount: 3,
  _maxListeners: undefined,
  socket: [TLSSocket],
  connection: [TLSSocket],
  httpVersionMajor: 1,
  httpVersionMinor: 1,
  httpVersion: '1.1',
  complete: true,
  headers: [Object],
  rawHeaders: [Array],
  trailers: {},
  rawTrailers: [],
  aborted: false,
  upgrade: false,
  url: '',
  method: null,
  statusCode: 500,
  statusMessage: 'Internal Server Error',
  client: [TLSSocket],
  _consuming: false,
  _dumped: false,
  req: [Circular],
  responseUrl: 'https://api.flair.co/api/vents/[REDACTED]/current-reading',
  redirects: []
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: Writable {
  _writableState: [WritableState],
  writable: true,
  _events: [Object: null prototype],
  _eventsCount: 2,
  _maxListeners: undefined,
  _options: [Object],
  _redirectCount: 0,
  _redirects: [],
  _requestBodyLength: 0,
  _requestBodyBuffers: [],
  _onNativeResponse: [Function],
  _currentRequest: [Circular],
  _currentUrl: 'https://api.flair.co/api/vents/[REDACTED]/current-reading'
},
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype] {
  accept: [Array],
  authorization: [Array],
  'user-agent': [Array],
  host: [Array]
}

}, response: { status: 500, statusText: 'Internal Server Error', headers: { date: 'Mon, 27 Jul 2020 19:57:31 GMT', 'content-type': 'text/html', 'content-length': '141', connection: 'close' }, config: { url: '/api/vents/[REDACTED]/current-reading', method: 'get', headers: [Object], baseURL: 'https://api.flair.co', transformRequest: [Array], transformResponse: [Array], timeout: 0, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, validateStatus: [Function: validateStatus], data: undefined }, request: ClientRequest { _events: [Object: null prototype], _eventsCount: 6, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [TLSSocket], connection: [TLSSocket], _header: 'GET /api/vents/[REDACTED]/current-reading HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Authorization: Bearer [REDACTED] + 'User-Agent: axios/0.19.2\r\n' + 'Host: api.flair.co\r\n' + 'Connection: close\r\n' + '\r\n', _onPendingData: [Function: noopPendingOutput], agent: [Agent], socketPath: undefined, method: 'GET', path: '/api/vents/[REDACTED]/current-reading', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, _redirectable: [Writable],

  [Symbol(isCorked)]: false,
  [Symbol(kOutHeaders)]: [Object: null prototype]
},
data: '<html>\n' +
  '  <head>\n' +
  '    <title>Internal Server Error</title>\n' +
  '  </head>\n' +
  '  <body>\n' +
  '    <h1><p>Internal Server Error</p></h1>\n' +
  '    \n' +
  '  </body>\n' +
  '</html>\n'

}, isAxiosError: true, toJSON: [Function] } [7/27/2020, 20:57:32] [Flair] Pushed updated current temperature state for Master-18ad to HomeKit: 23.53

bassrock commented 3 years ago

@SRamsdell1 is this still occurring with the latest version of homebridge and the plugin?

SRamsdell1 commented 3 years ago

Sorry I had not noticed your question ...I had rolled back to a prior working release after moving forward again recently this did not occur.