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

[BUG]WorkPro:Error: 14 UNAVAILABLE: No connection established #194

Closed
ahujack opened this issue Apr 7, 2023 · 4 comments
Closed

[BUG]WorkPro:Error: 14 UNAVAILABLE: No connection established #194

ahujack opened this issue Apr 7, 2023 · 4 comments
Assignees
Labels
workpro Wechaty Puppet Service WorkPro

Comments

@ahujack
Copy link

ahujack commented Apr 7, 2023

Please make sure you have read the Wechaty Puppet Service: WorkPro from Wechaty Official Website before you continue writing this issue.

IMPORTANT

DO NOT post your token in the issue. If we need to investigate the behavior of certain token, we will provide a private contact route.

Describe the bug

A clear and concise description of what the bug is.

Info

  • Platform[e.g. Windows/Mac/Linux]: mac
  • Runtime version[e.g. node/JAVA]:node
  • Wechaty version: 1.20.2
  • Wechaty Puppet version: 1.18.4

To Reproduce

Steps to reproduce the behavior:

const bot = WechatyBuilder.build({
name: "wechat-assistant", // generate xxxx.memory-card.json and save login data for the next login
puppet: "wechaty-puppet-wechat",
//puppet: "wechaty-puppet-service",
puppetOptions: {
uos: true,
// token: "puppet_workpro_xxxx"
}
});
console.log(init success);

async function main() {
const initializedAt = Date.now()
bot
.on("scan",async (qrcode, status) => {
const url = https://api.qrserver.com/v1/create-qr-code/?data=/${encodeURIComponent(qrcode)};
console.log(Scan QR Code to login: ${status}\n${url});
console.log(
await QRCode.toString(qrcode, { type: "terminal", small: true })
);

Expected behavior
当我使用 puppet: "wechaty-puppet-wechat"的时候是可以连接上的,但是我换成puppet: "wechaty-puppet-service",以后就连接不上了,再bot.on("scan")这一步就会失败,是因为service没法访问https://api.qrserver.com/v1/create-qr-code/?data= 吗?

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@ahujack ahujack added the workpro Wechaty Puppet Service WorkPro label Apr 7, 2023
@hcfw007
Copy link
Member

hcfw007 commented Apr 10, 2023

这个报错一般是由于tls未正确配置导致的。需要添加环境变量

export WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENT=true

可以参考 wechaty/wechaty#2462 tls相关部分。

@ahujack
Copy link
Author

ahujack commented Apr 12, 2023

这个设置了的,还是不行

@hcfw007
Copy link
Member

hcfw007 commented Apr 12, 2023

在你提供的代码中,token这一配置是注释的。实际代码也是这样吗?

@su-chang
Copy link
Member

暂无反馈,关闭该issue。

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

No branches or pull requests

3 participants