matrix-org / matrix-org/matrix-hookshot
Join dynamic github room not fully successful
- Dominant language
- TypeScript
- Stars
- 450
- Forks
- 95
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 23
Description
I am trying to join a dynamic github issue room.
The room name is #github_yncyrydybyl_nothing_3:datanauten.de. That should point to https://github.com/yncyrydybyl/Nothing/issues/3.
The room is created. Topic and Avatar also fetched and set sucessfully. But then nothing in the rooms happens.
If I write messages these are not passed to the github issue. And when something is commented in the issue it also not shown in the room.
The log on creation looks like:
```
INFO 20:00:48:725 [Bridge] Got room query request: #github_yncyrydybyl_nothing_4:datanauten.de
INFO 20:00:48:725 [GitHubIssueConnection] Fetching yncyrydybyl/nothing/4
INFO 20:00:49:920 [GitHubIssueConnection] uploading https://avatars.githubusercontent.com/u/104430?v=4
INFO 20:00:52:978 [Appservice] Processing transaction 1928256
INFO 20:00:52:979 [Appservice] Processing event of type m.room.create
INFO 20:00:52:980 [Appservice] 172.18.0.4 - - [10/Dec/2023:20:00:52 +0000] "PUT /_matrix/app/v1/transactions/1928256? HTTP/1.1" 200 2 "-" "Synapse/1.97.0"
INFO 20:00:54:321 [Appservice] Processing transaction 1928257
INFO 20:00:54:322 [Appservice] Processing event of type m.room.member
DEBUG 20:00:54:322 [BotUsersManager] Bot user @hookshot:datanauten.de joined room !niJRWduYuSZTIoTFAj:datanauten.de
INFO 20:00:54:324 [Appservice] 172.18.0.4 - - [10/Dec/2023:20:00:54 +0000] "PUT /_matrix/app/v1/transactions/1928257? HTTP/1.1" 200 2 "-" "Synapse/1.97.0"
DEBUG 20:00:54:653 [MatrixHttpClient] (REQ-361) { errcode: 'M_NOT_FOUND', error: 'Room account data not found' }
DEBUG 20:00:54:653 [MatrixClient] Error getting uk.half-shot.matrix-hookshot.github.room room account data in !niJRWduYuSZTIoTFAj:datanauten.de: { errcode: 'M_NOT_FOUND', error: 'Room account data not found' }
INFO 20:00:54:653 [ConnectionManager] Removing all connections from !niJRWduYuSZTIoTFAj:datanauten.de
INFO 20:00:56:811 [Appservice] 172.18.0.4 - - [10/Dec/2023:20:00:56 +0000] "GET /_matrix/app/v1/rooms/%23github_yncyrydybyl_nothing_4%3Adatanauten.de? HTTP/1.1" 200 568 "-" "Synapse/1.97.0"
INFO 20:00:57:042 [Appservice] Processing transaction 1928258
INFO 20:00:57:042 [Appservice] Processing event of type m.room.power_levels
INFO 20:00:57:043 [Appservice] 172.18.0.4 - - [10/Dec/2023:20:00:57 +0000] "PUT /_matrix/app/v1/transactions/1928258? HTTP/1.1" 200 2 "-" "Synapse/1.97.0"
INFO 20:00:57:293 [Appservice] Processing transaction 1928259
INFO 20:00:57:294 [Appservice] Processing event of type m.room.canonical_alias
INFO 20:00:57:294 [Appservice] Processing event of type m.room.join_rules
INFO 20:00:57:294 [Appservice] Processing event of type m.room.history_visibility
INFO 20:00:57:295 [Appservice] Processing event of type uk.half-shot.matrix-hookshot.github.issue
DEBUG 20:00:57:295 [GitHubIssueConnection] Syncing issue state for !niJRWduYuSZTIoTFAj:datanauten.de
INFO 20:00:57:297 [Appservice] Processing event of type m.room.avatar
INFO 20:00:57:297 [Appservice] Processing event of type m.room.name
ERROR 20:00:57:298 [ConnectionManager] Not creating connection for state !niJRWduYuSZTIoTFAj:datanauten.de/uk.half-shot.matrix-hookshot.github.issue TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at get org [as org] (/usr/bin/matrix-hookshot/Connections/GithubIssue.js:144:31)
at GitHubIssueConnection.syncIssueState (/usr/bin/matrix-hookshot/Connections/GithubIssue.js:186:64)
at GitHubIssueConnection.createConnectionForState (/usr/bin/matrix-hookshot/Connections/GithubIssue.js:44:21)
at ConnectionManager.createConnectionForState (/usr/bin/matrix-hookshot/ConnectionManager.js:174:53)
at Bridge.onRoomEvent (/usr/bin/matrix-hookshot/Bridge.js:834:65)
at Appservice. (/usr/bin/matrix-hookshot/Bridge.js:152:25)
at Appservice.emit (node:events:514:28)
at Appservice.emit (node:domain:488:12)
at Appservice.handleTransaction (/usr/bin/matrix-hookshot/node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:583:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Appservice.onTransaction (/usr/bin/matrix-hookshot/node_modules/matrix-bot-sdk/lib/appservice/Appservice.js:628:13)
INFO 20:00:57:299 [Appservice] Processing event of type m.room.topic
INFO 20:00:57:300 [Appservice] 172.18.0.4 - - [10/Dec/2023:20:00:57 +0000] "PUT /_matrix/app/v1/transactions/1928259? HTTP/1.1" 200 2 "-" "Synapse/1.97.0"
INFO 20:00:59:878 [Appservice] Processing transaction 1928260
INFO 20:00:59:878 [Appservice] Processing event of type m.room.member
INFO 20:00:59:879 [Appservice] 172.18.0.4 - - [10/Dec/2023:20:00:59 +0000] "PUT /_matrix/app/v1/transactions/1928260? HTTP/1.1" 200 2 "-" "Synapse/1.97.0"
```
Contributor guide
Research direction
Start in Connections/GithubIssue.js around the org getter and syncIssueState, using the reported TypeError as the first lead. Trace how the uk.half-shot.matrix-hookshot.github.issue state event is handled through ConnectionManager and Bridge. Done means a dynamically created GitHub issue room remains connected and forwards messages in both directions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100