RainEggplant / chatgpt-telegram-bot

A ChatGPT bot for Telegram based on Node.js. Support both browserless and browser-base APIs.
MIT License
323 stars 97 forks source link

Browsed-based api not working #29

Closed AgressionGoD closed 1 year ago

AgressionGoD commented 1 year ago

Hello, browsed-based api on docker container not working. Log:

app_1 | Error: No element found for selector: button[type="submit"] app_1 | at assert (/app/node_modules/.pnpm/registry.npmmirror.com+puppeteer-core@19.7.2_typescript@4.9.5/node_modules/puppeteer-core/lib/cjs/puppeteer/util/assert.js:28:15) app_1 | at IsolatedWorld.click (/app/node_modules/.pnpm/registry.npmmirror.com+puppeteer-core@19.7.2_typescript@4.9.5/node_modules/puppeteer-core/lib/cjs/puppeteer/common/IsolatedWorld.js:190:32) app_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) app_1 | at async Promise.all (index 1) app_1 | at async getOpenAIAuth (file:///app/node_modules/.pnpm/registry.npmmirror.com+chatgpt@3.5.1_puppeteer@19.7.2/node_modules/chatgpt/build/index.js:928:7) app_1 | at async ChatGPTAPIBrowser.initSession (file:///app/node_modules/.pnpm/registry.npmmirror.com+chatgpt@3.5.1_puppeteer@19.7.2/node_modules/chatgpt/build/index.js:1394:24) app_1 | at async ChatGPT.init (file:///app/dist/api.js:20:13) app_1 | at async main (file:///app/dist/index.js:9:5) app_1 |  ELIFECYCLE  Command failed with exit code 1.

RainEggplant commented 1 year ago

I recommend you migrate to the browserless API. It's more lightweight and robust. The browser-based API is unstable and no longer actively maintained, so it may fail if OpenAI adds new protection measures. Also, it's more likely to encounter protections on the docker container than on the host machine.

RainEggplant commented 1 year ago

Closed as this is an issue of the upstream API.