MTRNord / cetirizine

An experimental matrix client written in reactjs utilizing tailwind and storybook
https://mtrnord.github.io/cetirizine/
Apache License 2.0
15 stars 0 forks source link

Error: Expect an `UserId` instance, received `P` instead #2

Open abyxcos opened 1 year ago

abyxcos commented 1 year ago
[Error] Error: Expect an `UserId` instance, received `P` instead
(anonymous function) — vendor-6dbf17ae.js:60134:54597
wasm-stub
<?>.wasm-function[882]
<?>.wasm-function[4103]
<?>.wasm-function[610]
wasm-stub
rI — vendor-6dbf17ae.js:60134:14300
(anonymous function) — client-4506e41d.js:1:28123

    (anonymous function) (client-4506e41d.js:1:18597)

This also occurs in updateTrackedUsers, and pops up multiple times during sync (usually a few minutes apart).

abyxcos commented 1 year ago
[Error] Error: Expect an `UserId` instance, received `P` instead
(anonymous function) — vendor-6dbf17ae.js:60134:54597
wasm-stub
<?>.wasm-function[882]
<?>.wasm-function[4103]
<?>.wasm-function[898]
wasm-stub
getMissingSessions — vendor-6dbf17ae.js:60134:29567
(anonymous function) — client-4506e41d.js:1:20222
shareKeys — client-4506e41d.js:1:20517
(anonymous function) — client-4506e41d.js:1:19734

    (anonymous function) (client-4506e41d.js:1:18597)
[Error] Error: Expect an `UserId` instance, received `P` instead
(anonymous function) — vendor-6dbf17ae.js:60134:54597
wasm-stub
<?>.wasm-function[882]
<?>.wasm-function[4103]
<?>.wasm-function[897]
wasm-stub
updateTrackedUsers — vendor-6dbf17ae.js:60134:26729
(anonymous function) — client-4506e41d.js:1:32712

    (anonymous function) (client-4506e41d.js:1:18597)
MTRNord commented 1 year ago

This is related to https://github.com/matrix-org/matrix-rust-sdk/blob/main/bindings/matrix-sdk-crypto-js/src/machine.rs#L200 being faulty.

Wasmer has a fix at https://github.com/wasmerio/wasmer/pull/3400 however https://github.com/wasmerio/wasm-bindgen-downcast is currently not public apparently making it questionable if it can be used in rust-sdk to fix this :/

MTRNord commented 1 year ago

bb599de8d242358ff6f17357f752696c063cce52 is a workaround for this. However an upstream fix would be nice.