Open stronk7 opened 1 year ago
I'm not able to reproduce this, unfortunately.
Adding the following to the top of your bot's main file might reveal the actual contents of /sync
though, which should help narrow down what the underlying crypto library is concerned about:
LogService.muteModule("Metrics");
LogService.trace = LogService.debug;
LogService.setLevel(LogLevel.TRACE);
Hi,
really, there isn't anything new when I apply for those 3 lines. Here there are the complete logs with them enabled, apart from some "own" initialisation stuff that I add at the beginning (and omited in the original report) the error happens almost immediately.
./run.sh
Using Matrix user: xxxx
Using Database user: xxxx
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Using './config-localdev.yml' for configuration (context: 'localdev')]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Using './storage-localdev' for storage (context: 'localdev')]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Using already existing token]
Thu, 01 Jun 2023 18:05:48 GMT [DEBUG] [MatrixClientLite] End-to-end encryption client created
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Starting HTTP server]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Starting database pool]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Starting profiles cache]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Setting Jenkins webhook]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Checking chat logs database structures]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Server started at http://localhost:8080]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Setting chat logs webhook]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Starting RSS/Atom feeds parser]
Thu, 01 Jun 2023 18:05:48 GMT [INFO] [Starting to watch feed https://example.org/something/rss.php?lang=en]
Thu, 01 Jun 2023 18:05:48 GMT [DEBUG] [MatrixHttpClient] (REQ-1) GET https://matrix.example.com/_matrix/client/v3/account/whoami
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixHttpClient] (REQ-1 RESP-H200) {
user_id: '@nextexamplebotdev:example.com',
is_guest: false,
device_id: 'NMQJEXECYB'
}
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixHttpClient] (REQ-2) GET https://matrix.example.com/_matrix/client/v3/user/%40nextexamplebotdev%3Aexample.com/account_data/m.direct
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixHttpClient] (REQ-2 RESP-H200) {
'@somebody:example.com': [
'!rAXjmWWpilNfincJDv:example.com',
'!NiAfbGwgRBRMOhzbhU:example.com',
'!qZVBQTjQVSiMEzMLJr:example.com',
'!FaTQHFKtJsJunxsLAI:example.com',
'!cknecIGrtoaFPnOUgd:example.com',
'!KxItDVUcTHcSCduVbh:example.com',
'!ocQzaVUSmXVWQcTTua:example.com',
'!xYLosOSLTwBSMykCfy:example.com'
]
}
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixClientLite] No filter given or invalid object - using defaults.
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixClientLite] Populating joined rooms to avoid excessive join emits
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixHttpClient] (REQ-3) GET https://matrix.example.com/_matrix/client/v3/joined_rooms
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixHttpClient] (REQ-3 RESP-H200) {
joined_rooms: [
'!rAXjmWWpilNfincJDv:example.com',
'!VlyOdAIoWKBBMwwrMU:example.com',
'!OGmrDnWiywbCeUYbUW:example.com',
'!iWhUNHQUZTUeqBZncL:example.com'
]
}
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixClientLite] Preparing end-to-end encryption
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixHttpClient] (REQ-4) GET https://matrix.example.com/_matrix/client/v3/rooms/!VlyOdAIoWKBBMwwrMU%3Aexample.com/state/m.room.encryption/
Thu, 01 Jun 2023 18:05:49 GMT [ERROR] [MatrixHttpClient] (REQ-4) { errcode: 'M_NOT_FOUND', error: 'Event not found.' }
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [MatrixHttpClient] (REQ-5) GET https://matrix.example.com/_matrix/client/v3/rooms/!iWhUNHQUZTUeqBZncL%3Aexample.com/state/m.room.encryption/
Thu, 01 Jun 2023 18:05:49 GMT [ERROR] [MatrixHttpClient] (REQ-5) { errcode: 'M_NOT_FOUND', error: 'Event not found.' }
Thu, 01 Jun 2023 18:05:49 GMT [DEBUG] [CryptoClient] Starting with device ID: NMQJEXECYB
node:internal/process/esm_loader:97
internalBinding('errors').triggerUncaughtException(
^
[Error: Failed to deserialize or serialize a JSON value missing field `version` at line 1 column 6856] {
code: 'GenericFailure'
}
Ciao :-)
I'm also getting this error, clearing persistent storage and logging in again solves it but I'm hoping not to have to force everyone to do that. What do you need to help reproduce?
For the records a few days ago I proceeded to update out staging bot to v0.7.1 and completely remove the storage (to get a new token and so on). It has been running @ staging without problem (just a lot of "Can't find the room key to decrypt the event" at the beginning, until it got everything updated).
So, today, I've been brave enough to apply for the same (update and delete storage) with the prod bot, and it's up and, apparently, running ok. I'll keep monitoring it, but for sure the problem reported in this issue (immediately after starting) is not happening anymore.
Ciao :-)
Update: We have 0.7.1 running (after deleting storage) here since a few days ago in prod, and it seems that this problem isn't happening anymore. We are facing #346 a few times (old-known issue for us), but other than that, all ok.
Ciao :-)
Describe the bug Trying to upgrade from sdk 0.6.5. to 0.6.6 consistently get the follow error on startup):
To Reproduce Steps to reproduce the behavior:
npm update matrix-bot-sdk
npm i
ornpm ci
LogLevel.DEBUG
).Expected behavior The bot starts working normally, like it was with 0.6.5.
Log snippet
Additional context The
M_NOT_FOUND
errors are pre-existing, happening always, as many times as encrypted rooms the bot is in (seems like). I imagine that those errors are unrelated with the new one, reported here, causing the bot to stop on startup.Ciao :-)