mrjackyliang / homebridge-adt-pulse

Homebridge security system platform for ADT Pulse
Apache License 2.0
35 stars 7 forks source link

[Bug]: Suddenly stopped working. #143

Closed sptv1 closed 3 months ago

sptv1 commented 3 months ago

Pre-check confirmation

Your email address

sptv1@me.com

Tell me exactly what happened

I noticed NO RESPONSE in Homkit when my alarm did not automatically set tonight. checked Homebridge logs and see lots of error messages. Nothing in my Homebridge changed today and everything was working fine up til now. ADT Pulse app on my phone still works.

Plugin version

3.3.1

Homebridge version

1.7.0

Node.js® version

20.10.0

Output of the "test-api" command

I don't know how to do this.

Captured logs relevant to this report

[10/04/2024, 23:21:40] [ADT Pulse] Login attempt has failed for 3 times. Sleeping for 30 minutes before resuming ...
{
  action: 'LOGIN',
  success: false,
  info: {
    error: {
      message: 'read ECONNRESET',
      name: 'Error',
      description: undefined,
      number: undefined,
      fileName: undefined,
      lineNumber: undefined,
      columnNumber: undefined,
      stack: 'Error: read ECONNRESET\n' +
        '    at Function.AxiosError.from (file:///var/lib/homebridge/node_modules/homebridge-adt-pulse/node_modules/axios/lib/core/AxiosError.js:89:14)\n' +
        '    at RedirectableRequest.handleRequestError (file:///var/lib/homebridge/node_modules/homebridge-adt-pulse/node_modules/axios/lib/adapters/http.js:606:25)\n' +
        '    at RedirectableRequest.emit (node:events:526:35)\n' +
        '    at ClientRequest.eventHandlers.<computed> (/var/lib/homebridge/node_modules/homebridge-adt-pulse/node_modules/follow-redirects/index.js:38:24)\n' +
        '    at ClientRequest.emit (node:events:514:28)\n' +
        '    at ClientRequest.req.emit (/var/lib/homebridge/node_modules/homebridge-adt-pulse/node_modules/http-cookie-agent/dist/http/create_cookie_agent.js:86:16)\n' +
        '    at TLSSocket.socketErrorListener (node:_http_client:495:9)\n' +
        '    at TLSSocket.emit (node:events:514:28)\n' +
        '    at emitErrorNT (node:internal/streams/destroy:151:8)\n' +
        '    at emitErrorCloseNT (node:internal/streams/destroy:116:3)',
      config: {
        transitional: {
          silentJSONParsing: true,
          forcedJSONParsing: true,
          clarifyTimeoutError: false
        },
        adapter: [ 'xhr', 'http' ],
        transformRequest: [ [Function: transformRequest] ],
        transformResponse: [ [Function: transformResponse] ],
        timeout: 15000,
        xsrfCookieName: 'XSRF-TOKEN',
        xsrfHeaderName: 'X-XSRF-TOKEN',
        maxContentLength: -1,
        maxBodyLength: -1,
        env: {
          FormData: [Function: FormData] {
            LINE_BREAK: '\r\n',
            DEFAULT_CONTENT_TYPE: 'application/octet-stream'
          },
          Blob: [class Blob]
        },
        validateStatus: [Function: validateStatus],
        headers: Object [AxiosHeaders] {
          Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
          'Content-Type': undefined,
          'Accept-Encoding': 'gzip, deflate, br',
          'Accept-Language': 'en-US,en;q=0.9',
          'Cache-Control': 'no-cache',
          Connection: 'keep-alive',
          Host: 'portal.adtpulse.com',
          Pragma: 'no-cache',
          'Sec-Fetch-Dest': 'document',
          'Sec-Fetch-Mode': 'navigate',
          'Sec-Fetch-Site': 'none',
          'Sec-Fetch-User': '?1',
          'Upgrade-Insecure-Requests': '1',
          'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
          'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
          'sec-ch-ua-mobile': '?0',
          'sec-ch-ua-platform': '"macOS"'
        },
        jar: CookieJar {
          rejectPublicSuffixes: true,
          enableLooseMode: false,
          allowSpecialUseDomain: true,
          store: { idx: [Object: null prototype] {} },
          prefixSecurity: 'silent',
          _cloneSync: [Function (anonymous)],
          _importCookiesSync: [Function (anonymous)],
          getCookiesSync: [Function (anonymous)],
          getCookieStringSync: [Function (anonymous)],
          getSetCookieStringsSync: [Function (anonymous)],
          removeAllCookiesSync: [Function (anonymous)],
          setCookieSync: [Function (anonymous)],
          serializeSync: [Function (anonymous)]
        },
        family: 4,
        method: 'get',
        url: 'https://portal.adtpulse.com/',
        httpAgent: {
          _events: {
            free: [Function (anonymous)],
            newListener: [Function: maybeEnableKeylog]
          },
          _eventsCount: 2,
          defaultPort: 80,
          protocol: 'http:',
          options: {
            cookies: {
              jar: CookieJar {
                rejectPublicSuffixes: true,
                enableLooseMode: false,
                allowSpecialUseDomain: true,
                store: { idx: [Object: null prototype] {} },
                prefixSecurity: 'silent',
                _cloneSync: [Function (anonymous)],
                _importCookiesSync: [Function (anonymous)],
                getCookiesSync: [Function (anonymous)],
                getCookieStringSync: [Function (anonymous)],
                getSetCookieStringsSync: [Function (anonymous)],
                removeAllCookiesSync: [Function (anonymous)],
                setCookieSync: [Function (anonymous)],
                serializeSync: [Function (anonymous)]
              }
            },
            noDelay: true,
            path: null
          },
          requests: {},
          sockets: {},
          freeSockets: {},
          keepAliveMsecs: 1000,
          keepAlive: false,
          maxSockets: Infinity,
          maxFreeSockets: 256,
          scheduling: 'lifo',
          maxTotalSockets: Infinity,
          totalSocketCount: 0
        },
        httpsAgent: {
          _events: {
            free: [Function (anonymous)],
            newListener: [Function: maybeEnableKeylog]
          },
          _eventsCount: 2,
          defaultPort: 443,
          protocol: 'https:',
          options: {
            cookies: {
              jar: CookieJar {
                rejectPublicSuffixes: true,
                enableLooseMode: false,
                allowSpecialUseDomain: true,
                store: { idx: [Object: null prototype] {} },
                prefixSecurity: 'silent',
                _cloneSync: [Function (anonymous)],
                _importCookiesSync: [Function (anonymous)],
                getCookiesSync: [Function (anonymous)],
                getCookieStringSync: [Function (anonymous)],
                getSetCookieStringsSync: [Function (anonymous)],
                removeAllCookiesSync: [Function (anonymous)],
                setCookieSync: [Function (anonymous)],
                serializeSync: [Function (anonymous)]
              }
            },
            noDelay: true,
            path: null
          },
          requests: {},
          sockets: {
            'portal.adtpulse.com:443::4::::::::::::::::::::': [
              {
                _tlsOptions: {
                  pipe: false,
                  secureContext: { context: {} },
                  isServer: false,
                  requestCert: true,
                  rejectUnauthorized: true
                },
                _secureEstablished: true,
                _securePending: false,
                _newSessionPending: false,
                _controlReleased: true,
                secureConnecting: false,
                _SNICallback: null,
                servername: 'portal.adtpulse.com',
                alpnProtocol: false,
                authorized: true,
                authorizationError: null,
                encrypted: true,
                _events: {
                  close: [
                    [Function: onSocketCloseDestroySSL],
                    [Function: bound onceWrapper] {
                      listener: [Function (anonymous)]
                    },
                    [Function: onClose],
                    [Function: socketCloseListener]
                  ],
                  end: [Function: onReadableStreamEnd],
                  newListener: [Function: keylogNewListener],
                  secure: [Function: onConnectSecure],
                  session: [Function (anonymous)],
                  free: [Function: onFree],
                  timeout: [ [Function: onTimeout], [Function: destroy] ],
                  agentRemove: [Function: onRemove],
                  error: [Function: socketErrorListener],
                  drain: [Function: ondrain]
                },
                _eventsCount: 10,
                connecting: false,
                _hadError: true,
                _parent: null,
                _host: 'portal.adtpulse.com',
                _closeAfterHandlingError: false,
                _readableState: {
                  highWaterMark: 16384,
                  buffer: { head: null, tail: null, length: 0 },
                  length: 0,
                  pipes: [],
                  awaitDrainWriters: null
                },
                _writableState: {
                  highWaterMark: 16384,
                  length: 0,
                  corked: 0,
                  onwrite: [Function: bound onwrite],
                  writelen: 0,
                  bufferedIndex: 0,
                  pendingcb: 0
                },
                allowHalfOpen: false,
                _sockname: null,
                _pendingData: null,
                _pendingEncoding: '',
                _server: null,
                ssl: null,
                _requestCert: true,
                _rejectUnauthorized: true,
                parser: null,
                _httpMessage: {
                  _events: {
                    response: [Function: bound onceWrapper] {
                      listener: [Function (anonymous)]
                    },
                    abort: [Function (anonymous)],
                    aborted: [Function (anonymous)],
                    connect: [Function (anonymous)],
                    error: [Function (anonymous)],
                    socket: [Function (anonymous)],
                    timeout: [Function (anonymous)]
                  },
                  _eventsCount: 7,
                  outputData: [],
                  outputSize: 0,
                  writable: true,
                  destroyed: false,
                  _last: true,
                  chunkedEncoding: false,
                  shouldKeepAlive: true,
                  maxRequestsOnConnectionReached: false,
                  _defaultKeepAlive: true,
                  useChunkedEncodingByDefault: false,
                  sendDate: false,
                  _removedConnection: false,
                  _removedContLen: false,
                  _removedTE: false,
                  strictContentLength: false,
                  _contentLength: 0,
                  _hasBody: true,
                  _trailer: '',
                  finished: true,
                  _headerSent: true,
                  _closed: false,
                  _header: 'GET / HTTP/1.1\r\n' +
                    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\r\n' +
                    'Accept-Encoding: gzip, deflate, br\r\n' +
                    'Accept-Language: en-US,en;q=0.9\r\n' +
                    'Cache-Control: no-cache\r\n' +
                    'Connection: keep-alive\r\n' +
                    'Host: portal.adtpulse.com\r\n' +
                    'Pragma: no-cache\r\n' +
                    'Sec-Fetch-Dest: document\r\n' +
                    'Sec-Fetch-Mode: navigate\r\n' +
                    'Sec-Fetch-Site: none\r\n' +
                    'Sec-Fetch-User: ?1\r\n' +
                    'Upgrade-Insecure-Requests: 1\r\n' +
                    'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36\r\n' +
                    'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"\r\n' +
                    'sec-ch-ua-mobile: ?0\r\n' +
                    'sec-ch-ua-platform: "macOS"\r\n' +
                    '\r\n',
                  _keepAliveTimeout: 0,
                  _onPendingData: [Function: nop],
                  method: 'GET',
                  path: '/',
                  _ended: false,
                  res: null,
                  aborted: false,
                  timeoutCb: null,
                  upgradeOrConnect: false,
                  parser: null,
                  maxHeadersCount: null,
                  reusedSocket: false,
                  host: 'portal.adtpulse.com',
                  protocol: 'https:',
                  _implicitHeader: [Function (anonymous)],
                  emit: [Function (anonymous)],
                  _redirectable: {
                    _writableState: {
                      highWaterMark: 16384,
                      length: 0,
                      corked: 0,
                      onwrite: [Function: bound onwrite],
                      writelen: 0,
                      bufferedIndex: 0,
                      pendingcb: 0
                    },
                    _events: {
                      response: [Function: handleResponse],
                      error: [Function: handleRequestError],
                      socket: [
                        [Function: handleRequestSocket],
                        [Function: destroyOnTimeout]
                      ]
                    },
                    _eventsCount: 3,
                    _options: {
                      maxRedirects: 21,
                      maxBodyLength: Infinity,
                      protocol: 'https:',
                      path: '/',
                      method: 'GET',
                      headers: {
                        Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
                        'Accept-Encoding': 'gzip, deflate, br',
                        'Accept-Language': 'en-US,en;q=0.9',
                        'Cache-Control': 'no-cache',
                        Connection: 'keep-alive',
                        Host: 'portal.adtpulse.com',
                        Pragma: 'no-cache',
                        'Sec-Fetch-Dest': 'document',
                        'Sec-Fetch-Mode': 'navigate',
                        'Sec-Fetch-Site': 'none',
                        'Sec-Fetch-User': '?1',
                        'Upgrade-Insecure-Requests': '1',
                        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
                        'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
                        'sec-ch-ua-mobile': '?0',
                        'sec-ch-ua-platform': '"macOS"'
                      },
                      agents: {
                        http: {
                          _events: {
                            free: [Function (anonymous)],
                            newListener: [Function: maybeEnableKeylog]
                          },
                          _eventsCount: 2,
                          defaultPort: 80,
                          protocol: 'http:',
                          options: {
                            cookies: {
                              jar: CookieJar {
                                rejectPublicSuffixes: true,
                                enableLooseMode: false,
                                allowSpecialUseDomain: true,
                                store: { idx: [Object: null prototype] {} },
                                prefixSecurity: 'silent',
                                _cloneSync: [Function (anonymous)],
                                _importCookiesSync: [Function (anonymous)],
                                getCookiesSync: [Function (anonymous)],
                                getCookieStringSync: [Function (anonymous)],
                                getSetCookieStringsSync: [Function (anonymous)],
                                removeAllCookiesSync: [Function (anonymous)],
                                setCookieSync: [Function (anonymous)],
                                serializeSync: [Function (anonymous)]
                              }
                            },
                            noDelay: true,
                            path: null
                          },
                          requests: {},
                          sockets: {},
                          freeSockets: {},
                          keepAliveMsecs: 1000,
                          keepAlive: false,
                          maxSockets: Infinity,
                          maxFreeSockets: 256,
                          scheduling: 'lifo',
                          maxTotalSockets: Infinity,
                          totalSocketCount: 0
                        }
                      },
                      family: 4,
                      beforeRedirect: [Function: dispatchBeforeRedirect],
                      beforeRedirects: { proxy: [Function: beforeRedirect] },
                      hostname: 'portal.adtpulse.com',
                      port: '',
                      nativeProtocols: {
                        'http:': {
                          _connectionListener: [Function: connectionListener],
                          METHODS: [
                            'ACL',         'BIND',       'CHECKOUT',
                            'CONNECT',     'COPY',       'DELETE',
                            'GET',         'HEAD',       'LINK',
                            'LOCK',        'M-SEARCH',   'MERGE',
                            'MKACTIVITY',  'MKCALENDAR', 'MKCOL',
                            'MOVE',        'NOTIFY',     'OPTIONS',
                            'PATCH',       'POST',       'PROPFIND',
                            'PROPPATCH',   'PURGE',      'PUT',
                            'REBIND',      'REPORT',     'SEARCH',
                            'SOURCE',      'SUBSCRIBE',  'TRACE',
                            'UNBIND',      'UNLINK',     'UNLOCK',
                            'UNSUBSCRIBE'
                          ],
                          STATUS_CODES: {
                            '100': 'Continue',
                            '101': 'Switching Protocols',
                            '102': 'Processing',
                            '103': 'Early Hints',
                            '200': 'OK',
                            '201': 'Created',
                            '202': 'Accepted',
                            '203': 'Non-Authoritative Information',
                            '204': 'No Content',
                            '205': 'Reset Content',
                            '206': 'Partial Content',
                            '207': 'Multi-Status',
                            '208': 'Already Reported',
                            '226': 'IM Used',
                            '300': 'Multiple Choices',
                            '301': 'Moved Permanently',
                            '302': 'Found',
                            '303': 'See Other',
                            '304': 'Not Modified',
                            '305': 'Use Proxy',
                            '307': 'Temporary Redirect',
                            '308': 'Permanent Redirect',
                            '400': 'Bad Request',
                            '401': 'Unauthorized',
                            '402': 'Payment Required',
                            '403': 'Forbidden',
                            '404': 'Not Found',
                            '405': 'Method Not Allowed',
                            '406': 'Not Acceptable',
                            '407': 'Proxy Authentication Required',
                            '408': 'Request Timeout',
                            '409': 'Conflict',
                            '410': 'Gone',
                            '411': 'Length Required',
                            '412': 'Precondition Failed',
                            '413': 'Payload Too Large',
                            '414': 'URI Too Long',
                            '415': 'Unsupported Media Type',
                            '416': 'Range Not Satisfiable',
                            '417': 'Expectation Failed',
                            '418': "I'm a Teapot",
                            '421': 'Misdirected Request',
                            '422': 'Unprocessable Entity',
                            '423': 'Locked',
                            '424': 'Failed Dependency',
                            '425': 'Too Early',
                            '426': 'Upgrade Required',
                            '428': 'Precondition Required',
                            '429': 'Too Many Requests',
                            '431': 'Request Header Fields Too Large',
                            '451': 'Unavailable For Legal Reasons',
                            '500': 'Internal Server Error',
                            '501': 'Not Implemented',
                            '502': 'Bad Gateway',
                            '503': 'Service Unavailable',
                            '504': 'Gateway Timeout',
                            '505': 'HTTP Version Not Supported',
                            '506': 'Variant Also Negotiates',
                            '507': 'Insufficient Storage',
                            '508': 'Loop Detected',
                            '509': 'Bandwidth Limit Exceeded',
                            '510': 'Not Extended',
                            '511': 'Network Authentication Required'
                          },
                          Agent: [Function: Agent] {
                            defaultMaxSockets: Infinity
                          },
                          ClientRequest: [Function: ClientRequest],
                          IncomingMessage: [Function: IncomingMessage],
                          OutgoingMessage: [Function: OutgoingMessage],
                          Server: [Function: Server],
                          ServerResponse: [Function: ServerResponse],
                          createServer: [Function: createServer],
                          validateHeaderName: [Function: __node_internal_],
                          validateHeaderValue: [Function: __node_internal_],
                          get: [Function: get],
                          request: [Function: request],
                          setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers],
                          maxHeaderSize: 16384,
                          globalAgent: {
                            _events: {
                              free: [Function (anonymous)],
                              newListener: [Function: maybeEnableKeylog]
                            },
                            _eventsCount: 2,
                            defaultPort: 80,
                            protocol: 'http:',
                            options: {
                              keepAlive: true,
                              scheduling: 'lifo',
                              timeout: 5000,
                              noDelay: true,
                              path: null
                            },
                            requests: {},
                            sockets: {},
                            freeSockets: {},
                            keepAliveMsecs: 1000,
                            keepAlive: true,
                            maxSockets: Infinity,
                            maxFreeSockets: 256,
                            scheduling: 'lifo',
                            maxTotalSockets: Infinity,
                            totalSocketCount: 0
                          }
                        },
                        'https:': {
                          Agent: [Function: Agent],
                          globalAgent: {
                            _events: {
                              free: [Function (anonymous)],
                              newListener: [Function: maybeEnableKeylog]
                            },
                            _eventsCount: 2,
                            defaultPort: 443,
                            protocol: 'https:',
                            options: {
                              keepAlive: true,
                              scheduling: 'lifo',
                              timeout: 5000,
                              noDelay: true,
                              path: null
                            },
                            requests: {},
                            sockets: {},
                            freeSockets: {},
                            keepAliveMsecs: 1000,
                            keepAlive: true,
                            maxSockets: Infinity,
                            maxFreeSockets: 256,
                            scheduling: 'lifo',
                            maxTotalSockets: Infinity,
                            totalSocketCount: 0,
                            maxCachedSessions: 100,
                            _sessionCache: { map: {}, list: [] }
                          },
                          Server: [Function: Server],
                          createServer: [Function: createServer],
                          get: [Function: get],
                          request: [Function: request]
                        }
                      },
                      pathname: '/'
                    },
                    _ended: true,
                    _ending: true,
                    _redirectCount: 0,
                    _redirects: [],
                    _requestBodyLength: 0,
                    _requestBodyBuffers: [],
                    _onNativeResponse: [Function (anonymous)],
                    _currentUrl: 'https://portal.adtpulse.com/',
                    _timeout: null
                  }
                },
                timeout: 15000
              }
            ]
          },
          freeSockets: {},
          keepAliveMsecs: 1000,
          keepAlive: false,
          maxSockets: Infinity,
          maxFreeSockets: 256,
          scheduling: 'lifo',
          maxTotalSockets: Infinity,
          totalSocketCount: 1,
          maxCachedSessions: 100,
          _sessionCache: {
            map: {
              'portal.adtpulse.com:443::4::::::::::::::::::::': <Buffer 30 82 07 13 02 01 01 02 02 03 03 04 02 c0 2f 04 20 58 d7 4b 20 0d fb 1e e5 01 5f 04 15 35 03 86 2e e9 3a 7c f9 41 84 51 37 d4 e0 15 1f 84 13 56 bd 04 ... 1765 more bytes>
            },
            list: [ 'portal.adtpulse.com:443::4::::::::::::::::::::' ]
          }
        }
      },
      code: 'ECONNRESET',
      status: null
    }
  }
}

Post-check confirmation

Legal Agreements

mrjackyliang commented 3 months ago

Try refreshing your login credentials, including the fingerprint.

sptv1 commented 3 months ago

After I posted on Github last night, I turned off the child bridge for a half hour then restarted it. That cleared the problem and it seems to be working ok. (This is a fix you had given to me a while back when I had a similar problem). Sorry I forgot to close the issue.

Appreciate your quick response!

Steve Pearlman @.***

On Apr 11, 2024, at 7:07 AM, Jacky Liang @.***> wrote:

Try refreshing your login credentials, including the fingerprint.

— Reply to this email directly, view it on GitHub https://github.com/mrjackyliang/homebridge-adt-pulse/issues/143#issuecomment-2049775936, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP2MNELLFN76IX3MG4QRKYLY42KIXAVCNFSM6AAAAABGBWYSO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZG43TKOJTGY. You are receiving this because you authored the thread.

mrjackyliang commented 3 months ago

Thanks for letting me know!

In the future, no need to manually shut off the plugin (unless it continuously fails) as it will track the amount of failed login attempts and force pause the plugin automatically for 30 minutes.

I remember the days when users IPs were blocked after having enormous attempts, so the pause should fix it.

github-actions[bot] commented 2 months ago

Due to inactivity, this issue will be locked and marked as resolved. If you have any further questions or inquiries, please feel free to open a new issue.