realcoloride/node_characterai

Puppeteer timeout error

IRON-M4N opened this issue · 3 comments

So i made it into a express api and sometimes it gives this error.

Error: waiting for target failed: timeout 30000ms exceeded
Error: Protocol error (Network.setUserAgentOverride): Session closed. Most likely the page has been closed.

Hello, could you provide more details? Code, line that failed, additional context like your environment, the package version...

I'm encountering this issue i deployed it on Railway.
Initially, it works well for the first 4-5 requests, but then I receive the following error

(node:7) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase the limit

(Use node --trace-warnings ... to show where the warning was created)

If you could provide your contact information, I'll be able to share the code with you.

Hello, this error means you are doing too many event.on without doing event.off() to delete the event, causing a memory leak.

As it is not an issue related to the package, I will close it, but you can still respond to it or re-open a new one if you have an issue.