-
Notifications
You must be signed in to change notification settings - Fork 5
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
Bot didn't join the conversation/room #4
Comments
Can you show the logs generated by the bot on startup? It would also be helpful if you could raise the log verbosity first. You can do this by starting the application like so: |
It looks like you named the bot user |
yes that is right I changed it to not write my domain here in public |
Okay, understood. Looking through the logs a bit more closely it actually looks like the user namespace regexes do not match up between your appservice registration ( Something else that's probably causing issues here is that you have In your case it looks like you have Try setting |
I've linked the file direct in
I think I have already done it. here is my
|
I'm not sure what's wrong in that case. I have the impression that, for whatever reason, Synapse never attempts to send the invitation event to the appservice, but I have no idea why. It could be that there's something misconfigured in I'll post my own configuration below, which I know to be working. Perhaps it will be of use to you in spotting a difference that we've overlooked so far.
app_service:
id: webhook-gateway
hs_token: k5x#MASKED#
as_token: hmh#MASKED#
user_pattern: '@_hook_{name}'
sender_localpart: webhook
rate_limited: true
homeserver_name: mydomain.tld
# Both URLs are reverse-proxied, so the ports are missing here
app_service_url: https://gateway.mydomain.tld
homeserver_url: https://matrix.mydomain.tld
listen_host: '0.0.0.0'
listen_port: 8023 This generates the following id: 'webhook-gateway'
hs_token: 'k5x#MASKED#'
as_token: 'hmh#MASKED#'
namespaces:
users:
- exclusive: true
regex: '@_hook_.*'
- exclusive: true
regex: '@webhook.mydomain.tld'
aliases: []
rooms: []
url: 'https://gateway.mydomain.tld'
sender_localpart: 'webhook'
rate_limited: true
protocols: null
After you send an invitation, you should see the following lines in your homeserver log (I've stripped them down a bit for legibility).
|
I just remembered something else, do you by any chance have registration disabled? ( The bot user (unlike the webhook users it creates) needs to actually be registered on the server, so you should temporarily enable registration when the appservice first starts. After that, you can disable it again. |
This is crazy, your comment does the trick. My Matrix instance is reverse proxied too but I haven't a "subdomain" for the appservice gateway. So I was starting to search through my homeserver.yaml, There was no appservice port configured by default. The documentation never mentioned that you have to configure the port before you can use appservices. So I find out the matrix-webhook-gateway start this Port 8023. (searched via My listeners section in homeserver.yaml
The webhook user (in my case "testwebhook") was created with |
Yes, that is correct, however, you don't need to configure anything in your In addition to this, the gateway also listens for incoming webhooks on another port, 8020. This isn't relevant to us right now, but for the sake of completeness I'll mention this as well. So, in my case, I have Matrix running on its own server, listening on port 8008, with a reverse proxy pointing Your logs show that Synapse is configured to connect to the gateway on curl -v http://127.0.0.1:8023 If the gateway is reachable, it will return a 404 (since it only allows submission of Matrix events on this endpoint), which should look like this:
It should also generate the following message in the gateway log:
I hope this clarifies it a bit!
That is good to know, thanks! I remember this being a problem on earlier releases, seems like it has been fixed since then. |
I started testing this morning:
Looks like the users is creating again... I don't no if its right:
I think the curl worked. |
That's correct. It's a bit of a quirk in the appservice library, which will always try to register the appservice user even if it already exists, so you can safely ignore this warning. |
After 2 weeks of testing, searching in git issues and testing again it worked. The solution is written in here: would be great if someone can explain it to me. I didn't understand this failure and I think it would be a good for anybody who is searching for this issue. |
Good to hear you were able to figure it out after all, that looks like a pretty nasty issue. |
Hello,
I installed the bot without docker (tried also with docker). When I invite the bot to a room/conversation the bot didn't join. Status keeps invitation pending. I didn't found any errors in the homeserver.log.
Thanks in advance.
The text was updated successfully, but these errors were encountered: