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]: Wechaty - ERROR - internal error <> #398

Open
zhayujie opened this issue May 14, 2023 · 12 comments
Open

[Bug]: Wechaty - ERROR - internal error <> #398

zhayujie opened this issue May 14, 2023 · 12 comments

Comments

@zhayujie
Copy link

Environment

- wechaty: 0.10.7
- wechaty-puppet:  0.4.23
- wechaty-puppet-service: 0.8.10
- wechaty-plugin-contrib:  None
- token type: padlocal|wxwork|xp  padlocal
- the version of wechaty docker container: [0.65]

Description

Error before login

### client log:
Wechaty - ERROR - internal error <>


### Docker container log:
      ============================================================
       Welcome to Wechaty PadLocal puppet!

       - wechaty-puppet-padlocal version: 0.4.2
       - padlocal-ts-client version: 0.4.1
      ============================================================
     
11:31:00 VERB Wechaty on(heartbeat, listener) registering... listenerCount: 1
11:31:00 VERB StateSwitch <Wechaty> on(true) <- (pending)
11:31:00 VERB IoClient startPuppetServer()
11:31:00 VERB PuppetServer constructor({endpoint: "0.0.0.0:9003", puppet: "Puppet#0<PuppetPadlocal>(2d98f4f9-774c-4289-a8aa-a4d3e638d829)", token: "2d98f4f9-774c-4289-a8aa-a4d3e638d829"})
11:31:00 VERB PuppetServer start()
11:31:00 VERB EventStreamManager constructor(Puppet#0<PuppetPadlocal>(2d98f4f9-774c-4289-a8aa-a4d3e638d829))
11:31:00 VERB StateSwitch <IoClient> on(true) <- (pending)
11:31:01 INFO [PuppetPadlocal] start login with type: QrLogin
11:31:04 INFO IoClient [2] http://weixin.qq.com/x/QfPJUF2WcCZUIuRk9gL6
Online QR Code Image: https://wechaty.js.org/qrcode/http%3A%2F%2Fweixin.qq.com%2Fx%2FQfPJUF2WcCZUIuRk9gL6
11:31:26 INFO Io on(jsonrpc): [object Object]
11:31:26 VERB Io on(jsonrpc) send({"id":-9007199254740802,"jsonrpc":"2.0","result":9003})
11:31:28 VERB PuppetServiceImpl stop()
11:31:28 ERR PuppetServiceImpl stop() eventStreamManager is not busy?
11:31:28 VERB StateSwitch <PuppetPadlocal> off(pending) <- (false)
11:31:28 VERB StateSwitch <PuppetPadlocal> off(true) <- (pending)
11:31:33 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
11:31:33 VERB StateSwitch <PuppetPadlocal> ready(off, noCross=false)

11:32:14 VERB PuppetServiceImpl start()
11:32:14 VERB StateSwitch <PuppetPadlocal> on(pending) <- (false)
11:32:14 VERB PuppetServiceImpl event()
11:32:14 VERB EventStreamManager start(stream)
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#0<PuppetPadlocal>(2d98f4f9-774c-4289-a8aa-a4d3e638d829)
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:2) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:2) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:2) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dirty) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:1) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:2) registering...
11:32:14 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
11:32:14 VERB EventStreamManager onStreamingCallEnd(callback)
11:32:14 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/QfPJUF2WcCZUIuRk9gL6","status":2})
11:32:14 INFO [PuppetPadlocal] start login with type: QrLogin
11:32:17 INFO IoClient [2] http://weixin.qq.com/x/4c6KsbdOBOCxZNvs32vt
Online QR Code Image: https://wechaty.js.org/qrcode/http%3A%2F%2Fweixin.qq.com%2Fx%2F4c6KsbdOBOCxZNvs32vt
11:32:17 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/4c6KsbdOBOCxZNvs32vt","status":2})
11:32:29 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:32:44 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:32:59 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})

11:33:14 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:33:29 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:33:44 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:33:59 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:34:14 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:34:29 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})



11:34:38 INFO Io on(jsonrpc): [object Object]
11:34:38 VERB Io on(jsonrpc) send({"id":-9007199254740788,"jsonrpc":"2.0","result":9003})
11:34:39 VERB PuppetServiceImpl stop()
11:34:39 VERB EventStreamManager stop()
11:34:39 VERB StateSwitch <PuppetPadlocal> off(pending) <- (false)
11:34:39 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(finish) fired
11:34:39 VERB EventStreamManager connectPuppetEventToStreamingCall() disconnect() 14 callbacks
11:34:39 WARN EventStreamManager this.onStreamingCallEnd() this.eventStream.on(finish) eventStream is undefined
11:34:39 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(close) fired
11:34:39 WARN EventStreamManager this.onStreamingCallEnd() this.eventStream.on(close) eventStream is undefined
11:34:39 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(cancelled) fired with arguments: {}
11:34:39 WARN EventStreamManager this.onStreamingCallEnd() this.eventStream.on(cancelled) eventStream is undefined
11:34:39 VERB StateSwitch <PuppetPadlocal> off(true) <- (pending)
11:34:42 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
11:34:42 VERB StateSwitch <PuppetPadlocal> ready(off, noCross=false)
11:35:20 VERB PuppetServiceImpl start()
11:35:20 VERB StateSwitch <PuppetPadlocal> on(pending) <- (false)
11:35:20 VERB PuppetServiceImpl event()
11:35:20 VERB EventStreamManager start(stream)
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#0<PuppetPadlocal>(2d98f4f9-774c-4289-a8aa-a4d3e638d829)
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:2) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:2) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:2) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dirty) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:1) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:2) registering...
11:35:20 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
11:35:20 VERB EventStreamManager onStreamingCallEnd(callback)
11:35:20 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/4c6KsbdOBOCxZNvs32vt","status":2})
11:35:21 INFO [PuppetPadlocal] start login with type: QrLogin
11:35:23 INFO IoClient [2] http://weixin.qq.com/x/IeTceSv99RLG_gmygy7-
Online QR Code Image: https://wechaty.js.org/qrcode/http%3A%2F%2Fweixin.qq.com%2Fx%2FIeTceSv99RLG_gmygy7-
11:35:23 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/IeTceSv99RLG_gmygy7-","status":2})
11:35:35 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:35:50 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:36:05 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})
11:36:20 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@padlocal"})

Minimum reproducible code

def startup(self):
    config = conf()
    token = config.get("wechaty_puppet_service_token")
    os.environ["WECHATY_PUPPET_SERVICE_TOKEN"] = token
    asyncio.run(self.main())

async def main(self):
    loop = asyncio.get_event_loop()
    # 将asyncio的loop传入处理线程
    self.handler_pool._initializer = lambda: asyncio.set_event_loop(loop)
    self.bot = Wechaty()
    self.bot.on("login", self.on_login)
    self.bot.on("message", self.on_message)
    await self.bot.start()

async def on_login(self, contact: Contact):
    self.user_id = contact.contact_id
    self.name = contact.name
    logger.info("[WX] login user={}".format(contact))
@zhayujie zhayujie changed the title [Bug]: [Bug]: Wechaty - ERROR - internal error <> May 14, 2023
@wj-Mcat
Copy link
Collaborator

wj-Mcat commented May 14, 2023

internal error<> will not create inference on the application most of time, so you can ignore it.

BTW, we don't suggest that you set event_loop in your bot application, which will inference the main loop sometimes.

@zhayujie
Copy link
Author

Thank you for your response. However, another issue is that I don't have enough time to scan the codes. Every time I finish scanning one code, the next one appears immediately.

image

@zhayujie
Copy link
Author

@wj-Mcat 方便帮忙看看嘛~

@doublewinter0
Copy link
Contributor

我这边也有这样的问题,启动之后你就让它刷一会二维码,过上一段时间它应该就不刷了,然后此时扫码登录。
如果还不行,就重启下 gateway,然后重启你的程序,然后重复上述步骤,运气不差的话,就能成功登录了。

@zhayujie
Copy link
Author

我这边也有这样的问题,启动之后你就让它刷一会二维码,过上一段时间它应该就不刷了,然后此时扫码登录。 如果还不行,就重启下 gateway,然后重启你的程序,然后重复上述步骤,运气不差的话,就能成功登录了。

好的,谢谢,我试试

@jello-chen
Copy link

I use the ding-dong sample code, there will be this error.

image

@Zyx-A
Copy link

Zyx-A commented Aug 17, 2023

好像不影响使用

@wailliai
Copy link

wailliai commented Jan 2, 2024

  • wechaty: 0.10.7
  • token type: workpro

二维码出不来,也没有显示二维码链接,大佬帮忙看看

image

@wailliai
Copy link

wailliai commented Jan 2, 2024

  • wechaty: 0.10.7
  • token type: workpro

二维码出不来,也没有显示二维码链接,tool.log中也没有显示任何错误日志,大佬帮忙看看

image

@kill136
Copy link

kill136 commented Mar 14, 2024

2:37:50 VERB StorageFile save() to /wechaty/python-wechaty-b2ff8fc5-c5a2-4384-b317-3695807e4833.memory-card.json
02:37:50 VERB PuppetWeChat start() throttleQueue.subscribe() new item: [object Object]
02:37:50 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":{"code":0,"url":"https://login.weixin.qq.com/qrcode/AbWFoHhc1g=="},"type":"scan"})
02:37:50 INFO IoClient [2] https://login.weixin.qq.com/l/AbWFoHhc1g==
Online QR Code Image: https://wechaty.js.org/qrcode/https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FAbWFoHhc1g%3D%3D
02:37:50 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"https://login.weixin.qq.com/l/AbWFoHhc1g==","status":2})
02:37:50 VERB MemoryCard set(PUPPET_WECHAT, [object Object],[object Object],[object Object])
02:37:50 VERB MemoryCard save() to StorageFile</wechaty/python-wechaty-b2ff8fc5-c5a2-4384-b317-3695807e4833.memory-card.json>
02:37:50 VERB StorageFile save() to /wechaty/python-wechaty-b2ff8fc5-c5a2-4384-b317-3695807e4833.memory-card.json
02:38:04 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"heartbeat@browserbridge ding"})
02:38:06 VERB PuppetWeChatEvent onScan({code: 201, url: https://login.weixin.qq.com/qrcode/AbWFoHhc1g==})
02:38:06 VERB MemoryCard set(PUPPET_WECHAT, [object Object],[object Object],[object Object])
02:38:06 VERB MemoryCard save() to StorageFile</wechaty/python-wechaty-b2ff8fc5-c5a2-4384-b317-3695807e4833.memory-card.json>
02:38:06 VERB StorageFile save() to /wechaty/python-wechaty-b2ff8fc5-c5a2-4384-b317-3695807e4833.memory-card.json
02:38:06 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":{"code":201,"url":"https://login.weixin.qq.com/qrcode/AbWFoHhc1g=="},"type":"scan"})
02:38:06 INFO IoClient [3] https://login.weixin.qq.com/l/AbWFoHhc1g==
Online QR Code Image: https://wechaty.js.org/qrcode/https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FAbWFoHhc1g%3D%3D
02:38:06 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"https://login.weixin.qq.com/l/AbWFoHhc1g==","status":3})
02:38:17 VERB PuppetWeChatBridge onLoad() page.url=https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=Aw-W3j5AtfEXd1DTrf3FzCm0@qrticket_0&uuid=AbWFoHhc1g==&lang=en_US&scan=1710383886
02:38:17 VERB PuppetWeChatBridge readyAngular()
02:38:47 VERB PuppetWeChatBridge readyAngular() exception: TimeoutError: waiting for function failed: timeout 30000ms exceeded
02:38:47 VERB PuppetWeChatBridge testBlockedMessage(<pre style="word-wrap: break-word; white-space: pr)
02:38:47 VERB PuppetWeChatBridge preHtmlToXml()
02:38:47 WARN PuppetWeChatBridge testBlockedMessage() error.ret=1203
02:38:47 INFO PuppetWeChatBridge

    Please see: Account Login Issue <https://github.com/wechaty/wechaty/issues/872>

02:38:47 ERR PuppetWeChatBridge onLoad() exception: Error: 登录失败。
02:38:47 VERB EventStreamManager grpcEmit(EVENT_TYPE_ERROR[16], {"data":"登录失败。"})

#现在彻底无法使用了吗?

@silyman1
Copy link

我这边也有这样的问题,启动之后你就让它刷一会二维码,过上一段时间它应该就不刷了,然后此时扫码登录。 如果还不行,就重启下 gateway,然后重启你的程序,然后重复上述步骤,运气不差的话,就能成功登录了。

好的,谢谢,我试试

现在还能用吗我也是一直刷新根本登录不了

@Mcdull0921
Copy link

我这边也有这样的问题,启动之后你就让它刷一会二维码,过上一段时间它应该就不刷了,然后此时扫码登录。 如果还不行,就重启下 gateway,然后重启你的程序,然后重复上述步骤,运气不差的话,就能成功登录了。

好的,谢谢,我试试

现在还能用吗我也是一直刷新根本登录不了

同样的问题,根本登录不了,用的puppet-padlocal

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

9 participants