Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

线上nacos sdk内部报错 #117

Open
yuzhishuang opened this issue Jan 2, 2024 · 2 comments
Open

线上nacos sdk内部报错 #117

yuzhishuang opened this issue Jan 2, 2024 · 2 comments

Comments

@yuzhishuang
Copy link

yuzhishuang commented Jan 2, 2024

nacos版本:2.5.1

报错日志:
[Tue Jan 02 2024 10:05:50 GMT+0800 (Central Standard Time)][pid: 66][NacosConfigClient] NacosLongPullingError: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received undefined
Error Stack:
TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received undefined
at new NodeError (internal/errors.js:322:7)
at prepareSecretKey (internal/crypto/keys.js:322:11)
at new Hmac (internal/crypto/hash.js:111:9)
at Object.createHmac (crypto.js:146:10)
at HttpAgent.request (/app/node_modules/nacos-config/dist/http_agent.js:110:34)
at ClientWorker.checkServerConfigInfo (/app/node_modules/nacos-config/dist/client_worker.js:209:46)
at /app/node_modules/nacos-config/dist/client_worker.js:167:36
Error Additions:
code: "ERR_INVALID_ARG_TYPE"

@realJackSun
Copy link
Member

怀疑是传了空值?或者环境变量没有设置

@yuzhishuang
Copy link
Author

怀疑是传了空值?或者环境变量没有设置

报错为内部报错,根据错误栈信息,报错为client_worker.js的startLongPulling函数,当前函数无入参
环境变量没有设置指的是业务方需要传入的什么变量

当前错误为偶现错误,node初始化时并无报错,且运行正常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants