google 操作验证中的 EPROTO 错误

EPROTO error on google action verification

我正在使用 Actions SDK 在 google 上执行一项操作,但是当我启用操作时;验证如下:

https://developers.google.com/actions/reference/rest/verify-requests

我收到以下错误,这仅在我使用公司代理时出现,有人可以为此提出解决方案吗?

{ "error": "ID token verification failed: Error: Failed to retrieve verification certificates: Error: write EPROTO 139904972138304:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:825:\n\n at OAuth2Client. (/opt/app/node_modules/actions-on-google/node_modules/google-auth-library/build/src/auth/oauth2client.js:580:31)\n at step (/opt/app/node_modules/actions-on-google/node_modules/google-auth-library/build/src/auth/oauth2client.js:57:23)\n at Object.throw (/opt/app/node_modules/actions-on-google/node_modules/google-auth-library/build/src/auth/oauth2client.js:38:53)\n at rejected (/opt/app/node_modules/actions-on-google/node_modules/google-auth-library/build/src/auth/oauth2client.js:30:65)\n at propagateAslWrapper (/opt/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/index.js:502:23)\n at /opt/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/glue.js:188:31\n at /opt/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/index.js:539:70\n at /opt/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/glue.js:188:31\n at :null:null\n" }

我正在使用 v2.5.0 of actions-on-google

所以我能够解决这个问题,根本问题是 google auth 库 (v1.3.2)

使用的 axios 库

这是问题所在:https://github.com/axios/axios/issues/662

我的解决方法是在 google auth 库中将 axios 替换为请求承诺,然后将其发布到我们的私有 npm 注册表中,这暂时解决了问题。