matrix-org / matrix-org/matrix-js-sdk

v4.0.0: Uncaught (in promise) Error: Cannot call hasPendingEvent with pendingEventOrdering == chronological

Open
#1,284 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

Due to this issue https://github.com/matrix-org/matrix-js-sdk/issues/1216 I am not able to update the SDK since v4.0.0. So this issue occurs in v4.0.0, maybe also in later versions (> v4.0.0).

The following exception is thrown

Uncaught (in promise) Error: Cannot call hasPendingEvent with pendingEventOrdering == chronological

while sending a read receipt (MatrixClient.prototype.sendReadReceipt) with opts.hidden = false.

Stack trace:

browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14 Uncaught (in promise) Error: Cannot call hasPendingEvent with pendingEventOrdering == chronological
    at _.hasPendingEvent (browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14)
    at M.<anonymous> (browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14)
    at c (browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14)
    at Generator._invoke (browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14)
    at Generator.forEach.e.<computed> [as next] (browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14)
    at c (browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14)
    at t (browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14)
    at browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14
    at new Promise (<anonymous>)
    at o (browser-matrix.min.js?v=ff0f3dfc38cda0ac9b88e0bc87ae8e67:14)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with MatrixClient.prototype.sendReadReceipt and trace the hasPendingEvent call that raises the reported error when opts.hidden is false; the stack trace is from browser-matrix.min.js. Reproduce the read-receipt flow and determine what behavior is expected with chronological pending-event ordering; done means the call completes without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.