node_characterai
node_characterai copied to clipboard
ProtocolError
Hi, This is an issue that I've encountered now. This issue happened just now, sometimes I got this error or it's stuck after sending message (noresponse): ProtocolError: Could not load body for this request. This might happen if the request is a preflight request.
Hello, could you send the stack trace?
This another error that I got
[node_characterai] Puppeteer - Error: net::ERR_FAILED at https://character.ai/chat/history/continue/
/root/rest-api/node_modules/node_characterai/client.js:144
if (request.status() === 200 || request.status() === 404) {
^
TypeError: Cannot read properties of undefined (reading 'status')
and other than that it would just hang
What version of the package are you using?
Been getting this randomly too, not often. But maybe 2-3 times when used for 3-4 hours continuously.
This is weird because I do not think I've ever encountered this before. Whats your operating system and chromium version? I personally cannot reproduce this issue (yet).
Could you guys try to open the browser up (switching headless to false) and leave the network tab open so whenever the issue happens you check what happened? or just print whatever comes out as a response.
Related to the ProtocolError issue, I don't know what could be causing this. Perhaps CharacterAI (or the old interface) is going through downtimes or maintenances? However I've found this: https://github.com/puppeteer/puppeteer/issues/9864#issuecomment-1620651839 which could indicate its perhaps not an error caused by the package.
Once you've tested and the error happens again, show me as much as information you got from the error and then try to uninstall the node_characterai package along with puppeteer and reinstall it and see if it happens again.
This is weird because I do not think I've ever encountered this before. Whats your operating system and chromium version? I personally cannot reproduce this issue (yet).
Could you guys try to open the browser up (switching headless to false) and leave the network tab open so whenever the issue happens you check what happened? or just print whatever comes out as a response.
Related to the ProtocolError issue, I don't know what could be causing this. Perhaps CharacterAI (or the old interface) is going through downtimes or maintenances? However I've found this: puppeteer/puppeteer#9864 (comment) which could indicate its perhaps not an error caused by the package.
Once you've tested and the error happens again, show me as much as information you got from the error and then try to uninstall the node_characterai package along with puppeteer and reinstall it and see if it happens again.
Running the library in self hosted Docker as a Service with REST. Its probably Character AI having issues to be honest, because today its been running without issues. I have added file logging, so I will provide the logs if it happens again.
Okay thank you. Sadly, if it is a CharacterAI issue, I cannot do much for now. However I recommend you use something like pm2
to automatically restart your script if it crashes or whatnot.
Good luck and keep me updated.
@realcoloride just checked the logs, looks lke this happened because the new interface I think,
Is there any plan to use the new c.ai website so this issue would probably get fixed? Thanks
Hello,
Could you send me the logs/traces?
As I said before, I will use the old interface as long as possible (for compatibility & stability reasons). I will switch to using the new interface and endpoints when the old interface will no longer work or be fully broken.
@realcoloride I'm sorry but looks like I can't provide it, because it would stuck indefinitely without giving any output
@realcoloride hmm this issue still exist? is there any update?
Shouldn't. Could you try & let me know?
nvm I need to reinstall my whole node_modules to fix this issue, and/or use another session_id from other account