famedly / matrix-dart-sdk

Matrix SDK written in pure Dart.
GNU Affero General Public License v3.0
49 stars 31 forks source link

Failed assertion: line 158 pos 14: 'stateKey != null': is not true #1840

Closed PhantomRay closed 1 month ago

PhantomRay commented 1 month ago

Checklist

In which Project did the bug appear?

Other

If you selected \"Other\" as Project, please enter in which project the bug occurred.

No response

On which platform did the bug appear?

Android, iOS

SDK Version

0.29.7~0.29.9

Describe the problem caused by this bug

  1. go to a room, redact a message
  2. restart app
  3. go to the room again, getTimeline throw an error
\^[[38;5;196m┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: \^[[38;5;196m│ 'package:matrix/src/room.dart': Failed assertion: line 158 pos 14: 'stateKey != null': is not true.<…>
flutter: \^[[38;5;196m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
flutter: \^[[38;5;196m│ #0   _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)<…>
flutter: \^[[38;5;196m│ #1   _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)<…>
flutter: \^[[38;5;196m│ #2   Room.setState (package:matrix/src/room.dart:158:14)<…>
flutter: \^[[38;5;196m│ #3   Room.postLoad (package:matrix/src/room.dart:120:9)<…>
flutter: \^[[38;5;196m│ #4   <asynchronous suspension><…>
flutter: \^[[38;5;196m│ #5   Room.getTimeline (package:matrix/src/room.dart:1445:5)<…>
flutter: \^[[38;5;196m│ #6   <asynchronous suspension><…>
flutter: \^[[38;5;196m│ #7   ChatPageController._initTimeline (package:my_app/modules/im/chat/controller.dart:306:19)<…>
flutter: \^[[38;5;196m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
flutter: \^[[38;5;196m│ ⛔ _throwNew<…>

Steps To Reproduce

No response

Screenshots or Logs

The following redact event's stateKey is null, which throws the exception

WechatIMG28541

Security related

No response

td-famedly commented 1 month ago

fixed in https://github.com/famedly/matrix-dart-sdk/pull/1835

PhantomRay commented 1 month ago

This is not fixed. Linking new PR https://github.com/famedly/matrix-dart-sdk/pull/1848