-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No event when sync
failed, Bot stuck on 'Expect String but received undefined'
#346
Comments
I did not do any testing but encountered the same problem this morning with 0.7.0. The bot was down for an hour and spammed the log
|
I got a little more context now from sending a message in this state:
The only way to fix this is restarting the bot process and since there is no event on sync error I can't really bodge an automation either |
Just to confirm that this has started to happen to me after updating to 0.7.1 few days ago (from 0.6.5). For reference, it was reported earlier @ #256 (in case it helps, because it was fixed at some point - worked ok here from 0.6.3 to 0.6.5). Ciao :-) |
Request related to a problem: Expect String but received undefined.
I have a list of bot clients and want to stress test bot sends encrypted messages to e2ee rooms.
When running a stress test using Postman by using 10 bots to send messages to 10 rooms.
Virtual user: 100, ramp-up duration: 2 minutes, request duration: 5 minutes.
The total requests for every bot is ~1,5K.
MatrixClientLite shows the error: Expect String but received Undefined.
Tracking error I found this is an error from
matrix-rust-sdk-crypto-nodejs
when returning the empty request object (withouttxn_id
will throw exception).Sometimes I get the error:
Invalid access token passed
. from MatrixHttpClient.-> Maybe a lot of events fired and Bot's clients cannot sync up to date.
After restarting all bot clients, no error can be found.
I can't find any event to handle on "sync" error to detect error caused and handle restarting bot or get a new
access_token
for the bot client.The solution
Could you please add code like
this.emit('sync.error', e)
oncatch()
whensync
failed?Alternatives solution
A better way is to resolve the error
Expect String but received Undefined
. Does updatematrix-rust-sdk-crypto-nodejs
dependencies to0.1.0-beta.11
will resolve it?Additional context
I using
matrix-bot-sdk
: v0.6.6.NodeJs: v16.x
The text was updated successfully, but these errors were encountered: