realcoloride / node_characterai

Unofficial Character AI wrapper for node.
https://beta.character.ai/
347 stars 74 forks source link

module completely errors after 2 messages at relatively the same time #175

Closed jacpa2011 closed 5 months ago

jacpa2011 commented 5 months ago

whenever the API gets sent 2 messages at relatively the same time it gives this error

it makes sense but this error is unavoidable, I want to catch it and then just let the program run without closing. the only "workaround" is setting a random timeout, which sometimes seems to fail.

       throw new Error(message);
              ^
Error: Request Interception is not enabled!
    at assert (C:\Users\censored\documents\myprograms\discordbots\bruno 2.0\node_modules\puppeteer-core\lib\cjs\puppeteer\util\assert.js:28:15)
    at HTTPRequest.continue (C:\Users\censored\documents\myprograms\discordbots\bruno 2.0\node_modules\puppeteer-core\lib\cjs\puppeteer\common\HTTPRequest.js:155:32)
    at C:\Users\censored\documents\myprograms\discordbots\bruno 2.0\node_modules\node_characterai\requester.js:204:41
    at onceHandler (C:\Users\censored\documents\myprograms\discordbots\bruno 2.0\node_modules\puppeteer-core\lib\cjs\puppeteer\common\EventEmitter.js:98:13)
    at C:\Users\censored\documents\myprograms\discordbots\bruno 2.0\node_modules\puppeteer-core\lib\cjs\puppeteer\api\Page.js:114:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async HTTPRequest.finalizeInterceptions (C:\Users\censored\documents\myprograms\discordbots\bruno 2.0\node_modules\puppeteer-core\lib\cjs\puppeteer\common\HTTPRequest.js:99:9)
realcoloride commented 5 months ago

See README.md. image