dqzboy / ChatGPT-Proxy

ChatGPT Proxy Project:一键部署 go-chatgpt-api 和 ninja 逆向工程
https://t.me/dqzboyblog
422 stars 76 forks source link

docker logs -f chatgpt-proxy-server 日志报错 #10

Closed weikecloud closed 1 year ago

weikecloud commented 1 year ago

[1682506097.520][INFO]: Waiting for pending navigations... [1682506097.521][INFO]: Done waiting for pending navigations. Status: ok [1682506097.527][INFO]: Waiting for pending navigations... [1682506097.528][INFO]: Done waiting for pending navigations. Status: ok [1682506097.528][INFO]: [26af0cce2ddd8b663fef9104a4765fcd] RESPONSE FindElement ERROR no such element: Unable to locate element: {"method":"css selector","selector":"input"} (Session info: chrome=112.0.5615.121) [1682506097.631][INFO]: [26af0cce2ddd8b663fef9104a4765fcd] COMMAND GetTitle { } [1682506097.631][INFO]: Waiting for pending navigations... [1682506097.633][INFO]: Done waiting for pending navigations. Status: ok [1682506097.636][INFO]: Waiting for pending navigations... [1682506097.638][INFO]: Done waiting for pending navigations. Status: ok [1682506097.638][INFO]: [26af0cce2ddd8b663fef9104a4765fcd] RESPONSE GetTitle "" [1682506097.639][INFO]: [26af0cce2ddd8b663fef9104a4765fcd] COMMAND FindElement { "using": "css selector", "value": "input" }

dqzboy commented 1 year ago

删除原来镜像 重新下载运行

weikecloud commented 1 year ago

还是提示这个错误,但是我执行docker logs -f go-chatgpt-api 返回的是 INFO[0025] Welcome to ChatGPT ,我运行项目的时候返回 request to http://127.0.0.1:9090/conversation failed, reason: socket hang up, 我把端口改为9090

dqzboy commented 1 year ago

宿主机映射端口也是9090吗?

dqzboy commented 1 year ago

chatgpt-web是容器启动的 就不能使用127.0.0.1端口

weikecloud commented 1 year ago

宿主机映射端口也是9090,chatgpt-web是直接本地运行

dqzboy commented 1 year ago

那就本地去请求下 http://127.0.0.1:9090/conversation 看下有没有输出

weikecloud commented 1 year ago

我刚删除了镜像,重新运行,发现执行 docker logs -f go-chatgpt-api 不返回信息了

dqzboy commented 1 year ago

需要等待初始化,详细使用看下文档

weikecloud commented 1 year ago

第一次删除镜像重新运行的时候很快返回Welcome to ChatGPT,现在等了很久都没返回,是不是IP问题?

dqzboy commented 1 year ago

看下server启动正常不 需要先启动server后启动api

weikecloud commented 1 year ago

service启动的时候一直返回 [1682510915.457][INFO]: Waiting for pending navigations... [1682510915.458][INFO]: Done waiting for pending navigations. Status: ok [1682510915.465][INFO]: Waiting for pending navigations... [1682510915.466][INFO]: Done waiting for pending navigations. Status: ok [1682510915.466][INFO]: [0135ca7be32b71e19f6285041d20352c] RESPONSE FindElement ERROR no such element: Unable to locate element: {"method":"css selector","selector":"input"} (Session info: chrome=112.0.5615.121)

dqzboy commented 1 year ago

服务器啥规格

weikecloud commented 1 year ago

我是本地mac搭建的

dqzboy commented 1 year ago

arm架构?

weikecloud commented 1 year ago

2.6 GHz 六核Intel Core i7

dqzboy commented 1 year ago

那有可能是程序问题吧 我没遇到

weikecloud commented 1 year ago

你是直接用服务器部署?

weikecloud commented 1 year ago

我终于知道为什么会报这个错,但不知道如何解决,单独运行server确实能返回success,再运行api就疯狂报这个错误 ERROR no such element: Unable to locate element: {"method":"css selector","selector":"input"} (Session info: chrome=112.0.5615.121)

dqzboy commented 1 year ago

有可能是因为你chrome无法运行吧

weikecloud commented 1 year ago

你用的什么国家的服务器?有推荐吗?

dqzboy commented 1 year ago

我用的国内服务器,使用的机场

weikecloud commented 1 year ago

就是你文档里面推荐的机场?

dqzboy commented 1 year ago

是的

weikecloud commented 1 year ago

我用了国内服务器,并且使用机场,搭建完后一直循环打印这个日志 [1682521632.038][INFO]: Waiting for pending navigations... [1682521632.039][INFO]: Done waiting for pending navigations. Status: ok [1682521632.044][INFO]: Waiting for pending navigations... [1682521632.044][INFO]: Done waiting for pending navigations. Status: ok [1682521632.044][INFO]: [58bb5649cde85e18e1d5aab55a42e2f8] RESPONSE ExecuteScript ERROR javascript error: conversationMap is not defined (Session info: chrome=112.0.5615.121) [1682521632.045][INFO]: [58bb5649cde85e18e1d5aab55a42e2f8] COMMAND ExecuteScript { "args": [ ], "script": "return conversationMap.get('c1ace01e-3ce1-4f31-ada1-046f75042932');" } [1682521632.045][INFO]: Waiting for pending navigations... [1682521632.045][INFO]: Done waiting for pending navigations. Status: ok

kwingart commented 1 year ago

我用了国内服务器,并且使用机场,搭建完后一直循环打印这个日志 [1682521632.038][INFO]: Waiting for pending navigations... [1682521632.039][INFO]: Done waiting for pending navigations. Status: ok [1682521632.044][INFO]: Waiting for pending navigations... [1682521632.044][INFO]: Done waiting for pending navigations. Status: ok [1682521632.044][INFO]: [58bb5649cde85e18e1d5aab55a42e2f8] RESPONSE ExecuteScript ERROR javascript error: conversationMap is not defined (Session info: chrome=112.0.5615.121) [1682521632.045][INFO]: [58bb5649cde85e18e1d5aab55a42e2f8] COMMAND ExecuteScript { "args": [ ], "script": "return conversationMap.get('c1ace01e-3ce1-4f31-ada1-046f75042932');" } [1682521632.045][INFO]: Waiting for pending navigations... [1682521632.045][INFO]: Done waiting for pending navigations. Status: ok

跟你一样,我也是用的国内vps,搭建了clash代理, 我用curl -x http://127.0.0.1:7890 https://chat.openai.com 测试了,我的机场是可以访问openai网页的

[root@VM-20-12-centos clash]# curl -x http://127.0.0.1:7890 https://chat.openai.com

Please stand by, while we are checking your browser...

dqzboy commented 1 year ago

到项目作者那边问一下,有可能最近更新了版本

kwingart commented 1 year ago

后面会有这样的报错 chatgpt-proxy-server | [1682525673.841][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.842][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.849][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.850][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.850][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE FindElement ERROR no such element: Unable to locate element: {"method":"class name","selector":"cf-error-details"} chatgpt-proxy-server | (Session info: chrome=112.0.5615.121) chatgpt-proxy-server | [1682525673.851][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetTitle { chatgpt-proxy-server | } chatgpt-proxy-server | [1682525673.851][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.851][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.852][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.853][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.853][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE GetTitle "chat.openai.com" chatgpt-proxy-server | [1682525673.854][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetActiveElement { chatgpt-proxy-server | } chatgpt-proxy-server | [1682525673.854][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.854][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.856][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.856][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.856][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE GetActiveElement { chatgpt-proxy-server | "ELEMENT": "0.834184924500244-1" chatgpt-proxy-server | } chatgpt-proxy-server | [1682525673.857][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetElementText { chatgpt-proxy-server | "id": "0.834184924500244-1" chatgpt-proxy-server | } chatgpt-proxy-server | [1682525673.857][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.858][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.875][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.876][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.876][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE GetElementText "No internet\nThere is something wrong with the proxy server, or the address is incorrect.\nTry:\nContacting the system admin\nChecking the proxy address\nERR_PROXY_CONNECTION_FAILED\nDetails" chatgpt-proxy-server | [1682525673.977][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetTitle { chatgpt-proxy-server | } chatgpt-proxy-server | [1682525673.977][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.978][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.979][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.980][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.980][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE GetTitle "chat.openai.com" chatgpt-proxy-server | [1682525673.980][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetActiveElement { chatgpt-proxy-server | } chatgpt-proxy-server | [1682525673.980][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.981][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.982][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.983][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.983][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE GetActiveElement { chatgpt-proxy-server | "ELEMENT": "0.834184924500244-1" chatgpt-proxy-server | } chatgpt-proxy-server | [1682525673.983][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetElementText { chatgpt-proxy-server | "id": "0.834184924500244-1" chatgpt-proxy-server | } chatgpt-proxy-server | [1682525673.983][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.984][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.995][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525673.996][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525673.996][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE GetElementText "No internet\nThere is something wrong with the proxy server, or the address is incorrect.\nTry:\nContacting the system admin\nChecking the proxy address\nERR_PROXY_CONNECTION_FAILED\nDetails" chatgpt-proxy-server | [1682525674.097][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetTitle { chatgpt-proxy-server | } chatgpt-proxy-server | [1682525674.097][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525674.098][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525674.099][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525674.100][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525674.100][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE GetTitle "chat.openai.com" chatgpt-proxy-server | [1682525674.100][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetActiveElement { chatgpt-proxy-server | } chatgpt-proxy-server | [1682525674.100][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525674.101][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525674.102][INFO]: Waiting for pending navigations... chatgpt-proxy-server | [1682525674.103][INFO]: Done waiting for pending navigations. Status: ok chatgpt-proxy-server | [1682525674.103][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] RESPONSE GetActiveElement { chatgpt-proxy-server | "ELEMENT": "0.834184924500244-1" chatgpt-proxy-server | } chatgpt-proxy-server | [1682525674.103][INFO]: [813e88ed0ee2b2b0b9de8efbfab744a5] COMMAND GetElementText { chatgpt-proxy-server | "id": "0.834184924500244-1"

dqzboy commented 1 year ago

应该是代码问题,我看作者代码刚更新了,晚一点获取下最新镜像

weikecloud commented 1 year ago

成功了

kwingart commented 1 year ago

go-chatgpt-api我也成功了, go-chatgpt-api | INFO[0012] Welcome to ChatGPT chatgpt-proxy-server | [1682555989.587][INFO]: [b8f91aa06537d6526d840b389c69bda2] COMMAND ExecuteScript { chatgpt-proxy-server | "args": [ ], chatgpt-proxy-server | "script": "open('https://chat.openai.com/chat');"

但是,我起chatgpt-web,配置了我自己的反代,启动是没错,只要打开web界面,与gpt互动就报错了,报无效的proxy,又不知咋整了,看来得去作者那里问问了,这里的大佬们,能指点一二么,谢谢

[root@VM-20-12-centos chatgpt-web]# docker-compose up Creating network "chatgpt-web_default" with the default driver Creating chatgpt-web_app_1 ... done Attaching to chatgpt-web_app_1 app_1 | app_1 | > chatgpt-web-service@1.0.0 prod /app app_1 | > node ./build/index.mjs app_1 | app_1 | Server is running on port 3002 app_1 | POST https://172.17.0.1:8082/conversation { app_1 | body: { app_1 | action: 'next', app_1 | messages: [ [Object] ], app_1 | model: 'gpt-3.5-turbo', app_1 | parent_message_id: '08bec7ac-3fad-468f-bac8-23168416d5e1' app_1 | }, app_1 | headers: { app_1 | Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik1UaEVOVUpHTkVNMVFURTRNMEZCTWpkQ05UZzVNRFUxUlRVd1FVSkRNRU13UmtGRVFrRXpSZyJ9.eyJodHRwczovL2FwaS5vcGVuYWkuY29tL3Byb2ZpbGUiOnsiZW1haWwiOiJiaW5nNzhAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWV9LCJodHRwczovL2FwaS5vcGVuYWkuY29tL2F1dGgiOnsidXNlcl9pZCI6InVzZXItbmtlaDFsclNhSXlNVWRYMzAzUmRPWW5VIn0sImlzcyI6Imh0dHBzOi8vYXV0aDAub3BlbmFpLmNvbS8iLCJzdWIiOiJhdXRoMHw2Mzk5YWQ0N2E4MGRiZTVlMzMwNjE3ODMiLCJhdWQiOlsiaHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MSIsImh0dHBzOi8vb3BlbmFpLm9wZW5haS5hdXRoMGFwcC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNjgxMzYyMjg0LCJleHAiOjE2ODI1NzE4ODQsImF6cCI6IlRkSkljYmUxNldvVEh0Tjk1bnl5d2g1RTR5T282SXRHIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCBtb2RlbC5yZWFkIG1vZGVsLnJlcXVlc3Qgb3JnYW5pemF0aW9uLnJlYWQgb2ZmbGluZV9hY2Nlc3MifQ.U7sWfolNPSXmsDk8_iNTWgloxrOKAszwpV6YV9B20Hc4Pdsj4gZJhbJ3xUv167yOUfgat0j3k4jucYLxBGC9wlacxNVZN01gmwWOKcrrbH1LnQ0Gn0HABGo1owYACUkCqTU1YQfYPsXBqXlMZBi1v7xAvWl4AapJicyikVTz-DfVF-VgzAmac_vBcXjUkWLZGKraQIHov9_6_XSO6Df3CFD2Jz8KXCmqRM-awF0IkCl6ezMmmZif1JqpnGmjj9Hmi5SPXdNWpvfO9hWbnGr1gF7-XXw1AW9dCJCs-pvxMSJZ3VeJp-ohACofAgsQUSXKQDjBbd4Duk4WrcEpbx9WTQ', app_1 | Accept: 'text/event-stream', app_1 | 'Content-Type': 'application/json' app_1 | } app_1 | } app_1 | FetchError: request to https://172.17.0.1:8082/conversation failed, reason: Invalid SOCKS proxy details were provided. app_1 | at ClientRequest. (file:///app/node_modules/.pnpm/node-fetch@3.3.0/node_modules/node-fetch/src/index.js:108:11) app_1 | at ClientRequest.emit (node:events:525:35) app_1 | at onerror (/app/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js:117:21) app_1 | at callbackError (/app/node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js:136:17) app_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { app_1 | type: 'system', app_1 | errno: undefined, app_1 | code: undefined, app_1 | erroredSysCall: undefined app_1 | }