-
-
Notifications
You must be signed in to change notification settings - Fork 616
Broken encryption (?): matrix-js-sdk 0.14.2 + Olm 3.0.0 + synapse 0.34.0 #816
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
Comments
I just tried this with a completely fresh instance of synapse (new accounts and rooms), and the result was still the same. 😭 |
Sorry, I left out one critical piece of information: I'm not using the SDK in a browser, I'm using it via nodejs. I suspect the issue is related to session store persistence. I'm using a module called node-local-storage to emulate browser local storage, which seems to be working fine on its own, but I notice that the matrix sdk doesn't seem to actually be saving anything to the store. 🧐 |
Possibly related: #437 |
You could take a look at the js half of github.com/matrix-org/matrix-search as that successfully uses e2e via this sdk in node js. |
Area around https://github.com/matrix-org/matrix-search/blob/master/js_fetcher/index.ts#L66 looks relevant. (i too had many issues running e2e in node at the time) |
Thanks for pointing me to those examples, @t3chguy ! I was able to determine that the cause of my issues were indeed related to the availability of a working LocalStorage implementation, and making sure that it's present in all the spots it needs to be. In case anyone else happens upon this issue: feel free to take a look at the source to my project which initially caused me to open this issue in the first place. It's an example of a working nodejs Matrix client coded against matrix-js-sdk (including end-to-end encryption and all). https://github.com/zhaytee/matrix-rpc-js Closing this for now! |
Just a follow-up on this. First, thanks for the great samples and examples @t3chguy and @zhaytee . Very helpful. I am building a crypto-enabled Matrix chatbot here: https://github.com/guardianproject/ractive/blob/master/bot.js It currently works sans-crypto, but when I enable it, I can't decrypt any messages, and the client exits. Any thoughts, insights, something I missed? Thanks! Getting saved sync token... |
I am experiencing the same issue. matrix-js-sdk: v8.5.0 I am still trying to get e2ee running. In my scenario the users are using web clients (based on the JS SDK) only.
All keys are downloaded, secret storage as well as cross-signing are bootstrapped. All involved devices are getting verified. Do I have to explicitly upload any keys when sending a message? |
By the way, I gave up and switched to https://github.com/matrix-org/pantalaimon My life is much better now :) |
I have implemented a JS client. So unfortunately I can't switch and have to know the "missing link" to solve the above issue.
|
Understood. I will keep at it here, in truth, and hopefully we can figure out what the missing link in the code or our understanding is. |
If there's something here you'd like the core team to examine, please open a new issue with details of your use case. |
Many thanks for your reply. I already filed the issue here ... matrix-org/synapse#8624. |
Hi folks, encountering an issue which may be similar to #731
Unencrypted rooms work perfectly fine with the sdk, but as soon as encryption is turned on, things stop working.
Encryption is, as far as I can tell, set up properly in my program. Olm 3.0.0 is being used with sdk 0.14.2, everything is being require()'d and initialized in the correct order, and the library never complains about crypto being unavailable or anything like that.
Below is some relevant logging output. Earlier in the log, device keys were coming in fine, but it seems that the sdk is not getting the room keys it's looking for? Not sure. Happy to provide more detail to assist in debugging this issue.
The homeserver being used is the latest synapse as of this writing.
Thank you!
The text was updated successfully, but these errors were encountered: