},
cause: Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
at TLSSocket.emit (node:events:519:28)
at TLSSocket._finishInit (node:_tls_wrap:1085:8)
at ssl.onhandshakedone (node:_tls_wrap:871:12) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
}
问题描述: 首次使用awa做twitch任务时发生了这个错误,使用steamcommunity 302代理,网页观看twitch和完成任务都没问题,试着取消ssl验证npm config set strict-ssl false但没能解决问题。
问题报错: unable to verify the first certificate
相关 Logs: pv [Error]: unable to verify the first certificate at pv.from (output/main.js:1:632642) at Zg. (output/main.js:1:655007)
at Zg.emit (node:events:531:35)
at Gg.forEach.Wg. (output/main.js:1:618625)
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)
at By.request (output/main.js:1:663577)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async output/main.js:1:1346500
at async By.request (output/main.js:1:663484)
at async output/main.js:1:1346500
at async By.request (output/main.js:1:663484)
at async output/main.js:1:1346500
at async By.request (output/main.js:1:663484)
at async VG.TwitchTrack.init (output/main.js:1:1481636)
at async E.startHelper (output/main.js:1:2345294) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function (anonymous)] ],
transformResponse: [ [Function (anonymous)] ],
timeout: 300000,
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': undefined,
Host: 'www.twitch.tv',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36 Edg/103.0.1264.77',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
maxRedirects: 5,
url: 'https://www.twitch.tv/',
method: 'get',
Logger: e {
id: 1720315609410,
data: '\x1B[90m[2024-07-07 09:26:49] \x1B[39m\x1B[33m正在重试第 \x1B[34m3\x1B[39m\x1B[33m 次...\x1B[39m\x1B[31mError(0)\x1B[39m: \x1B[33m证书错误,请尝试更换代理或节点!\x1B[39m'
},
retryCount: 3,
data: undefined
},
request: <ref *1> Writable {
_events: {
close: undefined,
error: [Function (anonymous)],
prefinish: undefined,
finish: undefined,
drain: undefined,
response: [Function (anonymous)],
socket: [Array],
timeout: undefined,
abort: undefined
},
_writableState: WritableState {
highWaterMark: 16384,
length: 0,
corked: 0,
onwrite: [Function: bound onwrite],
writelen: 0,
bufferedIndex: 0,
pendingcb: 0,
}, cause: Error: unable to verify the first certificate at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34) at TLSSocket.emit (node:events:519:28) at TLSSocket._finishInit (node:_tls_wrap:1085:8) at ssl.onhandshakedone (node:_tls_wrap:871:12) { code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' }