Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

你好 单是uid指令报错的 是接口出错了还是其他情况呢 #338

Closed
paiky opened this issue Nov 3, 2021 · 67 comments
Closed
Labels
question Further information is requested

Comments

@paiky
Copy link

paiky commented Nov 3, 2021

image

@paiky
Copy link
Author

paiky commented Nov 3, 2021

试了几次了 也重新改绑米友社id了 不过没用

@paiky
Copy link
Author

paiky commented Nov 3, 2021

试了别人uid是可以的

@Arondight
Copy link
Owner

是最新的代码吗,好像是你这个 uid 对应的米有舍 cookie ,登录之后没有设置昵称什么的,然后 cookie 不能用,我记得最新的代码已经把这种 cookie 禁用了

@paiky
Copy link
Author

paiky commented Nov 3, 2021

不好意思我不是使用者哦 我是群友 直接过来反馈了

@Arondight
Copy link
Owner

#318 (comment)

@Arondight
Copy link
Owner

不好意思我不是使用者哦 我是群友 直接过来反馈了

那你得联系一下 bot 的主人,让他更新代码,然后 bot 报告无效 cookie 之后把对应的 cookie 换掉

@Arondight
Copy link
Owner

因为你不是 bot 持有者我先关闭了,如果有问题继续在这里回复

@paiky
Copy link
Author

paiky commented Nov 3, 2021

你好 我尝试自己部署到服务器 请问要怎样引入到群里面呢

@Arondight
Copy link
Owner

你好 我尝试自己部署到服务器 请问要怎样引入到群里面呢

登 bot 加,我没写指令加群

@paiky
Copy link
Author

paiky commented Nov 3, 2021

是需要npm run login指令吗 我在linux运行这个指令会出错

@Arondight
Copy link
Owner

是需要npm run login指令吗 我在linux运行这个指令会出错

bot 起来后,手机上 bot 的qq 号加群

@paiky
Copy link
Author

paiky commented Nov 3, 2021

原先已经在的群不生效吗 要重新入群的?

@paiky
Copy link
Author

paiky commented Nov 3, 2021

然后我还想问下 cookie文件需要添加cookie吗 以及需要登录后的cookie还是不用登录后呢

@Arondight
Copy link
Owner

原先已经在的群不生效吗 要重新入群的?

不需要

然后我还想问下 cookie文件需要添加cookie吗 以及需要登录后的cookie还是不用登录后呢

需要,具体看 #120

@Arondight Arondight added the question Further information is requested label Nov 3, 2021
@paiky
Copy link
Author

paiky commented Nov 3, 2021

我现在也换成带有token的cookie保存在文件中了,setting文件中的type设置为1(安卓手机),返回根目录重启机器人后显示online状态,然后qq在群里需要打什么指令触发机器人呢,我发送help没有什么反应哦

@paiky
Copy link
Author

paiky commented Nov 3, 2021

登录bot是怎样的形式呢QAQ

@Arondight
Copy link
Owner

后台日志发一下

@paiky
Copy link
Author

paiky commented Nov 3, 2021

[root@VM-4-12-centos Adachi-BOT]# npm run log

> [email protected] log
> npx cross-env-shell PM2_HOME=$INIT_CWD/bot.pm2/ pm2 log --lines 100 bot

[TAILING] Tailing last 100 lines for [bot] process (change the value with --lines option)
/root/Adachi-BOT/bot.pm2/logs/bot-error.log last 100 lines:
0|bot      | (node:8633) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
0|bot      | (Use `node --trace-warnings ...` to show where the warning was created)
0|bot      | Error: Failed to launch the browser process!
0|bot      | /root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
0|bot      | 
0|bot      | 
0|bot      | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
0|bot      | 
0|bot      |     at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
0|bot      |     at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
0|bot      |     at Interface.emit (node:events:402:35)
0|bot      |     at Interface.close (node:readline:586:8)
0|bot      |     at Socket.onend (node:readline:277:10)
0|bot      |     at Socket.emit (node:events:402:35)
0|bot      |     at endReadableNT (node:internal/streams/readable:1343:12)
0|bot      |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
0|bot      | (node:11025) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
0|bot      | (Use `node --trace-warnings ...` to show where the warning was created)
0|bot      | Error: Failed to launch the browser process!
0|bot      | /root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
0|bot      | 
0|bot      | 
0|bot      | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
0|bot      | 
0|bot      |     at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
0|bot      |     at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
0|bot      |     at Interface.emit (node:events:402:35)
0|bot      |     at Interface.close (node:readline:586:8)
0|bot      |     at Socket.onend (node:readline:277:10)
0|bot      |     at Socket.emit (node:events:402:35)
0|bot      |     at endReadableNT (node:internal/streams/readable:1343:12)
0|bot      |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
0|bot      | (node:15853) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
0|bot      | (Use `node --trace-warnings ...` to show where the warning was created)
0|bot      | Error: Failed to launch the browser process!
0|bot      | /root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
0|bot      | 
0|bot      | 
0|bot      | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
0|bot      | 
0|bot      |     at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
0|bot      |     at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
0|bot      |     at Interface.emit (node:events:402:35)
0|bot      |     at Interface.close (node:readline:586:8)
0|bot      |     at Socket.onend (node:readline:277:10)
0|bot      |     at Socket.emit (node:events:402:35)
0|bot      |     at endReadableNT (node:internal/streams/readable:1343:12)
0|bot      |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
0|bot      | (node:16262) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
0|bot      | (Use `node --trace-warnings ...` to show where the warning was created)
0|bot      | Error: Failed to launch the browser process!
0|bot      | /root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
0|bot      | 
0|bot      | 
0|bot      | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
0|bot      | 
0|bot      |     at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
0|bot      |     at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
0|bot      |     at Interface.emit (node:events:402:35)
0|bot      |     at Interface.close (node:readline:586:8)
0|bot      |     at Socket.onend (node:readline:277:10)
0|bot      |     at Socket.emit (node:events:402:35)
0|bot      |     at endReadableNT (node:internal/streams/readable:1343:12)
0|bot      |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
0|bot      | (node:20640) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
0|bot      | (Use `node --trace-warnings ...` to show where the warning was created)
0|bot      | Error: Failed to launch the browser process!
0|bot      | /root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
0|bot      | 
0|bot      | 
0|bot      | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
0|bot      | 
0|bot      |     at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
0|bot      |     at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
0|bot      |     at Interface.emit (node:events:402:35)
0|bot      |     at Interface.close (node:readline:586:8)
0|bot      |     at Socket.onend (node:readline:277:10)
0|bot      |     at Socket.emit (node:events:402:35)
0|bot      |     at endReadableNT (node:internal/streams/readable:1343:12)
0|bot      |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
0|bot      | (node:24595) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
0|bot      | (Use `node --trace-warnings ...` to show where the warning was created)
0|bot      | Error: Failed to launch the browser process!
0|bot      | /root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
0|bot      | 
0|bot      | 
0|bot      | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
0|bot      | 
0|bot      |     at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
0|bot      |     at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
0|bot      |     at Interface.emit (node:events:402:35)
0|bot      |     at Interface.close (node:readline:586:8)
0|bot      |     at Socket.onend (node:readline:277:10)
0|bot      |     at Socket.emit (node:events:402:35)
0|bot      |     at endReadableNT (node:internal/streams/readable:1343:12)
0|bot      |     at processTicksAndRejections (node:internal/process/task_queues:83:21)

/root/Adachi-BOT/bot.pm2/logs/bot-out.log last 100 lines:
0|bot      | [2021-11-03T09:09:40.620] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T09:09:40.622] [MARK] [iPad:1431806554] - Package Version: [email protected] (Released on 2021/10/10)
0|bot      | [2021-11-03T09:09:40.622] [MARK] [iPad:1431806554] - View Changelogs:https://github.com/takayama-lily/oicq/releases
0|bot      | [2021-11-03T09:09:40.622] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T09:09:40.622] [MARK] [iPad:1431806554] - 创建了新的设备文件:/root/Adachi-BOT/node_modules/pm2/lib/data/1431806554/device-1431806554.json
0|bot      | [2021-11-03T09:09:40.630] [MARK] [iPad:1431806554] - 正在探索可用服务器...
0|bot      | [2021-11-03T09:09:40.813] [DEBUG] [iPad:1431806554] - {
0|bot      |   '106.55.91.108': 8080,
0|bot      |   '42.81.170.51': 14000,
0|bot      |   '180.102.111.105': 8080
0|bot      | }
0|bot      | [2021-11-03T09:09:40.829] [MARK] [iPad:1431806554] - connecting to 106.55.91.108:8080
0|bot      | [2021-11-03T09:09:40.866] [MARK] [iPad:1431806554] - 106.55.91.108:8080 connected
0|bot      | [2021-11-03T09:09:41.013] [MARK] [iPad:1431806554] - 收到滑动验证码,请访问以下地址完成滑动,并从网络响应中取出ticket输入:https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=1431806554&sid=5536069978387767636&cap_cd=oFLV8MZGhkAa94kuo3fNo4hPgeOd9id0Uhh9fFUusrsjiOa5VokqZA**&clientype=1&apptype=2
0|bot      | [2021-11-03T09:17:51.737] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T09:17:51.739] [MARK] [iPad:1431806554] - Package Version: [email protected] (Released on 2021/10/10)
0|bot      | [2021-11-03T09:17:51.739] [MARK] [iPad:1431806554] - View Changelogs:https://github.com/takayama-lily/oicq/releases
0|bot      | [2021-11-03T09:17:51.739] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T09:17:51.742] [MARK] [iPad:1431806554] - 正在探索可用服务器...
0|bot      | [2021-11-03T09:17:51.906] [DEBUG] [iPad:1431806554] - {
0|bot      |   '109.244.128.238': 8080,
0|bot      |   '42.81.172.147': 14000,
0|bot      |   '180.109.192.45': 8080
0|bot      | }
0|bot      | [2021-11-03T09:17:51.906] [MARK] [iPad:1431806554] - connecting to 109.244.128.238:8080
0|bot      | [2021-11-03T09:17:51.935] [MARK] [iPad:1431806554] - 109.244.128.238:8080 connected
0|bot      | [2021-11-03T09:17:52.062] [MARK] [iPad:1431806554] - 收到滑动验证码,请访问以下地址完成滑动,并从网络响应中取出ticket输入:https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=1431806554&sid=6118262398907441983&cap_cd=1qwSXoPcPkiGorqjfsMgOwfCVAk1WbF0IyHJyymutry2RSs3t9yZQA**&clientype=1&apptype=2
0|bot      | [2021-11-03T09:32:52.093] [ERROR] [iPad:1431806554] - read ECONNRESET
0|bot      | [2021-11-03T09:32:52.093] [MARK] [iPad:1431806554] - 109.244.128.238:8080 closed
0|bot      | [2021-11-03T09:34:24.769] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T09:34:24.770] [MARK] [iPad:1431806554] - Package Version: [email protected] (Released on 2021/10/10)
0|bot      | [2021-11-03T09:34:24.771] [MARK] [iPad:1431806554] - View Changelogs:https://github.com/takayama-lily/oicq/releases
0|bot      | [2021-11-03T09:34:24.771] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T09:34:24.773] [MARK] [iPad:1431806554] - 正在探索可用服务器...
0|bot      | [2021-11-03T09:34:24.921] [DEBUG] [iPad:1431806554] - {
0|bot      |   '109.244.128.48': 8080,
0|bot      |   '42.81.184.101': 14000,
0|bot      |   '180.109.192.45': 8080
0|bot      | }
0|bot      | [2021-11-03T09:34:24.921] [MARK] [iPad:1431806554] - connecting to 109.244.128.48:8080
0|bot      | [2021-11-03T09:34:24.953] [MARK] [iPad:1431806554] - 109.244.128.48:8080 connected
0|bot      | [2021-11-03T09:34:25.044] [MARK] [iPad:1431806554] - 收到滑动验证码,请访问以下地址完成滑动,并从网络响应中取出ticket输入:https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=1431806554&sid=2090329811158427424&cap_cd=v9CinuEinBO58OPONkZhNjYoe2vqUDT2WRV7bZZrd2tHoI2qQ65f9Q**&clientype=1&apptype=2
0|bot      | [2021-11-03T09:35:17.325] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T09:35:17.327] [MARK] [iPad:1431806554] - Package Version: [email protected] (Released on 2021/10/10)
0|bot      | [2021-11-03T09:35:17.327] [MARK] [iPad:1431806554] - View Changelogs:https://github.com/takayama-lily/oicq/releases
0|bot      | [2021-11-03T09:35:17.327] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T09:35:17.334] [MARK] [iPad:1431806554] - 正在探索可用服务器...
0|bot      | [2021-11-03T09:35:17.528] [DEBUG] [iPad:1431806554] - {
0|bot      |   '109.244.129.90': 8080,
0|bot      |   '42.81.193.250': 14000,
0|bot      |   '114.221.148.67': 8080
0|bot      | }
0|bot      | [2021-11-03T09:35:17.529] [MARK] [iPad:1431806554] - connecting to 109.244.129.90:8080
0|bot      | [2021-11-03T09:35:17.558] [MARK] [iPad:1431806554] - 109.244.129.90:8080 connected
0|bot      | [2021-11-03T09:35:17.683] [MARK] [iPad:1431806554] - 收到滑动验证码,请访问以下地址完成滑动,并从网络响应中取出ticket输入:https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=1431806554&sid=3494665026097243989&cap_cd=LivshUjDevGjXtyIThRofa_CTx1R7SnzCM1HljariJNuavUc5DWNQQ**&clientype=1&apptype=2
0|bot      | [2021-11-03T09:50:17.713] [ERROR] [iPad:1431806554] - read ECONNRESET
0|bot      | [2021-11-03T09:50:17.714] [MARK] [iPad:1431806554] - 109.244.129.90:8080 closed
0|bot      | [2021-11-03T09:50:29.855] [MARK] [Android:1431806554] - ----------
0|bot      | [2021-11-03T09:50:29.866] [MARK] [Android:1431806554] - Package Version: [email protected] (Released on 2021/10/10)
0|bot      | [2021-11-03T09:50:29.866] [MARK] [Android:1431806554] - View Changelogs:https://github.com/takayama-lily/oicq/releases
0|bot      | [2021-11-03T09:50:29.866] [MARK] [Android:1431806554] - ----------
0|bot      | [2021-11-03T09:50:29.868] [MARK] [Android:1431806554] - 正在探索可用服务器...
0|bot      | [2021-11-03T09:50:30.031] [DEBUG] [Android:1431806554] - {
0|bot      |   '109.244.129.248': 8080,
0|bot      |   '42.81.192.232': 14000,
0|bot      |   '180.109.192.45': 8080
0|bot      | }
0|bot      | [2021-11-03T09:50:30.032] [MARK] [Android:1431806554] - connecting to 109.244.129.248:8080
0|bot      | [2021-11-03T09:50:30.064] [MARK] [Android:1431806554] - 109.244.129.248:8080 connected
0|bot      | [2021-11-03T09:50:30.172] [MARK] [Android:1431806554] - 收到滑动验证码,请访问以下地址完成滑动,并从网络响应中取出ticket输入:https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=1431806554&sid=7413743978421545702&cap_cd=fTmOCFc4iSPYKs6TAq7m17n2yAuxtYv4V2tIJJAlYeA_oxyLxi4-hA**&clientype=1&apptype=2
0|bot      | [2021-11-03T10:04:36.295] [MARK] [Android:1431806554] - ----------
0|bot      | [2021-11-03T10:04:36.296] [MARK] [Android:1431806554] - Package Version: [email protected] (Released on 2021/10/10)
0|bot      | [2021-11-03T10:04:36.297] [MARK] [Android:1431806554] - View Changelogs:https://github.com/takayama-lily/oicq/releases
0|bot      | [2021-11-03T10:04:36.297] [MARK] [Android:1431806554] - ----------
0|bot      | [2021-11-03T10:04:36.299] [MARK] [Android:1431806554] - 正在探索可用服务器...
0|bot      | [2021-11-03T10:04:36.423] [DEBUG] [Android:1431806554] - {
0|bot      |   '109.244.129.242': 8080,
0|bot      |   '101.91.37.242': 8080,
0|bot      |   '42.81.176.211': 14000
0|bot      | }
0|bot      | [2021-11-03T10:04:36.424] [MARK] [Android:1431806554] - connecting to 109.244.129.242:8080
0|bot      | [2021-11-03T10:04:36.451] [MARK] [Android:1431806554] - 109.244.129.242:8080 connected
0|bot      | [2021-11-03T10:04:36.588] [MARK] [Android:1431806554] - 收到滑动验证码,请访问以下地址完成滑动,并从网络响应中取出ticket输入:https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=1431806554&sid=2435557822122028596&cap_cd=hTyfpQteDqYJEDBjWThOhWOZkb6uN1zwjmmRUaMMbnvPRUVjs2FywQ**&clientype=1&apptype=2

@Arondight
Copy link
Owner

  1. 你需要安装一个无头 chrome ,详见这里的隐藏部分
  2. 你需要完成 QQ 新设备认证,详见 如何获得滑动验证码 ticket #310

@paiky
Copy link
Author

paiky commented Nov 3, 2021

“随后粘贴 ticket 文本到终端,按下回车键。” 这一步是什么意思呢 我拿到ticket之后如何操作

@mark9804
Copy link
Collaborator

mark9804 commented Nov 3, 2021

@Arondight 辛苦了,我来回答吧

@paiky
Copy link
Author

paiky commented Nov 3, 2021

实在不好意思

@mark9804
Copy link
Collaborator

mark9804 commented Nov 3, 2021

因为QQ异常登录要过一个滑块验证码(就是有时候你会见到很多网页都有一个滑动拼图对到正确位置上的那个),如果你不解决的话不能登录。

当完成滑动之后,QQ的后台网页会向QQ服务器发送一个ticket声明验证通过,我们需要做的就是拿到它,伪装我们是合法的QQ客户端来通过验证。

看起来是你已经拿到ticket了,就直接把你拿到的文本粘贴到正在运行bot的黑窗口当中,然后按下回车提交,bot会处理后续的登录问题。

如果你还没拿到ticket,并且有一部安卓手机,可以下载 滑动验证助手 来完成验证,这对于不了解前端调试操作的人来说更友好

@mark9804
Copy link
Collaborator

mark9804 commented Nov 3, 2021

因为距离上一个验证码已经过了一段时间,可能这个滑动验证码已经失效了,需要重新拿一次ticket

如果你刚刚启动bot的命令是npm run init,可以用ctrl+c来停止当前bot的运行。在这之后,再使用npm run init重新运行bot;
如果你刚刚启动bot的命令是npm run start,则需要输入npm run stop来停止后台bot的运行。因为是第一次操作,所以我建议使用npm run init来及时获取bot的反馈。

另外,QQ出现异地登录的情况(或者QQ小号等级太低)会每隔三四个小时被风控系统踢下线,这个状况根据经验一般在一两天之后消失,所以前两天的时候需要经常留意一下

@paiky
Copy link
Author

paiky commented Nov 3, 2021

感谢耐心回复。原来是我在init这一步出错了,直接跳出来。具体可能会是什么问题呢?
[root@VM-4-12-centos Adachi-BOT]# npm run init

[email protected] init
npx node ./app.js

[2021-11-03T10:36:01.434] [MARK] [Android:1431806554] - ----------
[2021-11-03T10:36:01.436] [MARK] [Android:1431806554] - Package Version: [email protected] (Released on 2021/10/10)
[2021-11-03T10:36:01.436] [MARK] [Android:1431806554] - View Changelogs:https://github.com/takayama-lily/oicq/releases
[2021-11-03T10:36:01.436] [MARK] [Android:1431806554] - ----------
[2021-11-03T10:36:01.438] [MARK] [Android:1431806554] - 正在探索可用服务器...
(node:1281) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
node:events:368
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE: address already in use 127.0.0.1:9934
at Server.setupListenHandle [as _listen2] (node:net:1334:16)
at listenInCluster (node:net:1382:12)
at GetAddrInfoReqWrap.doListen [as callback] (node:net:1520:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1361:8)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'EADDRINUSE',
errno: -98,
syscall: 'listen',
address: '127.0.0.1',
port: 9934
}

@mark9804
Copy link
Collaborator

mark9804 commented Nov 3, 2021

Error: listen EADDRINUSE: address already in use 127.0.0.1:9934

这个代表你的后台还有一个bot正在运行

跟前面一样,
如果你刚刚启动bot的命令是npm run init,可以用ctrl+c来停止当前bot的运行;
如果你刚刚启动bot的命令是npm run start,则需要输入npm run stop来停止后台bot的运行

完成之后,使用npm run list看一下返回结果,是不是bot的状态被标记为 stop 。

当后台没有另一个bot抢占9934端口时,就可以正常使用了

@paiky
Copy link
Author

paiky commented Nov 3, 2021

哇,感谢正确指引!init成功了,和第一次的init有明显区别,不过显示禁止登录了QAQ
[禁止登录]当前上网环境异常,请更换网络环境或在常用设备上登录或稍后再试。(错误码:237)

@paiky
Copy link
Author

paiky commented Nov 3, 2021

我试试别的qq号码 这个号码不是很常用 感谢!

@paiky
Copy link
Author

paiky commented Nov 3, 2021

image

@mark9804
Copy link
Collaborator

mark9804 commented Nov 3, 2021

其他的指令有响应吗?

@paiky
Copy link
Author

paiky commented Nov 3, 2021

没有响应,而且这个日志输出很快

0|bot  | [2021-11-03T18:10:24.957] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 武器 暗铁剑
0|bot  | [2021-11-03T18:10:56.674] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 米游社
0|bot  | [2021-11-03T18:11:09.787] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 绑定
0|bot  | [2021-11-03T18:11:11.694] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] help

@Arondight
Copy link
Owner

你再贴一个 bot 启动的日志

@Arondight
Copy link
Owner

无头浏览器少了个库文件的问题解决了么

@paiky
Copy link
Author

paiky commented Nov 3, 2021

0|bot      | [2021-11-03T17:34:28.533] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T17:34:28.539] [MARK] [iPad:1431806554] - Package Version: oicq@1.21.2 (Released on 2021/10/10)
0|bot      | [2021-11-03T17:34:28.540] [MARK] [iPad:1431806554] - View Changelogshttps://github.com/takayama-lily/oicq/releases
0|bot      | [2021-11-03T17:34:28.540] [MARK] [iPad:1431806554] - ----------
0|bot      | [2021-11-03T17:34:28.542] [MARK] [iPad:1431806554] - 正在探索可用服务器...
0|bot      | [2021-11-03T17:34:28.766] [DEBUG] [iPad:1431806554] - {
0|bot      |   '109.244.129.25': 8080,
0|bot      |   '101.91.37.242': 8080,
0|bot      |   '221.238.41.89': 14000
0|bot      | }
0|bot      | [2021-11-03T17:34:28.767] [MARK] [iPad:1431806554] - connecting to 109.244.129.25:8080
0|bot      | [2021-11-03T17:34:28.795] [MARK] [iPad:1431806554] - 109.244.129.25:8080 connected
0|bot      | [2021-11-03T17:34:29.057] [MARK] [iPad:1431806554] - Welcome, 米游姬 ! 初始化资源...
0|bot      | [2021-11-03T17:34:29.304] [MARK] [iPad:1431806554] - 加载了4个好友3个群1个陌生人0|bot      | [2021-11-03T17:34:29.397] [MARK] [iPad:1431806554] - 初始化完毕开始处理消息0|bot      | [2021-11-03T17:34:50.960] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 角色 公子

0|bot  | [2021-11-03T17:35:23.519] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 角色 公子
0|bot  | [2021-11-03T17:50:35.790] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 角色 公子
0|bot  | [2021-11-03T18:04:43.486] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 角色 甘雨
0|bot  | [2021-11-03T18:10:01.391] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] uid 107978679
0|bot  | [2021-11-03T18:10:24.957] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 武器 暗铁剑
0|bot  | [2021-11-03T18:10:56.674] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 米游社
0|bot  | [2021-11-03T18:11:09.787] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] 绑定
0|bot  | [2021-11-03T18:11:11.694] [INFO] [iPad:1431806554] - recv from: [Group: Mac(127689237), Member: 无憾(2859431743)] help

@Arondight
Copy link
Owner

日志上看不到任何配置读入和插件加载,自己查一下吧,应该是你本地删东西了

@paiky
Copy link
Author

paiky commented Nov 3, 2021

好像没做任何配置改动哦。。 init初始化的话就可以跑起来

@Arondight
Copy link
Owner

git status 看一下

@paiky
Copy link
Author

paiky commented Nov 3, 2021

git status? 是run list吗?

[root@VM-4-12-centos Adachi-BOT]# npm run list

> Adachi-BOT@1.5.0 list
> npx cross-env-shell PM2_HOME=$INIT_CWD/bot.pm2/ pm2 list bot

┌─────┬────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ idnamenamespaceversionmodepiduptime │ ↺    │ statuscpumemuserwatching │
├─────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0botdefault1.5.0fork1983145m5online0%       │ 51.9mbrootdisabled │
└─────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

@Arondight
Copy link
Owner

输入 git status 然后按下回车键

1 similar comment
@Arondight
Copy link
Owner

输入 git status 然后按下回车键

@paiky
Copy link
Author

paiky commented Nov 3, 2021

[root@VM-4-12-centos Adachi-BOT]# git status
# On branch master
nothing to commit, working directory clean

@Arondight
Copy link
Owner

那你的日志或许没贴全,npm run log 看一下插件加载是否成功,配置读取是否正常,然后把你无头浏览器少库的问题解决掉

@Arondight
Copy link
Owner

无头浏览器少库

我觉得这个应当在文档里提及一下,虽然这不是项目的问题,系统管理员需要对自己的系统负责,但是毕竟影响到了项目的正常运行

@paiky
Copy link
Author

paiky commented Nov 3, 2021

[root@VM-4-12-centos Adachi-BOT]# npm run start

> [email protected] start
> npx cross-env-shell PM2_HOME=$INIT_CWD/bot.pm2/ pm2 start ./app.js --name bot; npx cross-env-shell PM2_HOME=$INIT_CWD/bot.pm2/ pm2 save

[PM2] Applying action restartProcessId on app [bot](ids: [ 0 ])
[PM2] [bot](0) ✓
[PM2] Process successfully started
┌─────┬────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id  │ name   │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├─────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0   │ bot    │ default     │ 1.5.0   │ fork    │ 2340     │ 0s     │ 5    │ online    │ 0%       │ 3.3mb    │ root     │ disabled │
└─────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2] Saving current process list...
[PM2] Successfully saved in /root/Adachi-BOT/bot.pm2/dump.pm2

@paiky
Copy link
Author

paiky commented Nov 3, 2021

好的 谢谢回复

@Arondight
Copy link
Owner

或者你把你的ip和密码发到我邮箱,我给你看一下,我看你都搞了一天了,搞完了你再改个密码

@mark9804
Copy link
Collaborator

mark9804 commented Nov 3, 2021

有没有可能是不能以root用户执行?

@Arondight
Copy link
Owner

有没有可能是不能以root用户执行?

我所有的环境都是 root 跑的

@mark9804
Copy link
Collaborator

mark9804 commented Nov 3, 2021

那怕是得实际环境看看了,我觉得之后我们可以把一些问题汇总一下写成FAQ,然后pin上issue页面,降低重复劳动量,然后建一个issue模板。模板里面说明先在FAQ里面寻找解决方式

@paiky
Copy link
Author

paiky commented Nov 3, 2021

实在不好意思 不打扰各位大佬了 我太菜了 周末我再重新配一下 😢

@Arondight
Copy link
Owner

我们可以把一些问题汇总一下

我个人总是有一种执念,就是 Linux 用户应当完全掌握他的系统并且清楚的知道做了什么和要做什么,所以我写过 windows 下很详尽的部署方法,但是写不出 Linux 的,我总觉得不应该去写这些东西,因为他们是 Linux 用户,而 Linux 用户不需要别人对他的操作方式指手画脚

@Arondight
Copy link
Owner

周末我再重新配一下

既然你用的 centos ,建议完全粘贴复制我的命令,使用系统自带 chrome ,包管理器会为你解决一切依赖问题

@paiky
Copy link
Author

paiky commented Nov 3, 2021

向您学习 👍

周末我再重新配一下

既然你用的 centos ,建议完全粘贴复制我的命令,使用系统自带 chrome ,包管理器会为你解决一切依赖问题

其实我基本都是按文档复制粘贴的 😄

@mark9804
Copy link
Collaborator

mark9804 commented Nov 3, 2021

我总觉得不应该去写这些东西,因为他们是 Linux 用户,而 Linux 用户不需要别人对他的操作方式指手画脚

要不然折中一下,我在我的fork建一个wiki,提供linux环境下的建议

@Arondight
Copy link
Owner

实在搞不定了可以给我一个账户密码,测试需要我已经在 centos 上部署过上百次了

@Arondight
Copy link
Owner

要不然折中一下,我在我的fork建一个wiki,提供linux环境下的建议

要不然你开一个 issue 记录一下吧,类似于《Linux环境部署常见问题》这种

@Arondight
Copy link
Owner

这种问题,例如缺失了两个库,那么主流发型版 rpm 系, deb 系, arch 和 gentoo ,基本上都得写一下,那工作量就是 2x4 ,我们完全是无报酬做项目,我个人觉得这些理应是系统管理员基础技能的东西不需要我们去写的

@Arondight
Copy link
Owner

@mark9804 我更新了文档中的步骤,现在清晰了一些

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants