Code Monkey home page Code Monkey logo

Comments (6)

turt2live avatar turt2live commented on September 15, 2024

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.

starcraft66 avatar starcraft66 commented on September 15, 2024

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.

turt2live avatar turt2live commented on September 15, 2024

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.

starcraft66 avatar starcraft66 commented on September 15, 2024

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.

turt2live avatar turt2live commented on September 15, 2024

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.

starcraft66 avatar starcraft66 commented on September 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.