idootop/mi-gpt

求助Network request failed: EAI_AGAIN getaddrinfo EAI_AGAIN account.xiaomi.com AxiosError: getaddrinfo EAI_AGAIN account.xiaomi.com

Closed this issue · 1 comments

[root@centos7 mi-gpt-main]# docker run --env-file $(pwd)/.env -v $(pwd)/.migpt.js:/app/.migpt.js idootop/mi-gpt:latest

mi-gpt@3.1.0 start
node ./app.js

     MiGPT v3.1.0  by: del.wang

❌ Network request failed: EAI_AGAIN getaddrinfo EAI_AGAIN account.xiaomi.com AxiosError: getaddrinfo EAI_AGAIN account.xiaomi.com
at AxiosError.from (/app/node_modules/.pnpm/axios@1.6.8/node_modules/axios/dist/node/axios.cjs:836:14)
at RedirectableRequest.handleRequestError (/app/node_modules/.pnpm/axios@1.6.8/node_modules/axios/dist/node/axios.cjs:3086:25)
at RedirectableRequest.emit (node:events:531:35)
at eventHandlers. (/app/node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/index.js:38:24)
at ClientRequest.emit (node:events:519:28)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
hostname: 'account.xiaomi.com',
syscall: 'getaddrinfo',
code: 'EAI_AGAIN',
errno: -3001,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 10000,
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/x-www-form-urlencoded',
'Accept-Encoding': 'gzip, deflate',
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 10; RMX2111 Build/QP1A.190711.020) APP/xiaomi.mico APPV/2004040 MK/Uk1YMjExMQ== PassportSDK/3.8.3 passport-ui/3.8.3',
Cookie: 'userId=924106552; deviceId=android_21e5815f-6115-4351-b010-306ded9f68e5; passToken=;'
},
proxy: false,
decompress: true,
cookies: {
userId: '924106552',
deviceId: 'android_21e5815f-6115-4351-b010-306ded9f68e5',
passToken: undefined
},
method: 'get',
url: 'https://account.xiaomi.com/pass/serviceLogin?sid=micoapi&_json=true&_locale=zh_CN',
data: undefined
},
request: <ref *1> Writable {
_events: {
close: undefined,
error: [Function: handleRequestError],
prefinish: undefined,
finish: undefined,
drain: undefined,
response: [Function: handleResponse],
socket: [Array],
timeout: undefined,
abort: undefined
},
_writableState: WritableState {
highWaterMark: 16384,
length: 0,
corked: 0,
onwrite: [Function: bound onwrite],
writelen: 0,
bufferedIndex: 0,
pendingcb: 0,
[Symbol(kState)]: 17580812,
[Symbol(kBufferedValue)]: null
},
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'https:',
path: '/pass/serviceLogin?sid=micoapi&_json=true&_locale=zh_CN',
method: 'GET',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
family: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: 'account.xiaomi.com',
port: '',
agent: undefined,
nativeProtocols: [Object],
pathname: '/pass/serviceLogin',
search: '?sid=micoapi&_json=true&_locale=zh_CN'
},
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
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,
socket: [TLSSocket],
_header: 'GET /pass/serviceLogin?sid=micoapi&_json=true&_locale=zh_CN HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/x-www-form-urlencoded\r\n' +
'Accept-Encoding: gzip, deflate\r\n' +
'User-Agent: Dalvik/2.1.0 (Linux; U; Android 10; RMX2111 Build/QP1A.190711.020) APP/xiaomi.mico APPV/2004040 MK/Uk1YMjExMQ== PassportSDK/3.8.3 passport-ui/3.8.3\r\n' +
'Cookie: userId=924106552; deviceId=android_21e5815f-6115-4351-b010-306ded9f68e5; passToken=;\r\n' +
'Host: account.xiaomi.com\r\n' +
'Connection: keep-alive\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/pass/serviceLogin?sid=micoapi&_json=true&_locale=zh_CN',
_ended: false,
res: null,
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'account.xiaomi.com',
protocol: 'https:',
_redirectable: [Circular *1],
[Symbol(shapeMode)]: false,
[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://account.xiaomi.com/pass/serviceLogin?sid=micoapi&_json=true&_locale=zh_CN',
_timeout: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
cause: Error: getaddrinfo EAI_AGAIN account.xiaomi.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'account.xiaomi.com'
}
}
登录失败 {
error: AxiosError: getaddrinfo EAI_AGAIN account.xiaomi.com
at AxiosError.from (/app/node_modules/.pnpm/axios@1.6.8/node_modules/axios/dist/node/axios.cjs:836:14)
at RedirectableRequest.handleRequestError (/app/node_modules/.pnpm/axios@1.6.8/node_modules/axios/dist/node/axios.cjs:3086:25)
at RedirectableRequest.emit (node:events:531:35)
at eventHandlers. (/app/node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/index.js:38:24)
at ClientRequest.emit (node:events:519:28)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
hostname: 'account.xiaomi.com',
syscall: 'getaddrinfo',
code: 'EAI_AGAIN',
errno: -3001,
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 10000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [Object [AxiosHeaders]],
proxy: false,
decompress: true,
cookies: [Object],
method: 'get',
url: 'https://account.xiaomi.com/pass/serviceLogin?sid=micoapi&_json=true&_locale=zh_CN',
data: undefined
},
request: Writable {
_events: [Object],
_writableState: [WritableState],
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: [ClientRequest],
_currentUrl: 'https://account.xiaomi.com/pass/serviceLogin?sid=micoapi&_json=true&_locale=zh_CN',
_timeout: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
cause: Error: getaddrinfo EAI_AGAIN account.xiaomi.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'account.xiaomi.com'
}
},
isError: true,
code: 'EAI_AGAIN',
message: 'getaddrinfo EAI_AGAIN account.xiaomi.com'
}
❌ Network request failed: EAI_AGAIN getaddrinfo EAI_AGAIN account.xiaomi.com AxiosError: getaddrinfo EAI_AGAIN account.xiaomi.com
at AxiosError.from (/app/node_modules/.pnpm/axios@1.6.8/node_modules/axios/dist/node/axios.cjs:836:14)
at RedirectableRequest.handleRequestError (/app/node_modules/.pnpm/axios@1.6.8/node_modules/axios/dist/node/axios.cjs:3086:25)
at RedirectableRequest.emit (node:events:531:35)
at eventHandlers. (/app/node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/index.js:38:24)
at ClientRequest.emit (node:events:519:28)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
hostname: 'account.xiaomi.com',
syscall: 'getaddrinfo',
code: 'EAI_AGAIN',
errno: -3001,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 10000,
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/x-www-form-urlencoded',
'Accept-Encoding': 'gzip, deflate',
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 10; RMX2111 Build/QP1A.190711.020) APP/xiaomi.mico APPV/2004040 MK/Uk1YMjExMQ== PassportSDK/3.8.3 passport-ui/3.8.3',
Cookie: 'userId=924106552; deviceId=android_c751b652-c226-4114-a413-953b9452e962; passToken=;'
},
proxy: false,
decompress: true,
cookies: {
userId: '924106552',
deviceId: 'android_c751b652-c226-4114-a413-953b9452e962',
passToken: undefined
},
method: 'get',
url: 'https://account.xiaomi.com/pass/serviceLogin?sid=xiaomiio&_json=true&_locale=zh_CN',
data: undefined
},
request: <ref *1> Writable {
_events: {
close: undefined,
error: [Function: handleRequestError],
prefinish: undefined,
finish: undefined,
drain: undefined,
response: [Function: handleResponse],
socket: [Array],
timeout: undefined,
abort: undefined
},
_writableState: WritableState {
highWaterMark: 16384,
length: 0,
corked: 0,
onwrite: [Function: bound onwrite],
writelen: 0,
bufferedIndex: 0,
pendingcb: 0,
[Symbol(kState)]: 17580812,
[Symbol(kBufferedValue)]: null
},
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'https:',
path: '/pass/serviceLogin?sid=xiaomiio&_json=true&_locale=zh_CN',
method: 'GET',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
family: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: 'account.xiaomi.com',
port: '',
agent: undefined,
nativeProtocols: [Object],
pathname: '/pass/serviceLogin',
search: '?sid=xiaomiio&_json=true&_locale=zh_CN'
},
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
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,
socket: [TLSSocket],
_header: 'GET /pass/serviceLogin?sid=xiaomiio&_json=true&_locale=zh_CN HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/x-www-form-urlencoded\r\n' +
'Accept-Encoding: gzip, deflate\r\n' +
'User-Agent: Dalvik/2.1.0 (Linux; U; Android 10; RMX2111 Build/QP1A.190711.020) APP/xiaomi.mico APPV/2004040 MK/Uk1YMjExMQ== PassportSDK/3.8.3 passport-ui/3.8.3\r\n' +
'Cookie: userId=924106552; deviceId=android_c751b652-c226-4114-a413-953b9452e962; passToken=;\r\n' +
'Host: account.xiaomi.com\r\n' +
'Connection: keep-alive\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/pass/serviceLogin?sid=xiaomiio&_json=true&_locale=zh_CN',
_ended: false,
res: null,
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'account.xiaomi.com',
protocol: 'https:',
_redirectable: [Circular *1],
[Symbol(shapeMode)]: false,
[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://account.xiaomi.com/pass/serviceLogin?sid=xiaomiio&_json=true&_locale=zh_CN',
_timeout: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
cause: Error: getaddrinfo EAI_AGAIN account.xiaomi.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'account.xiaomi.com'
}
}
登录失败 {
error: AxiosError: getaddrinfo EAI_AGAIN account.xiaomi.com
at AxiosError.from (/app/node_modules/.pnpm/axios@1.6.8/node_modules/axios/dist/node/axios.cjs:836:14)
at RedirectableRequest.handleRequestError (/app/node_modules/.pnpm/axios@1.6.8/node_modules/axios/dist/node/axios.cjs:3086:25)
at RedirectableRequest.emit (node:events:531:35)
at eventHandlers. (/app/node_modules/.pnpm/follow-redirects@1.15.6/node_modules/follow-redirects/index.js:38:24)
at ClientRequest.emit (node:events:519:28)
at TLSSocket.socketErrorListener (node:_http_client:500:9)
at TLSSocket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
hostname: 'account.xiaomi.com',
syscall: 'getaddrinfo',
code: 'EAI_AGAIN',
errno: -3001,
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 10000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [Object [AxiosHeaders]],
proxy: false,
decompress: true,
cookies: [Object],
method: 'get',
url: 'https://account.xiaomi.com/pass/serviceLogin?sid=xiaomiio&_json=true&_locale=zh_CN',
data: undefined
},
request: Writable {
_events: [Object],
_writableState: [WritableState],
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: [ClientRequest],
_currentUrl: 'https://account.xiaomi.com/pass/serviceLogin?sid=xiaomiio&_json=true&_locale=zh_CN',
_timeout: null,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
cause: Error: getaddrinfo EAI_AGAIN account.xiaomi.com
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'account.xiaomi.com'
}
},
isError: true,
code: 'EAI_AGAIN',
message: 'getaddrinfo EAI_AGAIN account.xiaomi.com'
}
2024/06/14 11:36:21 Speaker ❌ 初始化 Mi Services 失败
2024/06/14 11:36:21 database ❌ Error: ❌ Assertion failed
at _LoggerManager.assert (/app/dist/index.cjs:239:13)
at __Logger.assert (/app/dist/index.cjs:276:19)
at AISpeaker.initMiServices (/app/dist/index.cjs:451:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async AISpeaker.run (/app/dist/index.cjs:727:5)
at async main (file:///app/app.js:6:3)
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice To update run: npm install -g npm@10.8.1
npm notice

网络请求失败了,检查一下你的代理配置的是否有问题,换个节点试试。