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

使用wechaty-puppet-wechat4u报错 #2491

Closed
Andywli opened this issue Feb 11, 2023 · 3 comments · Fixed by #2516
Closed

使用wechaty-puppet-wechat4u报错 #2491

Andywli opened this issue Feb 11, 2023 · 3 comments · Fixed by #2516

Comments

@Andywli
Copy link

Andywli commented Feb 11, 2023

前提:这个微信号无法进行网页登录
步骤:
1、使用以下配置,无法登陆

export WECHATY_LOG=verbose
export WECHATY_PUPPET=wechaty-puppet-wechat

错误提示如下

23:54:48 ERR Config ###########################
23:54:48 ERR Config Wechaty unhandledRejection: Error: Failed to add page binding with name wechatyPuppetBridgeEmit: window['wechatyPuppetBridgeEmit'] already exists!
    at Page.exposeFunction (/home/www/wechaty-getting-started/node_modules/puppeteer/src/common/Page.ts:1393:13)
    at Bridge.onLoad (file:///home/www/wechaty-getting-started/node_modules/wechaty-puppet-wechat/src/bridge.ts:210:20)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) [object Promise]
23:54:48 ERR Config ###########################
23:54:48 ERR Config process.on(unhandledRejection) promise.catch(Failed to add page binding with name wechatyPuppetBridgeEmit: window['wechatyPuppetBridgeEmit'] already exists!)
Config GError: Failed to add page binding with name wechatyPuppetBridgeEmit: window['wechatyPuppetBridgeEmit'] already exists!
    at Page.exposeFunction (/home/www/wechaty-getting-started/node_modules/puppeteer/src/common/Page.ts:1393:13)
    at Bridge.onLoad (file:///home/www/wechaty-getting-started/node_modules/wechaty-puppet-wechat/src/bridge.ts:210:20)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 2,
  details: "Error: Failed to add page binding with name wechatyPuppetBridgeEmit: window['wechatyPuppetBridgeEmit'] already exists!\n" +
    '    at Page.exposeFunction (/home/www/wechaty-getting-started/node_modules/puppeteer/src/common/Page.ts:1393:13)\n' +
    '    at Bridge.onLoad (file:///home/www/wechaty-getting-started/node_modules/wechaty-puppet-wechat/src/bridge.ts:210:20)\n' +
    '    at processTicksAndRejections (node:internal/process/task_queues:95:5)'
}

2、更改配置,能成功登陆

export WECHATY_LOG=verbose
export WECHATY_PUPPET=wechaty-puppet-wechat4u

但是登陆后,接收到消息,弹以下错误,请问如何解决?

17:09:26 VERB Message find({"id":"1103393456201381491"})
17:09:26 VERB Message findAll({"id":"1103393456201381491"})
17:09:26 VERB PuppetMessageMixin messageSearch({"id":"1103393456201381491"})
17:09:26 VERB PuppetMessageMixin messagePayload(1103393456201381491)
17:09:26 VERB PuppetWechat4u messageRawPayload(1103393456201381491)
17:09:26 VERB PuppetWechat4u messageRawPayloadParser([object Object]) @ Puppet<PuppetWechat4u>(ding-dong-bot)
17:09:26 VERB Message static load(1103393456201381491)
17:09:26 VERB Message constructor(1103393456201381491) for class WechatifiedMessageImpl
17:09:26 VERB Message ready()
17:09:26 VERB PuppetMessageMixin messagePayload(1103393456201381491)
17:09:26 WARN Message ready() payload.talkerId not exist! See: https://github.com/wechaty/puppet/issues/187
Puppet: wechaty-puppet-wechat4u<wechaty-puppet>@1.11.1<1.20.2>
Error
    at WechatifiedUserClass.ready (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:818:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at async Function.findAll (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:137:7)
    at async Function.find (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:110:25)
    at async PuppetWechat4u.<anonymous> (file:///home/www/getting-started/node_modules/wechaty/src/wechaty-mixins/puppet-mixin.ts:275:29)
17:09:26 WARN Message ready() payload.listenerId should be set! See: https://github.com/wechaty/puppet/issues/187
Puppet: wechaty-puppet-wechat4u<wechaty-puppet>@1.11.1<1.20.2>
Error
    at WechatifiedUserClass.ready (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:832:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at async Function.findAll (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:137:7)
    at async Function.find (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:110:25)
    at async PuppetWechat4u.<anonymous> (file:///home/www/getting-started/node_modules/wechaty/src/wechaty-mixins/puppet-mixin.ts:275:29)
17:09:26 WARN Message talker() payload.talkerId not exist! See: https://github.com/wechaty/puppet/issues/187
Puppet: wechaty-puppet-wechat4u<wechaty-puppet>@1.11.1<1.20.2>
Error
    at WechatifiedUserClass.talker (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:283:21)
    at WechatifiedUserClass.toString (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:207:21)
    at WechatyImpl.onMessage (file:///home/www/getting-started/demo.ts:44:24)
    at WechatyImpl.emit (node:events:513:28)
    at WechatyImpl.emit (node:domain:489:12)
    at WechatyImpl.emit (file:///home/www/getting-started/node_modules/wechaty/src/wechaty-mixins/gerror-mixin.ts:44:22)
    at PuppetWechat4u.<anonymous> (file:///home/www/getting-started/node_modules/wechaty/src/wechaty-mixins/puppet-mixin.ts:281:22)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
17:09:26 INFO 收到消息 Message#Text[🗣Contact<Andy>]        找你聊天啊
17:09:26 WARN Message listener() payload.listenerId should be set! See: https://github.com/wechaty/puppet/issues/187
Puppet: wechaty-puppet-wechat4u<wechaty-puppet>@1.11.1<1.20.2>
Error
    at WechatifiedUserClass.listener (file:///home/www/getting-started/node_modules/wechaty/src/user-modules/message.ts:344:21)
    at PuppetWechat4u.<anonymous> (file:///home/www/getting-started/node_modules/wechaty/src/wechaty-mixins/puppet-mixin.ts:284:38)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
@Andywli Andywli changed the title WARN Message ready() payload.talkerId not exist! 使用wechaty-puppet-wechat4u报错 Feb 11, 2023
@zhouke1234
Copy link

我在widows上用WECHATY_PUPPET=wechaty-puppet-padlocal可以正常发送消息

@ShipinZ
Copy link

ShipinZ commented Mar 29, 2023

你的问题解决了吗?我也遇到了这个问题。。

@leochen-g
Copy link
Contributor

leochen-g commented Apr 13, 2023

Please update wechaty-puppet-wechat4u version to 1.13.15

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

Successfully merging a pull request may close this issue.

4 participants