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

Cannot send messages: avatar_url: Not a well formed URL #649

Closed
spantaleev opened this issue Dec 16, 2020 · 5 comments
Closed

Cannot send messages: avatar_url: Not a well formed URL #649

spantaleev opened this issue Dec 16, 2020 · 5 comments

Comments

@spantaleev
Copy link

Trying to send a message, I'm getting this every time:

[bot-sdkAppservice] info: [ 'Processing transaction 6474' ]
[bot-sdkAppservice] info: [ 'Processing event of type m.room.message' ]
[MatrixEventProcessor] verbose: Got m.room.message event
[MatrixEventProcessor] verbose: Looking up XXXXXXX_XXXXX
[MatrixEventProcessor] verbose: Profile @user:example.com:!ZZynfOEfEfrCnuHjp:example.com not cached
[bot-sdkMatrixLiteClient (REQ-1)] info: [
'GET http://matrix-synapse:8008/_matrix/client/r0/rooms/!ZZynfOEfEfrCnuHjp%3Aexample.com/state/m.room.member/%40user%3Aexample.com'
]
172.18.0.4 - - [16/Dec/2020:00:50:51 +0000] "PUT /transactions/6474?access_token=TOKEN_HERE HTTP/1.1" 200 2 "-" "Synapse/1.24.0"

[DiscordBot] warn: Failed to send message $BBBB9npTjGKft-bj8vpYsfdo09FNwbNIjRGhFEVCEcXqZk

[DiscordBot] verbose: DiscordAPIError: Invalid Form Body
avatar_url: Not a well formed URL.
at RequestHandler.execute (/node_modules/better-discord.js/src/rest/RequestHandler.js:170:25)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
method: 'post',
path: '/webhooks/XXXXX/AAAAAA-BBBBBB?wait=true',
code: 50035,
httpStatus: 400
}

[bot-sdkMatrixLiteClient (REQ-2)] info: [
'POST http://matrix-synapse:8008/_matrix/client/r0/rooms/!ZZynfOEfEfrCnuHjp%3Aexample.com/receipt/m.read/%2AAAA-BBBB'
]

It last worked some 3 days ago, and now that I try it, it doesn't work anymore. At first, I thought I broke it during the SQLite -> Postgres migration I've been working on for spantaleev/matrix-docker-ansible-deploy#740, but I've tried with my old SQLite database and it's still the same.

I'm using docker.io/halfshot/matrix-appservice-discord:v1.0.0.

@spantaleev
Copy link
Author

Receiving messages still works. It's just sending that seems to be broken.

@auscompgeek
Copy link
Contributor

auscompgeek commented Dec 16, 2020

Huh, Synapse validates avatar_url in member events now?

@spantaleev
Copy link
Author

This seems to be caused by spantaleev/matrix-docker-ansible-deploy#748

spantaleev added a commit to spantaleev/matrix-docker-ansible-deploy that referenced this issue Dec 16, 2020
…cord

Revert "Correct inabillity for appservice-discord to connect"
This reverts commit 673e19f.

While certain things do work even with such a local URL, sending
messages leads to an error like this:

> [DiscordBot] verbose: DiscordAPIError: Invalid Form Body
> avatar_url: Not a well formed URL.

Fixes matrix-org/matrix-appservice-discord#649

The sample configuration file for appservice-discord
https://github.com/Half-Shot/matrix-appservice-discord/blob/c29cfc72f55f1f81e43e2d71f5c080d752d1a884/config/config.sample.yaml#L8
explicitly says that we need a public URL.
@spantaleev
Copy link
Author

I believe this should be fixed now (by using a public URL in bridge.homeserverUrl instead of a local one), but I'll confirm it tomorrow.

@spantaleev
Copy link
Author

The problem is indeed resolved. Thanks @auscompgeek for helping me troubleshoot it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants