Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dendrite 0.9.6 breaks matrix_appservice_discord #2690

Closed
tux93 opened this issue Sep 1, 2022 · 3 comments
Closed

Dendrite 0.9.6 breaks matrix_appservice_discord #2690

tux93 opened this issue Sep 1, 2022 · 3 comments

Comments

@tux93
Copy link

tux93 commented Sep 1, 2022

Background information

  • Dendrite version or git SHA: 0.9.6-304acd7a
  • Monolith or Polylith?: Monolith
  • SQLite3 or Postgres?: Postgres
  • Running in Docker?: no
  • go version: 1.18.5
  • Client used (if applicable): Element

Description

  • What is the problem: After updating to 0.9.6 matrix_appservice_discord throws exceptions
  • Who is affected: All bridges to discord on my homeserver
  • How is this bug manifesting: Every time a message is sent in a bridged room an exception is logged, messages to and from Discord are not delivered
  • When did this first appear: Right after the update to 0.9.6

Steps to reproduce

  • Install Dendrite 0.9.6 and matrix_appservice_discord 3.0.0
  • Bridge some Rooms and try to send messages
  • Check the Bridge logs, every time a message is sent an exception is logged
Sep 01 22:36:12 node[6098]: Sep-1 22:36:12.721 [DiscordAS] error: Exception thrown while handling "room.event" event TypeError: Cannot read properties of undefined (reading 'age')
Sep 01 22:36:12 node[6098]:     at MatrixEventProcessor.<anonymous> (/home/matrix-discord/matrix-appservice-discord/src/matrixeventprocessor.ts:94:28)
Sep 01 22:36:12 node[6098]:     at Generator.next (<anonymous>)
Sep 01 22:36:12 node[6098]:     at /home/matrix-discord/matrix-appservice-discord/build/src/matrixeventprocessor.js:23:71
Sep 01 22:36:12 node[6098]:     at new Promise (<anonymous>)
Sep 01 22:36:12 node[6098]:     at __awaiter (/home/matrix-discord/matrix-appservice-discord/build/src/matrixeventprocessor.js:19:12)
Sep 01 22:36:12 node[6098]:     at MatrixEventProcessor.OnEvent (/home/matrix-discord/matrix-appservice-discord/build/src/matrixeventprocessor.js:78:16)
Sep 01 22:36:12 node[6098]:     at /home/matrix-discord/matrix-appservice-discord/src/discordas.ts:211:34
Sep 01 22:36:12 node[6098]:     at Generator.next (<anonymous>)
Sep 01 22:36:12 node[6098]:     at fulfilled (/home/matrix-discord/matrix-appservice-discord/build/src/discordas.js:5:58)
Sep 01 22:36:12 node[6098]:     at processTicksAndRejections (node:internal/process/task_queues:96:5)

@turt2live
Copy link
Member

I believe this would technically be a bug in the bridge: age is not a required field, though is extremely useful.

@S7evinK
Copy link
Contributor

S7evinK commented Sep 2, 2022

Might be fixed with #2692, as we were sending too many (possibly wrong) events to the AS.

@tux93
Copy link
Author

tux93 commented Sep 9, 2022

It works again with this patch on the bridge side matrix-org/matrix-appservice-discord#842 so I think the issue here can be closed

@tux93 tux93 closed this as completed Sep 9, 2022
0x1a8510f2 pushed a commit to 0x1a8510f2/dendrite that referenced this issue Sep 12, 2022
PiotrKozimor added a commit to globekeeper/dendrite that referenced this issue Sep 15, 2022
* Update P2P demos

* Only send (invite) events to the AS if it's interested in it (matrix-org#2692)

This should hopefully fix matrix-org#2691 (and maybe also matrix-org#2690)

* Move `SetLatestEvents` call

* Optimise `resolve-state` tool

* State and auth tweaks (update to matrix-org/gomatrixserverlib#335)

* Tweak logging for detected state resets

* Improve Sentry reporting

* Set Sentry user where known

* Tweak Sentry again

* State resolution fixes in `applyAndAuthEvent` (update to matrix-org/gomatrixserverlib#336)

* Stronger default power levels

* Update to matrix-org/gomatrixserverlib@637a173

* Handle errors differently in the `DeviceListUpdater` (matrix-org#2695)

`If a device list update goes missing, the server resyncs on the next
one` was failing because a previous test would receive a `waitTime` of
1h, resulting in the test timing out.
This now tries to handle the returned errors differently, e.g. by using
the default `waitTime` of 2s. Also doesn't try further users in the
list, if one of the errors would cause a longer `waitTime`.

* Add a SigningKeyUpdate producer (matrix-org#2697)

This adds a new stream for signing key updates, this should ensure we
don't lose any updates over federation.

* Re-add waitTime if we're not blacklisted and no RetryAfter was
specified.

* Avoid unneeded JSON operations (matrix-org#2698)

We were `json.Unmarshal`ing the EDU and `json.Marshal`ing right before
sending the EDU to the stream. Those are now removed and the consumer
does `json.Unmarshal` once.

* Add HTTP status code to FederationClientError (matrix-org#2699)

Also ensures we wait on more HTTP status codes.

* Update state reset capture to Sentry

* Use a single context instead

* Fulltext implementation incl. config (matrix-org#2480)

This adds the main component of the fulltext search.
This PR doesn't do anything yet, besides creating an empty fulltextindex
folder if enabled. Indexing events is done in a separate PR.

* Fix issue with stale device lists (matrix-org#2702)

We were only sending the last entry to the worker, so most likely missed
updates.

* Update getting pushrules, add tests, tweak pushrules (matrix-org#2705)

This PR
- adds tests for `evaluatePushrules`
- removes the need for the UserAPI on the `OutputStreamEventConsumer`
(for easier testing)
- adds a method to get the pushrules from the database
- adds a new default pushrule for `m.reaction` events (and some other
tweaks)

* Use database writer in user API `DeleteOldNotifications`

* More writer fixes in the Sync API

* Change detection of already executed migrations (matrix-org#2665)

This changes the detection of already executed migrations for the
roomserver state block and keychange refactor. It now uses schema tables
provided by the database engine to check if the column was already
removed. We now also store the migration in the migrations table.

This should stop e.g. Postgres from logging errors like `ERROR: column
"event_nid" does not exist at character 8`.

* Fix transactions around assigning NIDs

* Fix database transaction for keyserver `DeleteDeviceKeys`

* Optimise shared users query in Synx API slightly by removing a potential sort

* Optimise `SharedUsers` again by using complete composite index

* Version 0.9.7 (matrix-org#2707)

Changelog and version bump.

* Only verify if fulltext indexing is enabled

* Update to matrix-org/gomatrixserverlib@dec87db

* P2P demo tweaks

* Update to matrix-org/pinecone@b215925

* Update to NATS Server v2.9.0

* Fix missing signature check on the `/get_missing_events` response

* Version 0.9.8

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants