node_characterai icon indicating copy to clipboard operation
node_characterai copied to clipboard

Cannot read properties of undefined (reading 'status')

Open Zaxerion opened this issue 9 months ago • 1 comments

when I send a new message before the bot responds to the old message, I get this error

[node_characterai] Puppeteer - TypeError: Failed to fetch /home/container/node_modules/node_characterai/chat.js:62 if (request.status() === 200) { ^

TypeError: Cannot read properties of undefined (reading 'status') at Chat.sendAndAwaitResponse (/home/container/node_modules/node_characterai/chat.js:62:21)

Zaxerion avatar May 14 '24 11:05 Zaxerion

Hello, I do not understand your problem, could you re-explain?

realcoloride avatar May 14 '24 11:05 realcoloride

I had this problem too, It randomly gives this error

(censored) is for privacy purposes Perhaps it is a rate limit issue?

[node_characterai] Puppeteer - Error: Evaluation failed: TypeError: Failed to fetch
    at pptr://__puppeteer_evaluation_script__:2:44
Error generating completion: TypeError: Cannot read properties of undefined (reading 'status')
    at Chat.sendAndAwaitResponse (censored)
    at the process.processTicksAndRejections (node: internal/process/task_queues:95:5)
    at async dotheaithingy (censored)

jacpa2011 avatar Jun 02 '24 20:06 jacpa2011

Could you tell me the version of node_characterai you use, OS and chromium version?

realcoloride avatar Jun 03 '24 00:06 realcoloride

Well since OP is probably not going to respond: I have the latest version of node_characterai, windows 10 Home, and Chrome 125.

jacpa2011 avatar Jun 03 '24 13:06 jacpa2011

Chromium version, not chrome. Try removing the node_modules folder and run npm i command, then try your script.

realcoloride avatar Jun 03 '24 14:06 realcoloride

How can I check? I'm not so familiar with chromium...

Anyway I ran npm i and it still gives this error, also it seems like it provides an error specifically when you send 2 requests at the same time, similar to the interception issue, however, this one occurs whenever the 2 requests are more apart... The solution could be just the same thing as the one for the interception issue.

jacpa2011 avatar Jun 04 '24 17:06 jacpa2011

Update: yep, problem solved, not getting the error anymore.

jacpa2011 avatar Jun 04 '24 18:06 jacpa2011