-
Notifications
You must be signed in to change notification settings - Fork 31
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
Returning 400: Target post https://mastodon.technology/@snarfed/3194674 has no Atom link #68
Comments
hmm! sorry for the trouble. not sure what's going on here, but i'll take a look soon. |
to add a bit of context here, based on the log, Bridgy Fed first tried to reply via ActivityPub, which is the protocol that Mastodon supports. it sent a valid AP request, but Mastodon returned an error. Bridgy Fed then tried to fall back to OStatus, which is why it complained that https://mastodon.social/@swentel/100776214865184909 (not your own post) "has no Atom link." the real question is, why did mastodon.social fail a (seemingly) perfectly good AP request? i'll keep looking. |
Thanks for looking into this :) |
argh, sorry for the trouble, and thanks for the nudge! i'll look at this again. |
Thing is, I have successfully used Bridgy Fed for quite a while to interact with that very Mastodon instance. Either they pushed some Mastodon update that broke things, or it's some corner case I've just hit. |
@nekr0z interesting. when bridgy fed sends fed.fab.industries this AP {
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"object": {
"published": "2020-10-21T20:13:17+0300",
"content": "<p>While I do totally agree with you...",
"url": "https://fed.brid.gy/r/https://evgenykuznetsov.org/en/reactions/2020/face-masks/",
"inReplyTo": "https://fed.fab.industries/users/fabsh/statuses/105069505860853845",
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"attributedTo": [
{
"url": "https://fed.brid.gy/r/https://evgenykuznetsov.org",
"type": "Person",
"name": "Evgeny Kuznetsov",
"image": [
{
"url": "https://evgenykuznetsov.org/img/avatar.jpg",
"type": "Image",
"name": "Evgeny Kuznetsov"
}
],
"icon": [
{
"url": "https://evgenykuznetsov.org/img/avatar.jpg",
"type": "Image",
"name": "Evgeny Kuznetsov"
}
],
"preferredUsername": "evgenykuznetsov.org",
"id": "https://fed.brid.gy/evgenykuznetsov.org"
}
],
"tag": [
{
"type": "Mention",
"href": "https://fed.fab.industries/users/fabsh"
}
],
"id": "https://fed.brid.gy/r/https://evgenykuznetsov.org/en/reactions/2020/face-masks/",
"cc": [
"https://www.w3.org/ns/activitystreams#Public",
"https://fed.fab.industries/users/fabsh",
"https://fed.fab.industries/users/fabsh/followers"
]
}
} fed.fab.industries responds with:
not sure why yet. |
maybe fed.fab.industries was recently configured to block replies somehow? cc @fabsh...? or some other update, like you mentioned? |
401 implies that the HTTP
guess i need to dig in and understand what they changed. |
looks like this is the culprit: mastodon/mastodon#15016 |
ok, i'm now including and signing the |
As I said before, Bridgy Fed did successfully pass my replies to that very Mastodon instance (this one, for example, just 4 days before things broke). And @fabsh does seem to be running 3.2.1 now (which was released in the meantime), so whatever the issue is, it is very much likely related to that release. Not sure whether it's the same thing @sparxsys originally reported — there was no 3.2.1 back then. |
@snarfed is there a way I can help with debugging that? The code in Mastodon 3.2.1 is indeed stricter than it used to be, but as you said, it should return specific error messages when issues occur. |
@ThibG thanks for offering! you're right, the specific error messages were definitely helpful. i worked through those, but i'm now getting the generic i expect this means Mastodon couldn't verify the HTTP signature. i'm using the httpsig Python package to generate it, which was working before. any tips on debugging generic 401 errors from Mastodon like this? (apart from installing and testing Mastodon locally, which I'm not quite ready to commit to. 😁) |
You could try sending to |
thanks for the nudge @ThibG! you're absolutely right, there was indeed a body with more detail. i thought i was logging it, but evidently not.
that confirms my hunch that this is a signature verification failure. still a bit confusing, since these signatures were succeeding with Mastodon before 3.2.1, but 🤷. i'll look at a few more things, and i may take you up on your offer of testing against social.sitedethib.com with its instrumentation. thanks again for helping! |
Nothing should have changed regarding how the signatures are verified/computed. My hunch is that maybe, in signing more headers to please Mastodon's new requirements, you inadvertently added some header twice (e.g., |
Good hunch, thanks! Didn't pan out, but gave me some other ideas. I'll keep looking. |
Hah, I got hit by this one as well (mastodon/mastodon#14556 (comment) I mean). I haven't got to the digest signing part yet, but I'll report back the changes in my Drupal AP module if I can get it working. |
@snarfed I got it working again for mastodon 3.2.1 adding the digest header, this is the commit in case it you're interested: https://git.drupalcode.org/project/activitypub/commit/0bdd562 |
not working yet. :( details in #68 (comment)
@snarfed I guess the body as serialized by requests might be different from what you actually sign? That's just a hunch, I have not tested your code. The offer to try on social.sitedethib.com/inbox is still up, and I've added a bit specific to the Digest header for debugging |
@ThibG thanks again for the help! i definitely appreciate the instrumenting you set up on social.sitedethib.com, i may try it soon. i'll let you know. |
ok @ThibG! i sent an AP activity to {
"published": "2020-10-31T13:37:22-07:00",
"content": "likes <a class=\"u-like u-like-of\" href=\"https://social.sitedethib.com/@Thib/101878161113758535\">Claire: \u201cMy girlfriends are the most wonderful people ever\u2026\u201d \u2013 Mastodon (instance perso)</a>\n<cite class=\"via\"><a href=\"https://fed.brid.gy/\">via Bridgy Fed</a></cite>",
"url": "https://fed.brid.gy/r/https://snarfed.org/2020-10-31_claire-my-girlfriends-are-the-most-wonderful-people-ever-mastodon-instance-perso",
"actor": {
"url": "https://fed.brid.gy/r/https://snarfed.org/",
"type": "Person",
"name": "Ryan Barrett",
"image": [
{
"url": "https://secure.gravatar.com/avatar/947b5f3f323da0ef785b6f02d9c265d6?s=96&d=blank&r=g",
"type": "Image"
}
],
"icon": [
{
"url": "https://secure.gravatar.com/avatar/947b5f3f323da0ef785b6f02d9c265d6?s=96&d=blank&r=g",
"type": "Image"
}
],
"preferredUsername": "snarfed.org",
"id": "https://fed.brid.gy/snarfed.org"
},
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Like",
"object": "https://social.sitedethib.com/users/Thib/statuses/101878161113758535",
"id": "https://fed.brid.gy/r/https://snarfed.org/2020-10-31_claire-my-girlfriends-are-the-most-wonderful-people-ever-mastodon-instance-perso",
"cc": [
"https://www.w3.org/ns/activitystreams#Public",
"https://social.sitedethib.com/users/Thib",
"https://social.sitedethib.com/users/Thib/followers"
]
} |
Hmm, my instrumentation was lacking some info to debug that more easily, but it's definitely an issue with the Digest not matching, and I'm pretty sure it's because |
thanks! you did mention that before, i should have tried it earlier. good idea, but no luck. tried just now, 22:24:12 UTC, same result. code in 199d4d6. |
@snarfed ok found it, in your |
hah, wow, great catch! single character typo bugs like that are the worst. thank you so much for your help! got a 202 from social.sitedethib.com this time, looks like that may have done the trick. 🎉 |
I can confirm it's working for me now. Thank you! |
Hi! Just saw this now. Sorry I wasn't able to help, but glad to see you got it fixed. 👍 |
Hello,
I am trying to setup this on my Drupal site using Indieweb module.
Source: https://www.ravisagar.in/reply/trying-send-webmention-again-mastadon
Target: https://mastodon.social/@swentel/100776214865184909
Error:
I 2020-09-02 06:45:13.381355 Response source target: https://www.ravisagar.in/reply/trying-send-webmention-again-mastadon https://mastodon.social/@swentel/100776214865184909
I 2020-09-02 06:45:13.383153 Returning 400: Target post https://mastodon.social/@swentel/100776214865184909 has no Atom link
E 2020-09-02 06:45:13.454242 Error 400, response body: '400 Bad Request\n\nThe server could not comply with the request since it is either malformed or otherwise incorrect.\n\n Target post https://mastodon.social/@swentel/100776214865184909 has no Atom link '
I have done the setup as mentioned on this page: https://fed.brid.gy/. I believe my atom feed is fine. Also I created .well-known folder and added these lines in the .htaccess
Not sure what I am missing here so raising an issue. I might have missed some configuration but my site is sending the webmention which I can also see in the logs: https://fed.brid.gy/responses
Thanks for the great application :)
The text was updated successfully, but these errors were encountered: