History
- 로컬 서버에서 LGFP로 api를 호출하여 토큰을 검증해야 한다.
Issue
AxiosError: unable to verify the first certificate
[0] at Function.AxiosError.from (/Users/user/Documents/workspace/lad-visual-builder-server-nodejs/node_modules/axios/lib/core/AxiosError.js:89:14)
[0] at RedirectableRequest.handleRequestError (/Users/user/Documents/workspace/lad-visual-builder-server-nodejs/node_modules/axios/lib/adapters/http.js:610:25)
[0] at RedirectableRequest.emit (node:events:519:28)
[0] at ClientRequest.eventHandlers.<computed> (/Users/user/Documents/workspace/lad-visual-builder-server-nodejs/node_modules/follow-redirects/index.js:38:24)
[0] at ClientRequest.emit (node:events:519:28)
[0] at TLSSocket.socketErrorListener (node:_http_client:500:9)
[0] at TLSSocket.emit (node:events:519:28)
[0] at emitErrorNT (node:internal/streams/destroy:169:8)
[0] at emitErrorCloseNT (node:internal/streams/destroy:128:3)
[0] at processTicksAndRejections (node:internal/process/task_queues:82:21)
[0] at Axios.request (/Users/user/Documents/workspace/lad-visual-builder-server-nodejs/node_modules/axios/lib/core/Axios.js:45:41)
[0] at processTicksAndRejections (node:internal/process/task_queues:95:5) {
[0] code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
[0] config: {
[0] transitional: {
[0] silentJSONParsing: true,
[0] forcedJSONParsing: true,
[0] clarifyTimeoutError: false
[0] },
[0] adapter: [ 'xhr', 'http' ],
[0] transformRequest: [ [Function: transformRequest] ],
[0] transformResponse: [ [Function: transformResponse] ],
[0] timeout: 0,
[0] xsrfCookieName: 'XSRF-TOKEN',
[0] xsrfHeaderName: 'X-XSRF-TOKEN',
[0] maxContentLength: -1,
[0] maxBodyLength: -1,
[0] env: { FormData: [Function], Blob: [class Blob] },
[0] validateStatus: [Function: validateStatus],
[0] headers: Object [AxiosHeaders] {
[0] Accept: 'application/json, text/plain, */*',
[0] 'Content-Type': undefined,
[0] 'User-Agent': 'axios/1.6.8',
[0] 'Accept-Encoding': 'gzip, compress, deflate, br'
[0] },
[0] method: 'get',
[0] url: 'https://lsmapi.line-apps-alpha.com/token/verify/d812ef4ad4a97a0ec30dc06b:dcfef0d370da45145a0a3bd791864daf25f49b6e1b554beda3a06f6af03a28505927a41f63801dcd315033c89f9f2e4fbfd83c2488763066668878ecfe8d3d4103c622d2252a31d9f105d50e20e6a8c9:f8d3984c59bb5eae997fea5fe8331a52',
[0] data: undefined
[0] },
[0] request: <ref *1> Writable {
[0] _events: {
[0] close: undefined,
[0] error: [Function: handleRequestError],
[0] prefinish: undefined,
[0] finish: undefined,
[0] drain: undefined,
[0] response: [Function: handleResponse],
[0] socket: [Function: handleRequestSocket]
[0] },
[0] _writableState: WritableState {
[0] highWaterMark: 16384,
[0] length: 0,
[0] corked: 0,
[0] onwrite: [Function: bound onwrite],
[0] writelen: 0,
[0] bufferedIndex: 0,
[0] pendingcb: 0,
[0] [Symbol(kState)]: 17580812,
[0] [Symbol(kBufferedValue)]: null
[0] },
[0] _maxListeners: undefined,
[0] _options: {
[0] maxRedirects: 21,
[0] maxBodyLength: Infinity,
[0] protocol: 'https:',
[0] path: '/token/verify/d812ef4ad4a97a0ec30dc06b:dcfef0d370da45145a0a3bd791864daf25f49b6e1b554beda3a06f6af03a28505927a41f63801dcd315033c89f9f2e4fbfd83c2488763066668878ecfe8d3d4103c622d2252a31d9f105d50e20e6a8c9:f8d3984c59bb5eae997fea5fe8331a52',
[0] method: 'GET',
[0] headers: [Object: null prototype],
[0] agents: [Object],
[0] auth: undefined,
[0] family: undefined,
[0] beforeRedirect: [Function: dispatchBeforeRedirect],
[0] beforeRedirects: [Object],
[0] hostname: 'lsmapi.line-apps-alpha.com',
[0] port: '',
[0] agent: undefined,
[0] nativeProtocols: [Object],
[0] pathname: '/token/verify/d812ef4ad4a97a0ec30dc06b:dcfef0d370da45145a0a3bd791864daf25f49b6e1b554beda3a06f6af03a28505927a41f63801dcd315033c89f9f2e4fbfd83c2488763066668878ecfe8d3d4103c622d2252a31d9f105d50e20e6a8c9:f8d3984c59bb5eae997fea5fe8331a52'
[0] },
[0] _ended: true,
[0] _ending: true,
[0] _redirectCount: 0,
[0] _redirects: [],
[0] _requestBodyLength: 0,
[0] _requestBodyBuffers: [],
[0] _eventsCount: 3,
[0] _onNativeResponse: [Function (anonymous)],
[0] _currentRequest: ClientRequest {
[0] _events: [Object: null prototype],
[0] _eventsCount: 7,
[0] _maxListeners: undefined,
[0] outputData: [],
[0] outputSize: 0,
[0] writable: true,
[0] destroyed: false,
[0] _last: true,
[0] chunkedEncoding: false,
[0] shouldKeepAlive: true,
[0] maxRequestsOnConnectionReached: false,
[0] _defaultKeepAlive: true,
[0] useChunkedEncodingByDefault: false,
[0] sendDate: false,
[0] _removedConnection: false,
[0] _removedContLen: false,
[0] _removedTE: false,
[0] strictContentLength: false,
[0] _contentLength: 0,
[0] _hasBody: true,
[0] _trailer: '',
[0] finished: true,
[0] _headerSent: true,
[0] _closed: false,
[0] socket: [TLSSocket],
[0] _header: 'GET /token/verify/d812ef4ad4a97a0ec30dc06b:dcfef0d370da45145a0a3bd791864daf25f49b6e1b554beda3a06f6af03a28505927a41f63801dcd315033c89f9f2e4fbfd83c2488763066668878ecfe8d3d4103c622d2252a31d9f105d50e20e6a8c9:f8d3984c59bb5eae997fea5fe8331a52 HTTP/1.1\r\n' +
[0] 'Accept: application/json, text/plain, */*\r\n' +
[0] 'User-Agent: axios/1.6.8\r\n' +
[0] 'Accept-Encoding: gzip, compress, deflate, br\r\n' +
[0] 'Host: lsmapi.line-apps-alpha.com\r\n' +
[0] 'Connection: keep-alive\r\n' +
[0] '\r\n',
[0] _keepAliveTimeout: 0,
[0] _onPendingData: [Function: nop],
[0] agent: [Agent],
[0] socketPath: undefined,
[0] method: 'GET',
[0] maxHeaderSize: undefined,
[0] insecureHTTPParser: undefined,
[0] joinDuplicateHeaders: undefined,
[0] path: '/token/verify/d812ef4ad4a97a0ec30dc06b:dcfef0d370da45145a0a3bd791864daf25f49b6e1b554beda3a06f6af03a28505927a41f63801dcd315033c89f9f2e4fbfd83c2488763066668878ecfe8d3d4103c622d2252a31d9f105d50e20e6a8c9:f8d3984c59bb5eae997fea5fe8331a52',
[0] _ended: false,
[0] res: null,
[0] aborted: false,
[0] timeoutCb: [Function: emitRequestTimeout],
[0] upgradeOrConnect: false,
[0] parser: null,
[0] maxHeadersCount: null,
[0] reusedSocket: false,
[0] host: 'lsmapi.line-apps-alpha.com',
[0] protocol: 'https:',
[0] _redirectable: [Circular *1],
[0] [Symbol(shapeMode)]: false,
[0] [Symbol(kCapture)]: false,
[0] [Symbol(kBytesWritten)]: 0,
[0] [Symbol(kNeedDrain)]: false,
[0] [Symbol(corked)]: 0,
[0] [Symbol(kOutHeaders)]: [Object: null prototype],
[0] [Symbol(errored)]: null,
[0] [Symbol(kHighWaterMark)]: 16384,
[0] [Symbol(kRejectNonStandardBodyWrites)]: false,
[0] [Symbol(kUniqueHeaders)]: null
[0] },
_currentUrl: 'https://lsmapi.line-apps-alpha.com/token/verify/d812ef4ad4a97a0ec30dc06b:dcfef0d370da45145a0a3bd791864daf25f49b6e1b554beda3a06f6af03a28505927a41f63801dcd315033c89f9f2e4fbfd83c2488763066668878ecfe8d3d4103c622d2252a31d9f105d50e20e6a8c9:f8d3984c59bb5eae997fea5fe8331a52',
[0] [Symbol(shapeMode)]: true,
[0] [Symbol(kCapture)]: false
[0] },
[0] cause: Error: unable to verify the first certificate
[0] at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
[0] at TLSSocket.emit (node:events:519:28)
[0] at TLSSocket._finishInit (node:_tls_wrap:1085:8)
[0] at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:871:12) {
[0] code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
[0] }
[0] }
Reference