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

invalid character '\x11' in string literal #73

Open
yqchilde opened this issue Mar 22, 2023 · 3 comments
Open

invalid character '\x11' in string literal #73

yqchilde opened this issue Mar 22, 2023 · 3 comments

Comments

@yqchilde
Copy link
Owner

yqchilde commented Mar 22, 2023

千寻遇到这种问题,通常是启动时获取机器人信息失败,返回的response数据不对,不是一个json导致

排查方式如下,使用对应指令在终端下执行一次看看具体响应,如果你对命令行不熟,可以直接用postman / apifox测试,记得要替换命令中的千寻IP千寻HTTP端口你机器人的wxid

Linux、Mac下

curl --location --request POST 'http://千寻IP:千寻HTTP端口/DaenWxHook/httpapi/?wxid=你机器人的wxid' --header 'Content-Type: application/json' --data-raw '{"type": "Q0003", "data": {}}'

Windows下

Invoke-RestMethod -Method POST -Uri 'http://千寻IP:千寻HTTP端口/DaenWxHook/httpapi/?wxid=你机器人的wxid' -Headers @{'Content-Type'='application/json'} -Body '{"type": "Q0003", "data": {}}'

请求一下看一下具体的响应返回了什么?

在返回的response里应该是有乱码的数据,导致json解析失败,如果你出现了,请联系我,我帮你解决

@yqchilde yqchilde pinned this issue Mar 22, 2023
@jzhjm
Copy link

jzhjm commented Aug 25, 2023

ERRO[2023-08-25 17:05:04] [Dean] GetRobotInfo error: invalid character '\v' in string literal

无法获取好友,群组,公众号

在 Linux 下 使用指令

curl --location --request POST 'http://Daen客户端IP:9527/DaenWxHook/httpapi/?wxid=wxid_kp**********22' --header 'Content-Type: application/json' --data-raw '{"type": "Q0003", "data": {}}'

返回

{"code":500,"msg":"路由不存在","result":{},"wxid":"wxid_kp**********22","port":9527,"pid":5908,"flag":"","timestamp":"1692954308404"}

给机器人发送消息,在终端会显示
[回调]收到私信([发消息wxid])文本消息 ==> 111

@yqchilde
Copy link
Owner Author

@jzhjm config.yaml 中设置成daen

image

@jzhjm
Copy link

jzhjm commented Aug 25, 2023

config.yaml 中设置成daen

image


@yqchilde ,直接无法启动,另:加群了

FATA[2023-08-25 17:20:50] [main] 请在配置文件中指定机器人框架后再启动

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