node.js - Coinbase API client.getAccount(...) 开始返回 : "Error: unable to get local issuer certificate"

标签 node.js google-app-engine google-cloud-platform coinbase-api

这个问题在这里已经有了答案:





UNABLE_TO_GET_ISSUER_CERT_LOCALLY error when calling the Coinbase NODEJS API

(2 个回答)


去年关闭。




该问题于 2020 年 3 月 31 日太平洋时间上午晚些时候开始。向 Coinbase 发出 API 调用的服务器托管在带有 node.js (GCP) 的 Google App Engine 上。与 Coinbase 相同的证书连接问题也发生在几周前,并持续了大约一天。当时证书连接问题自行消失了。无论当时还是今天,都没有对调用 Coinbase API 的服务器进行任何代码更改。相同的代码已经运行了一年多,但几个月前被转移到 App 引擎。 - Coinbase 是否进行了会影响对 Google Cloud Platform 的证书身份验证的网络更改?

最佳答案

Coinbase 他们更新了他们的证书。
修复:当您启动客户端时,您可以将 strictSSL 设置为 false 或传入新的有效证书。

将 strictSSL 设置为 false:

var Client = require('coinbase').Client;
var client = new Client({
   apiKey: mykey, 
   apiSecret: mysecret,
   strictSSL: false
});

更新证书文件(您应该可以在此处导出它们 - https://baltimore-cybertrust-root.chain-demos.digicert.com/ 或尝试 coinbase.com 并在那里导出):
var Client = require('coinbase').Client;
var client = new Client({
   apiKey: mykey, 
   apiSecret: mysecret,
   caFile: myNewCertFile
});

myNewCertFiles 应遵循此文件格式并带有更新的证书:https://github.com/coinbase/coinbase-node/blob/master/lib/CoinbaseCertStore.js

关于node.js - Coinbase API client.getAccount(...) 开始返回 : "Error: unable to get local issuer certificate",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60961069/

相关文章:

javascript - NodeJS 找不到模块 'grpc'

google-app-engine - 我可以使用 ndb.key 处理重复属性或结构化属性吗

google-app-engine - 更改默认端口 8080 maven gae 目标 appengine :devserver

google-app-engine - 我应该如何编写我的 Google App Engine app.yaml 文件?

google-app-engine - go112 标准运行时中 appengine taskqueue 的正确上下文是什么

python - GS响应错误: GSResponseError: 403 Forbidden while writing to Bucket

node.js - 为什么 fs.write 中的 offset 参数不适用于缓冲区,但适用于字符串

javascript - 此代码会导致 Node.js 中出现竞争条件吗?

concurrency - 如何使用谷歌云函数处理背压

node.js - 为什么我收到的 jwt 格式错误?