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

❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️ 安装或者运行报错,先看这条 Issue。 #54

Open
Riveray-Jiang opened this issue Dec 13, 2022 · 126 comments

Comments

@Riveray-Jiang
Copy link

Riveray-Jiang commented Dec 13, 2022

11:01:09 ERR PuppetWeChatBridge start() exception: Error: An `executablePath` or `channel` must be specified for `puppeteer-core`
11:01:09 ERR PuppetWeChat initBridge() exception: An `executablePath` or `channel` must be specified for `puppeteer-core`
11:01:09 ERR PuppetWeChat initBridge() this.bridge.stop() rejection: Error: no page
GError: An `executablePath` or `channel` must be specified for `puppeteer-core`
    at assert (/Users/I576457/Documents/chatgpt/wechat-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/util/assert.js:28:15)
    at ChromeLauncher.launch (/Users/I576457/Documents/chatgpt/wechat-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:69:36)
    at PuppeteerNode.launch (/Users/I576457/Documents/chatgpt/wechat-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.js:154:105)
    at PuppeteerExtra.launch (/Users/I576457/Documents/chatgpt/wechat-bot/node_modules/puppeteer-extra/dist/index.cjs.js:128:41)
    at async Bridge.initBrowser (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet-wechat/dist/esm/src/bridge.js:109:23)
    at async Bridge.start (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet-wechat/dist/esm/src/bridge.js:48:28)
    at async PuppetWeChat.initBridge (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet-wechat/dist/esm/src/puppet-wechat.js:176:13)
    at async PuppetWeChat.onStart (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet-wechat/dist/esm/src/puppet-wechat.js:69:23)
    at async PuppetWeChat.start (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/state-switch/dist/esm/src/service-ctl/service-ctl.js:62:17)
    at async PuppetWeChat.start (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet/dist/esm/src/mixins/service-mixin.js:18:13) {
  code: 2,
  details: 'Error: An `executablePath` or `channel` must be specified for `puppeteer-core`\n' +
    '    at assert (/Users/I576457/Documents/chatgpt/wechat-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/util/assert.js:28:15)\n' +
    '    at ChromeLauncher.launch (/Users/I576457/Documents/chatgpt/wechat-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:69:36)\n' +
    '    at PuppeteerNode.launch (/Users/I576457/Documents/chatgpt/wechat-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.js:154:105)\n' +
    '    at PuppeteerExtra.launch (/Users/I576457/Documents/chatgpt/wechat-bot/node_modules/puppeteer-extra/dist/index.cjs.js:128:41)\n' +
    '    at async Bridge.initBrowser (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet-wechat/dist/esm/src/bridge.js:109:23)\n' +
    '    at async Bridge.start (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet-wechat/dist/esm/src/bridge.js:48:28)\n' +
    '    at async PuppetWeChat.initBridge (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet-wechat/dist/esm/src/puppet-wechat.js:176:13)\n' +
    '    at async PuppetWeChat.onStart (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet-wechat/dist/esm/src/puppet-wechat.js:69:23)\n' +
    '    at async PuppetWeChat.start (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/state-switch/dist/esm/src/service-ctl/service-ctl.js:62:17)\n' +
    '    at async PuppetWeChat.start (file:///Users/I576457/Documents/chatgpt/wechat-bot/node_modules/wechaty-puppet/dist/esm/src/mixins/service-mixin.js:18:13)'
}

大家有遇到过这个问题嘛..

@ww-care
Copy link

ww-care commented Dec 13, 2022

有,感觉是puppeteer-core这modules的问题

@wangrongding
Copy link
Owner

你们都是什么操作系统?方便说一下吗?看到有些小伙伴都出现了这个问题

@emmmnaadada
Copy link

你们都是什么操作系统?方便说一下吗?看到有些小伙伴都出现了这个问题

我是用服务器

@emmmnaadada
Copy link

你们都是什么操作系统?方便说一下吗?看到有些小伙伴都出现了这个问题

luinx

@ww-care
Copy link

ww-care commented Dec 13, 2022

mac+node 18

@cxp1226
Copy link

cxp1226 commented Dec 13, 2022

你们都是什么操作系统?方便说一下吗?看到有些小伙伴都出现了这个问题

win11😂

@wangrongding
Copy link
Owner

mac+node 18

mac+node18也报这个错?

@Niomax32
Copy link

Win10 and node 18, encountered the same issue. Feels like wechaty-puppet-wechat is broken with the latest puppeteer-core, lacking of the executablePath. Forcibly downgrading the puppeteer and puppeteer-core to a deprecated version 13.5.1 made the bot works again for me, just FYI, I don't think this is an elegant solution for this issue,.

@Riveray-Jiang
Copy link
Author

Riveray-Jiang commented Dec 13, 2022

你们都是什么操作系统?方便说一下吗?看到有些小伙伴都出现了这个问题

Mac m1 + node v19.2

@Riveray-Jiang
Copy link
Author

Win10 and node 18, encountered the same issue. Feels like wechaty-puppet-wechat is broken with the latest puppeteer-core, lacking of the executablePath. Forcibly downgrading the puppeteer and puppeteer-core to a deprecated version 13.5.1 made the bot works again for me, just FYI, I don't think this is an elegant solution for this issue,.

Do you mean to downgrade both puppeteer and puppeteer-core to 13.5.1? I attempted to run after downgrading both packages but failed. Could you go into more detail? :)

@yaokuku123
Copy link

mac m1 + node18

@P001water
Copy link

docker 同样是这个错误 :)

@OnePieceJoker
Copy link

Win10 and node 18, encountered the same issue. Feels like wechaty-puppet-wechat is broken with the latest puppeteer-core, lacking of the executablePath. Forcibly downgrading the puppeteer and puppeteer-core to a deprecated version 13.5.1 made the bot works again for me, just FYI, I don't think this is an elegant solution for this issue,.

Do you mean to downgrade both puppeteer and puppeteer-core to 13.5.1? I attempted to run after downgrading both packages but failed. Could you go into more detail? :)

我的话是在package.json里指定下特定的版本

"devDependencies": {
      "puppeteer": "13.5.1",
      "puppeteer-core": "13.5.1"
  }

启动后报错,提示下载chromium(macos下),
我就手动配置下了executablePath为modules里面下载好的chromium路径,就可以启动成功了

@xiaoqian97
Copy link

@OnePieceJoker 我就手动配置下了executablePath为modules里面下载好的chromium路径

这个怎么配置的

@xiaoqian97
Copy link

14:22:41 ERR PuppetWeChatBridge start() exception: Error: Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (970485).
14:22:41 ERR PuppetWeChat initBridge() exception: Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (970485).
14:22:41 ERR PuppetWeChat initBridge() this.bridge.stop() rejection: Error: no page
GError: Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (970485).

锁定依赖版本就出这个问题

@OnePieceJoker
Copy link

你这个报错日志里,顶层有个Launcher.js文件,进入这个文件报错的方法里,然后搜索executablePath,将它修改为你node_modules/puppeteer里下载的Chromium文件路径.

image

@OnePieceJoker
Copy link

image 这个路径吗

配置下启动试试

@xinyuanlee
Copy link

持续关注中#54 (comment)

@OnePieceJoker
Copy link

@zq970825 你这路径不对,你用下绝对路径,到chrome.exe

@xinyuanlee
Copy link

微信截图_20221213145603
设置绝对路径貌似也不行,后面不用加chrome.exe吧,加上也不行

@yaokuku123
Copy link

你这个报错日志里,顶层有个Launcher.js文件,进入这个文件报错的方法里,然后搜索executablePath,将它修改为你node_modules/puppeteer里下载的Chromium文件路径.

image

可以了 感谢

@wyinbo
Copy link

wyinbo commented Dec 13, 2022

你这个报错日志里,顶层有一个Launcher.js文件,进入这个文件报错的方法里,然后搜索executablePath,将它修改为你的node_modules/puppeteer里下载的Chromium文件。
图片

可以了 谢谢

微信截图_20221213145603 设置绝对路貌似也不行,后面不用加chrome.exe吧,加上也不行

我这边也不行

@Riveray-Jiang
Copy link
Author

Riveray-Jiang commented Dec 13, 2022

我疯狂报429 too many requests,不应该呀?我还没怎么请求呢

@chanlk
Copy link

chanlk commented Dec 13, 2022

windows 用绝对路径 双反斜杠 \\ 类似于 C:\\aaa\\bbb\\ccc\\chrome.exe

@xinyuanlee
Copy link

#54 (comment)
#54 (comment)
可以了,可以了,感谢感谢

@wyinbo
Copy link

wyinbo commented Dec 13, 2022

需要加上chrome.exe ,然后是 / 不是 \,\会被转义的,你改一下再试一下 @wyinbo

image
改了后,还是不行,报错了。
image

@hansonwong310
Copy link

扫码后报错 @4}LL@5PMWOKJNG`GXL)GL7

可以试下直接百度搜索 微信网页版,然后扫码登录一下,看提示什么,我这里是因为提示 image 所以报错

谢谢 我也是登录不了

可以试试将 微信中实名认证做完,然后用客户端登录一下看行不,我是上周做完,这周再搞就可以了

ps:看到 wechaty 其实是有方法绕过 web 端不能登录的方法的,而本项目也有那个参数 uos https://wechaty.js.org/2021/04/13/wechaty-uos-web/

还是不行,有其他解决方案了么?

@itmryang
Copy link

在linux服务器上开代理登录不了微信吗
20230314-113720

@itmryang
Copy link

不会自动回复。。。。
image

@shuaixiaoji
Copy link

收不到消息,key是刚申请的,报错如下:
image

@sseventeen
Copy link

收不到消息,key是刚申请的,报错如下: image

收不到消息,key是刚申请的,报错如下: image

我也是这个问题,请问解决了吗?

@sseventeen
Copy link

或许你们可以尝试安装使用wechaty-puppet-wechat4u ,这个是不需要安装puppeteer的,纯api请求

安装依赖,保证wechaty-puppet-wechat4u版本为 1.13.12

npm i wechaty-puppet-wechat4u --save

修改 src/wechaty/index.js文件中的内容

...

// 初始化机器人
export const bot = WechatyBuilder.build({
  name: 'WechatEveryDay',
  puppet: 'wechaty-puppet-wechat4u',
})

...

然后正常运行即可

这种方法还是报错的有解决的吗?
uncaughtException AssertionError [ERR_ASSERTION]: 1102 == 0
at Object.equal (D:\wechatbot\wechat-bot-main\wechat-bot-main\node_modules\wechat4u\lib\util\global.js:69:24)
at D:\wechatbot\wechat-bot-main\wechat-bot-main\node_modules\wechat4u\lib\core.js:227:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 2,
details: 'AssertionError [ERR_ASSERTION]: 1102 == 0\n' +
' at Object.equal (D:\wechatbot\wechat-bot-main\wechat-bot-main\node_modules\wechat4u\lib\util\global.js:69:24)\n' +
' at D:\wechatbot\wechat-bot-main\wechat-bot-main\node_modules\wechat4u\lib\core.js:227:24\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}

@nbdxrycyl
Copy link

运行后回复:11:29:26 WARN WechatyPuppetMixin start() starting puppet ... timeout 11:29:26 WARN WechatyPuppetMixin start() puppet info: Puppet<PuppetWeChat>(WechatEveryDay) Start to log in wechat... 11:30:11 ERR PuppetWeChatBridge start() exception: TimeoutError: Navigation timeout of 60000 ms exceeded 11:30:11 ERR PuppetWeChat initBridge() exception: Navigation timeout of 60000 ms exceeded 11:30:11 WARN PuppetWeChatBridge stop() page.close() exception: Error: Protocol error: Connection closed. Most likely the page has been closed.
请问这是什么问题啊,不能是win环境吗

@SakuyaKnowledge
Copy link

不会自动回复。。。。 image

我和你一样,有解决吗

@ximo-156
Copy link

我的也是没有自动回复

@ximo-156
Copy link

不会自动回复。。。。 image

我和你一样,有解决吗

有没有解决的

@ximo-156
Copy link

不会自动回复。。。。 image

我和你一样,有解决吗

求解决

@by0126
Copy link

by0126 commented May 12, 2023

不会自动回复。。。。 image

我和你一样,有解决吗

我也是,你们解决了吗?

@ChenZhouMing
Copy link

ChenZhouMing commented May 12, 2023 via email

@pqshao pqshao mentioned this issue Jun 8, 2023
@leavenow
Copy link

真不错呀~

@2286077401
Copy link

配置了白名单,一样不能自动回复,开代理的话就报错了。请问是怎么回事。

@ChenZhouMing
Copy link

ChenZhouMing commented Jul 17, 2023 via email

@wangrongding wangrongding changed the title 🌸🌸🌸🌸 安装或者运行报错,先看这条 Issue。 🌸🌸🌸🌸 ✅ ✅ ✅ 安装或者运行报错,先看这条 Issue。❗️❗️❗️ Mar 7, 2024
@wangrongding wangrongding changed the title ✅ ✅ ✅ 安装或者运行报错,先看这条 Issue。❗️❗️❗️ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ 安装或者运行报错,先看这条 Issue。❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️ Mar 7, 2024
@wangrongding wangrongding changed the title ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ 安装或者运行报错,先看这条 Issue。❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️ ❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️ 安装或者运行报错,先看这条 Issue。 Mar 7, 2024
@wangrongding wangrongding changed the title ❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️ 安装或者运行报错,先看这条 Issue。 ❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️ 安装或者运行报错,先看这条 Issue。 Mar 7, 2024
@wangrongding
Copy link
Owner

  • 拉取最新代码,重新安装依赖(删除 lock 文件,删除 node_modules)
  • 安装依赖时最好不要设置 npm 镜像
  • 遇到 puppeteer 安装失败设置环境变量:
    # Mac
    export PUPPETEER_SKIP_DOWNLOAD='true'
    
    # Windows
    SET PUPPETEER_SKIP_DOWNLOAD='true'
    
  • 确保你们的终端走了代理
  • 确保你的 openai key 有余额
  • 配置好 config.js 和 .env 文件
  • 执行 npm run test 能成功拿到 openai 的回复
  • 执行 npm run dev 愉快的玩耍吧~

@ChenZhouMing
Copy link

ChenZhouMing commented Mar 7, 2024 via email

@zneats
Copy link

zneats commented May 23, 2024

Automatic robot chat mode has been activated
bot error❌: AssertionError [ERR_ASSERTION]: '1101' == 0
at Object.equal (F:\git\wechat-bot\node_modules\wechat4u\lib\util\global.js:69:24)
at F:\git\wechat-bot\node_modules\wechat4u\lib\core.js:410:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 2,
这个问题咋整

@ChenZhouMing
Copy link

ChenZhouMing commented May 23, 2024 via email

@failable
Copy link

同问

Current time:Mon May 27 2024 11:28:57 GMT+0800 (China Standard Time)
Automatic robot chat mode has been activated
bot error❌:  AssertionError [ERR_ASSERTION]: '1101' == 0
    at Object.equal (/Users/maximin/Downloads/wechat-bot/node_modules/wechat4u/lib/util/global.js:69:24)
    at /Users/maximin/Downloads/wechat-bot/node_modules/wechat4u/lib/core.js:410:24
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 2,
  details: "AssertionError [ERR_ASSERTION]: '1101' == 0\n" +
    '    at Object.equal (/Users/maximin/Downloads/wechat-bot/node_modules/wechat4u/lib/util/global.js:69:24)\n' +
    '    at /Users/maximin/Downloads/wechat-bot/node_modules/wechat4u/lib/core.js:410:24\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'

@lijinhai255
Copy link

检查 wechat4u 库的状态码解释,了解 1204 错误的具体原因。 碰到了这个问题 有人遇到吗

@lijinhai255
Copy link

16:15:01 INFO DingDongBot Message#Text[🗣Contact<🌊海>] ding
16:15:01 INFO DingDongBot Sending 'dong' reply...
16:15:01 ERR DingDongBot Error sending message:
AssertionError [ERR_ASSERTION]: 1204 == 0
at Object.equal (/Users/lijinhai/Desktop/my_project/ding-dog-bot/node_modules/wechat4u/lib/util/global.js:69:24)
at /Users/lijinhai/Desktop/my_project/ding-dog-bot/node_modules/wechat4u/lib/core.js:537:24
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PuppetWechat4u.messageSendText (file:///Users/lijinhai/Desktop/my_project/ding-dog-bot/node_modules/wechaty-puppet-wechat4u/dist/esm/src/puppet-wechat4u.js:616:9)
at async WechatifiedUserClass.say (file:///Users/lijinhai/Desktop/my_project/ding-dog-bot/node_modules/wechaty/dist/esm/src/user-modules/contact.js:274:23)
at async WechatyImpl.onMessage (file:///Users/lijinhai/Desktop/my_project/ding-dog-bot/ding-dong-bot.js:26:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 1204,
expected: 0,
operator: '==',
response: [Object],
tips: '发送文本信息失败'
}

@ChenZhouMing
Copy link

ChenZhouMing commented Nov 30, 2024 via email

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