agentic icon indicating copy to clipboard operation
agentic copied to clipboard

Error when using heroku to deploy an app with this as a dependency.

Open GooseterV opened this issue 2 years ago • 1 comments

Verify latest release

  • [X] I verified that the issue exists in the latest chatgpt release

Verify webapp is working

  • [x] I verify that the ChatGPT webapp is working properly for this account.

Verify resrictions

  • [X] I verify that I've double-checked all of the restrictions.

Environment details

Node.js v18 (v16 used too) OS Linux x64

Link to the code that reproduces this issue

github.com/gooseterv/kori

Describe the Bug

Heroku isn't natively supported with puppeteer in nodejs. When adding the heroku nodejs buildpack this application still fails to launch

{"level":50,"time":1671297108669,"pid":4,"hostname":"7b8a3a35-92f0-47b9-959b-1946aa4e68ab","name":"Kori","err":{"type":"Error","message":"Failed to launch the browser process! spawn /usr/bin/google-chrome-stable ENOENT\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n","stack":"Error: Failed to launch the browser process! spawn /usr/bin/google-chrome-stable ENOENT\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n\n    at onClose (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:299:20)\n    at ChildProcess.<anonymous> (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:293:24)\n    at ChildProcess.emit (node:events:513:28)\n    at ChildProcess._handle.onexit (node:internal/child_process:291:12)\n    at onErrorNT (node:internal/child_process:483:16)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"},"msg":"Failed to launch the browser process! spawn /usr/bin/google-chrome-stable ENOENT\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n"}

To Reproduce

Create a new github repository and heroku app, then install the two libraries and try and perform auth with chatgpt. It should error even with the puppeteer nodejs buildpack because the code does not specify headless as true and allow puppeteer flags via the auth api.

Expected Behavior

It should open and login and perform correctly as it should have when not being ran with heroku.

GooseterV avatar Dec 17 '22 17:12 GooseterV

also it seems that openai auth requires the non headless version of puppeteer but heroku cant show you the gui so i think you have to use headless

GooseterV avatar Dec 17 '22 17:12 GooseterV

Just merged your PR.

The current browser version isn't tested headless.

transitive-bullshit avatar Dec 17 '22 20:12 transitive-bullshit

alright, if it ever works headlessly thatll be super useful because it causes some errors with other hosting platforms too

On Sat, Dec 17, 2022 at 3:38 PM Travis Fischer @.***> wrote:

Just merged your PR.

The current browser version isn't tested headless.

— Reply to this email directly, view it on GitHub https://github.com/transitive-bullshit/chatgpt-api/issues/159#issuecomment-1356460611, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATXQUWRYY26EZWF3DT5DSJTWNYQCVANCNFSM6AAAAAATCBOQUQ . You are receiving this because you authored the thread.Message ID: @.***>

GooseterV avatar Dec 17 '22 21:12 GooseterV

Released https://github.com/transitive-bullshit/chatgpt-api/releases/tag/v3.0.1

Let's follow-up on headless in a separate issue.

transitive-bullshit avatar Dec 17 '22 22:12 transitive-bullshit