Comments (6)
That kind of error indicates that the application service was not correctly installed in Synapse. Instead, there should be an error that says something like "The application service has already registered this user".
Deactivating the account will cause problems with the bridge, so I recommend undoing that change.
from matrix-appservice-webhooks.
I'm not sure how to "undo" a deactivation. I tried issuing a password reset for the account and it threw some M_UNKNOWN error.
I ended up restarting Synapse and the bridge and the log seems to get a little bit further, possibly indicating that the bot account does work because it is able to update the display name and stuff.
I made sure that the appservice-registration-webhooks.yaml files are identical in the synapse data directory and in the webhooks app directory.
However, when I invite the bot to a room it does not auto-join it. I made sure that the service is registered on the synapse side and I see the following in the synapse log:
2018-05-19 13:18:18,427 - synapse.config.appservice - 80 - INFO - None - Loaded application service: ApplicationService: {'sender': '@_webhook:nerdsin.space', 'server_name': 'nerdsin.space', 'url': 'http://matrix_appservice_webhooks_1:9000', 'rate_limited': False, 'id': '60e342d66fda58f8b4e399741ba26a519448b382c430e36f4423976e8054b930', 'token': 'redacted', 'namespaces': {'aliases': [], 'rooms': [], 'users': [{'regex': <_sre.SRE_Pattern object at 0x7f95406b3a50>, 'exclusive': True}]}, 'hs_token': 'redacted', 'protocols': set([])}
This is the log from the webhooks bridge:
May-19-2018 13:18:40.170 +00:00 info [index] Preparing database...
May-19-2018 13:18:40.172 +00:00 info [WebhookStore] Running migrations
May-19-2018 13:18:40.290 +00:00 info [index] Preparing bridge...
May-19-2018 13:18:40.290 +00:00 info [WebhookBridge] Constructing bridge
May-19-2018 13:18:40.291 +00:00 info [WebhookBridge] Starting bridge
May-19-2018 13:18:40.934 +00:00 verbose [ProvisioningService] Received intent. Using account @_webhook:nerdsin.space
May-19-2018 13:18:40.935 +00:00 verbose [InteractiveProvisioner] Received bridge. Using default bot intent
May-19-2018 13:18:40.936 +00:00 verbose [WebhookReceiver] Received bridge.
May-19-2018 13:18:40.937 +00:00 info [WebhookBridge] Updating appearance of bridge bot
May-19-2018 13:18:40.948 +00:00 verbose [matrix-appservice-bridge] [-] GET https://nerdsin.space/_matrix/client/r0/joined_rooms (AS) Body:
May-19-2018 13:18:40.960 +00:00 warn [index] No provisioning API token is set - the provisioning API will not work for this bridge
May-19-2018 13:18:40.962 +00:00 info [WebService] API now listening on 0.0.0.0:4501
May-19-2018 13:18:41.010 +00:00 verbose [WebhookStore [SQL]] Executing (default): SELECT id
, objectId
, key
, value
FROM account_data
AS account_data
WHERE account_data
.objectId
= 'bridge';
May-19-2018 13:18:41.025 +00:00 verbose [matrix-appservice-bridge] [-] POST https://nerdsin.space/_matrix/client/r0/register (AS) Body: {"auth":{},"username":"_webhook"}
May-19-2018 13:18:41.059 +00:00 verbose [matrix-appservice-bridge] [-] GET https://nerdsin.space/_matrix/client/r0/joined_rooms (AS) HTTP 200 {"joined_rooms":[]}
May-19-2018 13:18:41.283 +00:00 error [matrix-appservice-bridge] [-] POST https://nerdsin.space/_matrix/client/r0/register (AS) HTTP 400 Error: {"errcode":"M_USER_IN_USE","error":"User ID already taken."}
May-19-2018 13:18:41.285 +00:00 verbose [matrix-appservice-bridge] [-] GET https://nerdsin.space/_matrix/client/r0/profile/%40_webhook%3Anerdsin.space/displayname (@_webhook:nerdsin.space) Body:
May-19-2018 13:18:41.295 +00:00 verbose [matrix-appservice-bridge] [-] GET https://nerdsin.space/_matrix/client/r0/profile/%40_webhook%3Anerdsin.space/displayname (@_webhook:nerdsin.space) HTTP 200 {"displayname":"Webhook Bridge"}
from matrix-appservice-webhooks.
Just to cover a couple things:
- Is
http://matrix_appservice_webhooks_1:9000
accessible? - Does the webhook bridge log say anything about getting an invite?
- Are there any errors in the synapse log? (Should be able to grep for
matrix_appservice_webhooks_1
to see what it is doing).
from matrix-appservice-webhooks.
Is http://matrix_appservice_webhooks_1:9000 accessible?
It would appear so, I can ping the host and I can get an http response from it over port 9000
root@c6ed53541568:/# curl http://matrix_appservice_webhooks_1:9000
Cannot GET /
Does the webhook bridge log say anything about getting an invite?
I get no other messages after the get request for the _webhook account display name. (Other than the empty garbage requests I did in curl from the step above).
Are there any errors in the synapse log?
I just noticed now that every ten or so minutes I get the following in my homeserver.log:
2018-05-19 20:14:39,693 - synapse.http.client - 100 - INFO - - Sending request PUT http://matrix_appservice_webhooks_1:9000/transactions/1?access_token=6a2ade24e0fa900f83eccef0a93277b260ade36cc012b99089d764700afdeb6e
2018-05-19 20:14:39,694 - synapse.http.client - 122 - INFO - - Error sending request to PUT http://matrix_appservice_webhooks_1:9000/transactions/1?access_token=6a2ade24e0fa900f83eccef0a93277b260ade36cc012b99089d764700afdeb6e: ValueError invalid hostname: matrix_appservice_webhooks_1
2018-05-19 20:14:39,695 - synapse.appservice.api - 227 - WARNING - - push_bulk to http://matrix_appservice_webhooks_1:9000/transactions/1 threw exception invalid hostname: matrix_appservice_webhooks_1
To clarify, I am running all of these services in docker containers and they are on the same network. I'm not sure why I can manually communicate with the webhooks container from the synapse one but that synapse is unable to reach the webhooks.
from matrix-appservice-webhooks.
Docker networks can get a bit weird. It's possible Synapse is doing some strange DNS resolution, so you may need to use an IP address.
from matrix-appservice-webhooks.
Thanks a lot, I guess that clears it up. I was able ot get everything connected and running using the container's ip address. I'll have to set a static IP to the container to ensure it never changes then.
from matrix-appservice-webhooks.
Related Issues (20)
- messages are coming in as raw JSON
- Init failed
- Problem with permissions in the room. HOT 1
- GitLab webhooks result in HTTP 400 HOT 8
- Vulnerable dependencies HOT 1
- Slack 'Attachment' Images not displaying HOT 1
- GitLab commit activities are missing newlines HOT 1
- Bridge crashes when mime type of file cannot be determined. HOT 1
- Uploading a webhook avatar from url fails HOT 3
- Https hookurlbase HOT 1
- Direct message webhooks HOT 2
- Traceback on non-string 'text' field
- Appservice not using m.login.application_service HOT 1
- icon_emoji causes bridge to crash. HOT 1
- Cannot get Bridge to work after restart of Matrix and the Bridge - "You are not invited to this room." / "M_USER_IN_USE"
- Keep getting "SQLITE_ERROR: no such table: webhooks" error. Please help? HOT 1
- Pillify webhook target in admin room
- First Newline becomes <br>, even in code block HOT 1
- Fresh installation fails to start - this._orm.import is not a function HOT 1
- 400 error on post HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matrix-appservice-webhooks.