Network errors
Created by: hzzzzzz
Wechaty: 0.37.8 Puppet: wechaty-puppet-macpro 0.5.4 Node: 10.19.0 OS: macOs 10.15.3
ISSUE:
Not sure the reason and exact situation (maybe when getting room members infomation ?), but numerous network errors will be thrown by Wechaty occationaly:
(node:63640) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 180.163.25.31:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
(node:63640) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4318)
Thrown:
{ Error: connect ETIMEDOUT 180.163.25.31:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '180.163.25.31',
port: 80,
domainEmitter:
ClientRequest {
domain:
Domain {
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
members: [],
[Symbol(kWeak)]: WeakReference {} },
_events: [Object: null prototype] { response: [Function] },
_eventsCount: 1,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
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:
Socket {
connecting: false,
_hadError: true,
_handle: null,
_parent: null,
_host: 'wx.qlogo.cn',
_readableState: [ReadableState],
readable: false,
domain: [Domain],
_events: [Object],
_eventsCount: 8,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData:
'GET /mmhead/ver_1/MwBicAKy1RhIPx80FliaMHWe65mO74Y47ic3jE8T0O2YFMNZOsce8XT84HswO0c5ZibZc5e9UVVVBBCJPUXLpJup3Q/0 HTTP/1.1\r\nHost: wx.qlogo.cn\r\nConnection: close\r\n\r\n',
_pendingEncoding: 'latin1',
server: null,
_server: null,
parser: [HTTPParser],
_httpMessage: [Circular],
[Symbol(asyncId)]: 359855,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0 },
connection:
Socket {
connecting: false,
_hadError: true,
_handle: null,
_parent: null,
_host: 'wx.qlogo.cn',
_readableState: [ReadableState],
readable: false,
domain: [Domain],
_events: [Object],
_eventsCount: 8,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData:
'GET /mmhead/ver_1/MwBicAKy1RhIPx80FliaMHWe65mO74Y47ic3jE8T0O2YFMNZOsce8XT84HswO0c5ZibZc5e9UVVVBBCJPUXLpJup3Q/0 HTTP/1.1\r\nHost: wx.qlogo.cn\r\nConnection: close\r\n\r\n',
_pendingEncoding: 'latin1',
server: null,
_server: null,
parser: [HTTPParser],
_httpMessage: [Circular],
[Symbol(asyncId)]: 359855,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0 },
_header:
'GET /mmhead/ver_1/MwBicAKy1RhIPx80FliaMHWe65mO74Y47ic3jE8T0O2YFMNZOsce8XT84HswO0c5ZibZc5e9UVVVBBCJPUXLpJup3Q/0 HTTP/1.1\r\nHost: wx.qlogo.cn\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent:
Agent {
domain: [Domain],
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256 },
socketPath: undefined,
timeout: undefined,
method: 'GET',
insecureHTTPParser: undefined,
path:
'/mmhead/ver_1/MwBicAKy1RhIPx80FliaMHWe65mO74Y47ic3jE8T0O2YFMNZOsce8XT84HswO0c5ZibZc5e9UVVVBBCJPUXLpJup3Q/0',
_ended: false,
res: null,
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser:
HTTPParser {
'0': [Function: parserOnHeaders],
'1': [Function: parserOnHeadersComplete],
'2': [Function: parserOnBody],
'3': [Function: parserOnMessageComplete],
'4': null,
domain: [Domain],
_headers: [],
_url: '',
socket: [Socket],
incoming: null,
outgoing: [Circular],
maxHeaderPairs: 2000,
_consumed: false,
onIncoming: [Function: parserOnIncomingClient],
[Symbol(isReused)]: true },
maxHeadersCount: null,
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object: null prototype] { host: [Array] } },
domain:
Domain {
domain: null,
_events:
[Object: null prototype] {
removeListener: [Function: updateExceptionCapture],
newListener: [Function: updateExceptionCapture],
error: [Function: debugDomainError] },
_eventsCount: 3,
_maxListeners: undefined,
members: [],
[Symbol(kWeak)]: WeakReference {} },
domainThrown: false }