jfarmer08 / homebridge-wyze-smart-home

Wyze Smart Home plugin for Homebridge.
MIT License
93 stars 14 forks source link

ENOTFOUND Error/api.wyzecam.com #206

Closed m3rg3d0wn closed 4 months ago

m3rg3d0wn commented 5 months ago

Devices seem to be working, but I'm seeing this error.

[29/01/2024, 10:44:52] [Wyze] Request failed: Error: getaddrinfo ENOTFOUND api.wyzecam.com [29/01/2024, 10:44:52] [Wyze] AxiosError: getaddrinfo ENOTFOUND api.wyzecam.com at Function.AxiosError.from (/var/lib/homebridge/node_modules/homebridge-wyze-smart-home/node_modules/axios/lib/core/AxiosError.js:89:14) at RedirectableRequest.handleRequestError (/var/lib/homebridge/node_modules/homebridge-wyze-smart-home/node_modules/axios/lib/adapters/http.js:593:25) at RedirectableRequest.emit (node:events:514:28) at ClientRequest.eventHandlers. (/var/lib/homebridge/node_modules/homebridge-wyze-smart-home/node_modules/follow-redirects/index.js:14:24) at ClientRequest.emit (node:events:514:28) at TLSSocket.socketErrorListener (node:_http_client:495:9) at TLSSocket.emit (node:events:514:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at processTicksAndRejections (node:internal/process/task_queues:82:21) { hostname: 'api.wyzecam.com', syscall: 'getaddrinfo', code: 'ENOTFOUND', errno: -3008, config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, /', 'Content-Type': 'application/json', 'User-Agent': 'axios/1.5.1', 'Content-Length': '449', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'post', url: 'app/v2/home_page/get_object_list', data: '{"access_token":"lvtx.wk1/sOIEvmyJSCDGSC/8CxJPH/1/LzJtGXYUvGqWzTdxXPghidIJH4kG/4xTbpd8EGfaM+C4kK+WdIS/tXt8M5yMcOx2ZnPrz8C6+cLFwlOipVgg6y9NPBekUTqfj52Ob7QW2+4sQvET+terbxGBFXsAUp56PtfnChNN5ZPvBSO7D7j9eF5uqQ51QaW8ARwdqohtZw==","app_name":"com.hualai.WyzeCam","app_ver":"wyze_developer_api","app_version":"wyze_developer_api","phone_id":"wyze_developer_api","phone_system_type":"1","sc":"wyze_developer_api","sv":"wyze_developer_api","ts":1706546682544}', baseURL: 'https://api.wyzecam.com' }, request: <ref *1> Writable { _writableState: WritableState { highWaterMark: 16384, length: 0, corked: 0, onwrite: [Function: bound onwrite], writelen: 0, bufferedIndex: 0, pendingcb: 0,

  [Symbol(kBufferedValue)]: null
},
_events: [Object: null prototype] {
  response: [Function: handleResponse],
  error: [Function: handleRequestError],
  socket: [Function: handleRequestSocket]
},
_eventsCount: 3,
_maxListeners: undefined,
_options: {
  maxRedirects: 21,
  maxBodyLength: Infinity,
  protocol: 'https:',
  path: '/app/v2/home_page/get_object_list',
  method: 'POST',
  headers: [Object: null prototype],
  agents: [Object],
  auth: undefined,
  family: undefined,
  beforeRedirect: [Function: dispatchBeforeRedirect],
  beforeRedirects: [Object],
  hostname: 'api.wyzecam.com',
  port: '',
  agent: undefined,
  nativeProtocols: [Object],
  pathname: '/app/v2/home_page/get_object_list'
},
_ended: false,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 449,
_requestBodyBuffers: [ [Object] ],
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
  _events: [Object: null prototype],
  _eventsCount: 7,
  _maxListeners: undefined,
  outputData: [],
  outputSize: 0,
  writable: true,
  destroyed: false,
  _last: false,
  chunkedEncoding: false,
  shouldKeepAlive: true,
  maxRequestsOnConnectionReached: false,
  _defaultKeepAlive: true,
  useChunkedEncodingByDefault: true,
  sendDate: false,
  _removedConnection: false,
  _removedContLen: false,
  _removedTE: false,
  strictContentLength: false,
  _contentLength: '449',
  _hasBody: true,
  _trailer: '',
  finished: false,
  _headerSent: true,
  _closed: false,
  socket: [TLSSocket],
  _header: 'POST /app/v2/home_page/get_object_list HTTP/1.1\r\n' +
    'Accept: application/json, text/plain, */*\r\n' +
    'Content-Type: application/json\r\n' +
    'User-Agent: axios/1.5.1\r\n' +
    'Content-Length: 449\r\n' +
    'Accept-Encoding: gzip, compress, deflate, br\r\n' +
    'Host: api.wyzecam.com\r\n' +
    'Connection: keep-alive\r\n' +
    '\r\n',
  _keepAliveTimeout: 0,
  _onPendingData: [Function: nop],
  agent: [Agent],
  socketPath: undefined,
  method: 'POST',
  maxHeaderSize: undefined,
  insecureHTTPParser: undefined,
  joinDuplicateHeaders: undefined,
  path: '/app/v2/home_page/get_object_list',
  _ended: false,
  res: null,
  aborted: false,
  timeoutCb: [Function: emitRequestTimeout],
  upgradeOrConnect: false,
  parser: null,
  maxHeadersCount: null,
  reusedSocket: false,
  host: 'api.wyzecam.com',
  protocol: 'https:',
  _redirectable: [Circular *1],
  [Symbol(kCapture)]: false,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(kNeedDrain)]: false,
  [Symbol(corked)]: 0,
  [Symbol(kOutHeaders)]: [Object: null prototype],
  [Symbol(errored)]: null,
  [Symbol(kHighWaterMark)]: 16384,
  [Symbol(kRejectNonStandardBodyWrites)]: false,
  [Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'https://api.wyzecam.com/app/v2/home_page/get_object_list',
[Symbol(kCapture)]: false

}, cause: Error: getaddrinfo ENOTFOUND api.wyzecam.com at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'api.wyzecam.com' } } [29/01/2024, 10:44:52] [Wyze] Error, refreshing access token and trying again of what you expected to happen. -->

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

github-actions[bot] commented 5 months ago

Message that will be displayed on users' first issue

hgoscenski commented 4 months ago

A ENOTFOUND (indicating a DNS lookup failing) likely means your DNS resolution was temporarily broken, is this issue still occurring for you?

Below excerpt from your log shows that the lookup was for a normally formed hostname, which means the issue is most likely unrelated to this plugin.

cause: Error: getaddrinfo ENOTFOUND api.wyzecam.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'api.wyzecam.com'
}

I am able to resolve the hostname as expected, if you are experiencing issues, if you could post the output of the same command from the host running your homebridge, I can attempt to provide guidance for troubleshooting.

[21:10:20] λ nslookup api.wyzecam.com
Server:         10.50.100.3
Address:        10.50.100.3#53

Non-authoritative answer:
api.wyzecam.com canonical name = core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com.
Name:   core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com
Address: 54.203.23.136
Name:   core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com
Address: 54.218.212.76
Name:   core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com
Address: 54.149.231.228
Name:   core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com
Address: 52.34.65.30
Name:   core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com
Address: 54.68.225.159
Name:   core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com
Address: 35.167.154.75
Name:   core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com
Address: 52.33.23.198
Name:   core-cloud-gateway-lb-prod-1988651058.us-west-2.elb.amazonaws.com
Address: 54.212.235.138
carTloyal123 commented 4 months ago

@m3rg3d0wn is this resolved or are you still having this issue?

m3rg3d0wn commented 4 months ago

@m3rg3d0wn is this resolved or are you still having this issue?

I’ve since moved away from Homebridge and am 100% Home Assistant now, so I’m not sure.

carTloyal123 commented 4 months ago

@m3rg3d0wn awesome thank you for the update here, cheers!