Skip to content

重启后,gewechat{"ret":500,"msg":"创建设备失败"} ,可以获取token 但是 无法获取二维码 #346

@daodao1999

Description

@daodao1999

前置确认

  • 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。

⚠️ 搜索issues中是否已存在类似问题

  • 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue

操作系统类型?

Linux

运行的python版本是?

python 3.10

使用的dify-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

{
"channel_type": "gewechat",
"debug": true,
"dify_api_base": "隐藏1",
"dify_api_key": " 隐藏2 ",
"dify_app_type": "chatflow",
"dify_conversation_max_messages": 5,
"expires_in_seconds": 3600,
"gewechat_app_id": "",
"gewechat_base_url": "http://192.168.1.82:2531/v2/api",
"gewechat_callback_url": "http://192.168.1.82:9919/v2/api/callback/collect",
"gewechat_download_url": "http://192.168.1.82:2532/download",
"gewechat_token": "e5d54e6b29884d49bd4f8ae54be93709",
"group_at_off": false,

问题描述 😯

主机重启后,无法启动 gewechat{"ret":500,"msg":"创建设备失败"} ,

测试 /tools/getTokenId 可以获取token

测试/login/getLoginQrCode 无法获取二维码

终端日志 📒

<App startup failed!
{"ret":500,"msg":"创建设备失败"}
Traceback (most recent call last):
  File "/app/lib/gewechat/util/http_util.py", line 20, in post_json
    raise RuntimeError(response.text)
RuntimeError: {"ret":500,"msg":"创建设备失败"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/web_ui.py", line 122, in run
    start_channel(channel_name)
  File "/app/web_ui.py", line 109, in start_channel
    channel.startup()
  File "/app/channel/gewechat/gewechat_channel.py", line 61, in startup
    app_id, error_msg = self.client.login(self.app_id)
  File "/app/lib/gewechat/client.py", line 249, in login
    return self._login_api.login(app_id)
  File "/app/lib/gewechat/api/login_api.py", line 113, in login
    app_id, uuid = self._get_and_validate_qr(app_id)
  File "/app/lib/gewechat/api/login_api.py", line 77, in _get_and_validate_qr
    qr_response = self.get_qr(app_id)
  File "/app/lib/gewechat/api/login_api.py", line 28, in get_qr
    return post_json(self.base_url, "/login/getLoginQrCode", self.token, param)
  File "/app/lib/gewechat/util/http_util.py", line 23, in post_json
    raise RuntimeError(str(e))
RuntimeError: {"ret":500,"msg":"创建设备失败"}
http请求失败, url=http://192.168.1.82:2531/v2/api/login/getLoginQrCode, exception={"ret":500,"msg":"创建设备失败"}>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions