Ubuntu上无法触发正则表达式关键词
3058132083 opened this issue · 21 comments
看看 node 版本
16.16.0
那不知道了,日志有报错么
没有报错
那真不知道为啥了😂
等等,你确定不是没部署好
被私聊和@却没有命中任何指令时的默认回复
Windows上面用的很好,但是我电脑晚上得关机,结果转到服务器上就这样了
搜图功能都正常
那不懂了……你可以试试安装 16.20.x 的 node,还是不行的话我也没遇过这种情况
那我试试
还是不行
试试看在这里上面加一句这个,看看什么毛病
console.log(global.config.bot,global.config.bot.regs.searchModeOn,context.message,new RegExp(global.config.bot.regs.searchModeOn).test(context.message))
同样Ubuntu有个问题,系统:Ubuntu 22.04.3 LTS (Jammy Jellyfish) x86_64(Py3.7.8),docker compose部署,搜图报错显示网络问题?chatgpt功能也无法使用。😥原先windows是正常使用的
1/16/2024, 6:47:43 PM [error] saucenao[0][request]
1/16/2024, 6:47:43 PM Error: Unable to connect. Is the computer able to access the url?
at AxiosError (/app/node_modules/axios/lib/core/AxiosError.js:21:4)
at <anonymous> (/app/node_modules/axios/lib/core/AxiosError.js:99:0)
at handleRequestError (/app/node_modules/axios/lib/adapters/http.js:615:13)
at <anonymous> (/app/node_modules/follow-redirects/index.js:38:1)
at <anonymous> (native)
at promiseReactionJob (native)
at processTicksAndRejections (native)
1/16/2024, 6:47:43 PM {
config: {
method: "get",
url: "https://saucenao.com/search.php",
data: undefined,
},
response: undefined,
}
1/16/2024, 6:47:46 PM [error] ascii2d
1/16/2024, 6:47:46 PM Error: Unable to connect. Is the computer able to access the url?
at AxiosError (/app/node_modules/axios/lib/core/AxiosError.js:21:4)
at <anonymous> (/app/node_modules/axios/lib/core/AxiosError.js:99:0)
at handleRequestError (/app/node_modules/axios/lib/adapters/http.js:615:13)
at <anonymous> (/app/node_modules/follow-redirects/index.js:38:1)
at <anonymous> (native)
at promiseReactionJob (native)
at processTicksAndRejections (native)
1/16/2024, 6:47:46 PM {
config: {
method: "get",
url: "https://ascii2d.net/search/url/https://gchat.qpic.cn/gchatpic_new/0/0-0-41C10B85FF31D9F88B9AD4A739773160/0",
data: undefined,
},
response: undefined,
}
chatgpt报错
509 | // remove the content-encoding in order to not confuse downstream operations
510 | delete res.headers['content-encoding'];
511 | break;
512 | case 'br':
513 | if (isBrotliSupported) {
514 | streams.push(zlib.createBrotliDecompress(brotliOptions));
^
error: zlib.createBrotliDecompress is not implemented
at node:zlib:2266:65
at handleResponse (/app/node_modules/axios/lib/adapters/http.js:514:26)
at /app/node_modules/follow-redirects/index.js:397:5
at /app/node_modules/follow-redirects/index.js:90:7
at node:http:912:29
at processTicksAndRejections (:61:77)
服务器显示 https://saucenao.com 是能访问的,https://ascii2d.net 被拒绝😥
root@katari:~/data/docker_data/cqps# curl -I https://saucenao.com
HTTP/2 200
date: Tue, 16 Jan 2024 10:59:14 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=akdvG5pkXu7BV03E91un1bybVa58MO%2FBGq6fdQ0uF%2B8IlpYMIz8WqOv9l8kQ4fRqf4phvDH%2Bf7M72uUwI5pH7z%2BtsrLentUarg%2FXWBacDhzn2I9n%2B%2F22aepM%2B3JIaQ%3D%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8465d90cac932eb5-LAX
root@katari:~/data/docker_data/cqps# curl -I https://ascii2d.net
HTTP/2 403
date: Tue, 16 Jan 2024 11:01:29 GMT
content-type: text/html; charset=UTF-8
content-length: 5968
cross-origin-embedder-policy: require-corp
cross-origin-opener-policy: same-origin
cross-origin-resource-policy: same-origin
origin-agent-cluster: ?1
permissions-policy: accelerometer=(),autoplay=(),browsing-topics=(),camera=(),clipboard-read=(),clipboard-write=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()
referrer-policy: same-origin
x-frame-options: SAMEORIGIN
cf-mitigated: challenge
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
expires: Thu, 01 Jan 1970 00:00:01 GMT
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=DRQCE9zbynd%2FVs9KqgMit86TClRZoTLQx0z3a8%2BVJJrdx5mZ1Xo3OVmnfPEP8vCWsUDsozoHQ9oBbQdD0C2jK4D89R5h1YiewJk1nUrRVM1skJkGhGFs5Nmc%2FYHo"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8465dc59e8c77ea1-LAX
alt-svc: h3=":443"; ma=86400
另外试了一下使用zerobot的搜图是可以正常使用的😥saucenao和ascii2d都正常
@jx9468 更新下镜像,改回 node 了看看是否正常,bun 坑太多
不过 ascii2d 因为有 cf 可能需要额外处理,我还没处理 docker 镜像🤔
如果 ascii2d 还有问题可参考 wiki 改配置试试,不行再说
bun
还不是很稳定吧node
的 接口 好像都还没全部兼容
是,比如上面的还不支持 Brotli 解压
主要是之前做 docker 的时候用 node 镜像发现 arm 的依赖安装巨慢,@napi-rs/canvas 走本机编译了,没有预编译的,试了试 bun 居然安装巨快1分钟不到就用了
后来发现是 node 版本的问题,node 20 就有 @napi-rs/canvas 的 arm 预编译,现在换回来了😅