Open Bug 1937959 Opened 2 months ago Updated 2 months ago

unable to verify contact (TypeError: b is undefined)

Categories

(Chat Core :: Matrix, defect)

Thunderbird 128
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: filip.roseen, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

Attached file chat-log.txt (obsolete) —

Steps to reproduce:

This relates to the matrix integration within chat-core.

  1. "Join Chat" and enter the name of a secondary party
  2. Initiate account verification by right-clicking said contact/room and "Verify Account"
  3. verify that the emojis match (with your secondary party)
  4. press "They Match"

NOTE:

  • local version: 128.5.2esr (64-bit), windows
  • the remote party was using Elements version 1.11.88, Crypto version: Rust SDK 0.7.2 (96c405f), Vodozemac 0.8.1

Actual results:

verification is cancelled with the local diagnostic below:

02:05:54 - @refp:matrix.org cancelled the verification with the reason: TypeError: b is undefined

remote party is told that "@refp:matrix.org" cancelled verification process.

Expected results:

Verification process should have completed.

to avoid confusion: I mistyped the stated repro, step #2 should be "Verify Identity" and not "Verify Account" (the latter is not an existing option).

(In reply to Filip Roséen from comment #0)

2. Initiate account verification by right-clicking said contact/room and "Verify Account"
3. verify that the emojis match (with your secondary party)
5. press "They Match"

The original attached file was partially censored (by mistake), the secondary party has confirmed that their account handle can be publically disclosed as part of this bug report.

Attachment #9444234 - Attachment is obsolete: true
Component: Instant Messaging → Matrix
Product: Thunderbird → Chat Core
Summary: chat-core/matrix: unable to verify contact (TypeError: b is undefined) → unable to verify contact (TypeError: b is undefined)

You get to https://searchfox.org/comm-central/rev/01de7c2b7485984700ea0c99da3c7562a6a6bda7/chat/protocols/matrix/matrixTextForEvent.sys.mjs#328 but I don't know from where.
Maybe putting a console.trace() there would tell you

(In reply to Magnus Melin [:mkmelin] from comment #3)

You get to https://searchfox.org/comm-central/rev/01de7c2b7485984700ea0c99da3c7562a6a6bda7/chat/protocols/matrix/matrixTextForEvent.sys.mjs#328 but I don't know from where.
Maybe putting a console.trace() there would tell you

That shouldn't reveal the actual root, since this is a server-echoed message I think. Either way, the actual error comes most likely from Olm/its wrapper or the matrix-js-sdk crypto layer. The solution however is either us declaring some different parameters for the crypto support or calling SDK methods slightly differently. From the STR the issue must happen when https://searchfox.org/comm-central/rev/97cb7427a18141f6f88d1277b08dcaf76ca263b6/chat/protocols/matrix/matrixAccount.sys.mjs#1464 is called.

According to the Developer Console the error is indeed coming from ojm.js:

TypeError: b is undefined olm.js:96:146

The line in question is below:

function N(b,c){var d=Qa(b);c(new Uint8Array(a.HEAPU8.buffer,d,b));return d}function L(b){return"number"==typeof b?N(b,function(c){c.fill(0)}):N(b.length,function(c){c.set(b)})}function K(b){return b instanceof Uint8Array?b:Ma(b,!0)}function J(b){return function(){var c=Oa();try{return b.apply(this,arguments)}finally{Pa(c)}}}function M(b,c){for(;0<c--;)a.HEAP8[b++]=0}function W(){var b=a._olm_account_size();this.ac=F(b);this.$b=a._olm_account(this.ac)}

column 146 is the first b in N(b.length,function(c){c.set(b)}) (ie. it trips on b.length). I sadly cannot help with identifying what this value actually corresponds to, though I assume someone with a debug build could.


  • The above is from version 133.0 (64-bit) but I would assume the underlying issue is the same as in version 128.
  • Perhaps the added information helps narrowing down the issue.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: