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

Uploading a webhook avatar from url fails #72

Open
starcraft66 opened this issue May 2, 2020 · 3 comments · May be fixed by #78
Open

Uploading a webhook avatar from url fails #72

starcraft66 opened this issue May 2, 2020 · 3 comments · May be fixed by #78
Labels

Comments

@starcraft66
Copy link
Contributor

Uploading a webhook avatar from url fails with the following error:

May-2-2020 19:44:05.276 +00:00 info [WebService [Hook QR6ECFaVVz7Gnqf9GvhmA6qjbn0vVEzLjHIisQLaiMdEEsCsbNCoCYxhnEalNuWp]] Publishing webhook request for processing
May-2-2020 19:44:05.279 +00:00 info [WebhookBridge] Updating appearance of @_webhook__StrPtLURixPXnphmTc_nerdsin_space_My_Cool_Webhook:nerdsin.space
May-2-2020 19:44:05.350 +00:00 info [WebhookBridge] Updating display name from '_webhook__StrPtLURixPXnphmTc_nerdsin_space_My_Cool_Webhook' to 'My Cool Webhook' on @_webhook__StrPtLURixPXnphmTc_nerdsin_space_My_Cool_Webhook:nerdsin.space
May-2-2020 19:44:05.420 +00:00 info [utils] No content-type given by server, guessing based on file name.
Returning the raw JSON from uploadContent(). Future versions of the js-sdk will change this default, to return the parsed object. Set opts.rawResponse=false to change this behaviour now.
May-2-2020 19:44:05.422 +00:00 error [matrix-appservice-bridge] [-] POST https://nerdsin.space/_matrix/media/v1/upload (@_webhook:nerdsin.space) HTTP null Error: {}
May-2-2020 19:44:05.425 +00:00 error [UploadContent] Failed to upload content:
Error: Argument error, options.body.
May-2-2020 19:44:05.426 +00:00 info [WebhookBridge] Updating avatar for @_webhook__StrPtLURixPXnphmTc_nerdsin_space_My_Cool_Webhook:nerdsin.space
May-2-2020 19:44:05.444 +00:00 error [matrix-appservice-bridge] [-] PUT https://nerdsin.space/_matrix/client/r0/profile/%40_webhook__StrPtLURixPXnphmTc_nerdsin_space_My_Cool_Webhook%3Anerdsin.space/avatar_url (@_webhook__StrPtLURixPXnphmTc_nerdsin_space_My_Cool_Webhook:nerdsin.space) HTTP 400 Error: "{\"errcode\":\"M_MISSING_PARAM\",\"error\":\"Missing key 'avatar_url'\"}"
May-2-2020 19:44:05.445 +00:00 error [WebhookReceiver] Missing key 'avatar_url'
undefined

My server runs matrix-media-repo which may have something to do with this error.

@turt2live
Copy link
Owner

This is because the bridge is built on an ancient version of various SDKs and is in desperate need of finishing that rewrite project.

@turt2live turt2live added the bug label May 4, 2020
@tcheronneau
Copy link

Hey I'm having the same issue. Is there a way to bypass this ?

@laszabine
Copy link

I have the same issue. I tried changing the json key avatarUrl to avatar_url, in which case I get this:

Oct 30 10:19:09 majestix matrix-appservice-webhooks[12791]: Oct-30-2020 10:19:09.444 +00:00 info [WebhookBridge] Updating appearance of @_webhook__sCnSgtRcSwvjDivpBN_1m_at_Sonarr:1m.at

The message is delivered, but the appearance of the webhook is in fact not updated.

If I supply both json keys, I get both the error @starcraft66 posted as well as the confirmation I included above, and the message is not delivered.

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

Successfully merging a pull request may close this issue.

4 participants