matrix-org / matrix-react-end-to-end-tests

End to end tests for the matrix react web app
2 stars 2 forks source link

Receiving an encrypted message sometimes failes because mx_EventTile_verified is missing #53

Open bwindels opened 5 years ago

bwindels commented 5 years ago

Failure: https://buildkite.com/matrix-dot-org/matrix-react-sdk/builds/1531#8cfc6fec-be9f-4885-8fc2-44f776f6895d/919-948

[2019-07-11T15:07:15Z]  * bob receives message "Guess what I just heard?!" from alice ... failure:  { AssertionError [ERR_ASSERTION]: false == true
[2019-07-11T15:07:15Z] at assertMessage (/workdir/matrix-react-end-to-end-tests/src/usecases/timeline.js:111:16)

Could be a race when doing setState({verified: true}) in the eventtile in onDeviceVerificationChanged.

Although we wait for alice to send a message first after doing SAS and before waiting for it to arrive, so quite some time to have rerendered ... See https://github.com/matrix-org/matrix-react-end-to-end-tests/blob/master/src/scenarios/e2e-encryption.js#L48

bwindels commented 5 years ago

Another instance at https://buildkite.com/matrix-dot-org/matrix-react-sdk/builds/2487#fabc2ad8-1462-44ac-81f0-d6adb2d595dc

It actually seems like the keys are being received with a delay, bobs console shows:

Saving device tracking data at token s25_3_6_6_16_1_7_5_1
Error decrypting event (id=$4EOF40Z-__jAg-fIWpZXfBm7HDewQIneQCjozKKzRfk): DecryptionError[msg: The sender's device has not sent us the keys for this message., session: W4dddRq/TSMLfc4Zvj9fUKISqFKxzvmVgaPeQrLTxiE|guU2rlD7ideEYE7l9wYxL3xHyasNU6gLpyWGbtZSqkU]
created new inbound Olm session ID 6DfUGvfKMQQI+x7ndsGdAXXp+ViIovCX61zuzIBaUn8 with W4dddRq/TSMLfc4Zvj9fUKISqFKxzvmVgaPeQrLTxiE
Adding key for megolm session W4dddRq/TSMLfc4Zvj9fUKISqFKxzvmVgaPeQrLTxiE|guU2rlD7ideEYE7l9wYxL3xHyasNU6gLpyWGbtZSqkU
enqueueing key request for !EouRIcJlhAuvmjPaRL:localhost / guU2rlD7ideEYE7l9wYxL3xHyasNU6gLpyWGbtZSqkU
deleting unnecessary room key request for !EouRIcJlhAuvmjPaRL:localhost / guU2rlD7ideEYE7l9wYxL3xHyasNU6gLpyWGbtZSqkU