We have pulled in a recent version of the matrix-rust-sdk into our app, and have noted that the android app seems to now crash on initialization (on emulators, and perhaps real devices). After some digging, it appears to be related to the recent change to remove the 'ring' dependency: https://github.com/matrix-org/matrix-rust-sdk/pull/6334/changes
Specifically, it looks like now that reqwest pulls in rustls which defaults to aws-lc-rs. It seems like the aws-lc-rs crate has known issues on certain Android targets/emulators — it can fail to initialize or produce invalid code on arm64 emulators with 16KB pages. The crash we got seemed to indicate an issue with 16kb page sizes specifically, and restoring ring on android seemed to fix the issue.
Not sure on the best way to fix this or not, but figured a post about the issue we're experiencing might help others in a similar situation.
We have pulled in a recent version of the matrix-rust-sdk into our app, and have noted that the android app seems to now crash on initialization (on emulators, and perhaps real devices). After some digging, it appears to be related to the recent change to remove the 'ring' dependency: https://github.com/matrix-org/matrix-rust-sdk/pull/6334/changes
Specifically, it looks like now that
reqwestpulls inrustlswhich defaults toaws-lc-rs. It seems like theaws-lc-rscrate has known issues on certain Android targets/emulators — it can fail to initialize or produce invalid code on arm64 emulators with 16KB pages. The crash we got seemed to indicate an issue with 16kb page sizes specifically, and restoring ring on android seemed to fix the issue.Not sure on the best way to fix this or not, but figured a post about the issue we're experiencing might help others in a similar situation.