postmarks icon indicating copy to clipboard operation
postmarks copied to clipboard

Unable to follow @[email protected] user

Open TomCasavant opened this issue 1 year ago • 6 comments

Attempted to follow @[email protected] but it couldn't find the webfinger address for the exact same reasons as in #185 Made the suggested change to drop the '/' from the webfinger URL which allowed it to find the inbox I removed the '.json' from the inbox because I was getting this error:

https://bsky.brid.gy/.well-known/webfinger?resource=acct:[email protected]
Profile URL
https://bsky.brid.gy/bsky.brid.gy
{ error: "Couldn't resolve bsky.brid.gy.json as a atproto handle" }

Which was successful, but then I received this error from the brid.gy server:

Sent message to an inbox at bsky.brid.gy!

Response Status Code: 401

Response body: {

  "error": "Couldn't load https://tomcasavant.glitch.me/u/tom to verify signature"

}

I'm not sure if it's something we're missing on our end to point it to the signature or if it's an issue with the brid.gy server (https://github.com/snarfed/bridgy-fed)

TomCasavant avatar May 02 '24 20:05 TomCasavant

@TomCasavant when I fetch https://tomcasavant.glitch.me/u/tom with AS2 conneg, it returns Content-Type: application/json; charset=utf-8. That needs to be application/activity+json or application/ld+json; profile="https://www.w3.org/ns/activitystreams" for ActivityPub to work. https://www.w3.org/TR/activitypub/#server-to-server-interactions

snarfed avatar May 03 '24 18:05 snarfed

@TomCasavant when I fetch https://tomcasavant.glitch.me/u/tom with AS2 conneg, it returns Content-Type: application/json; charset=utf-8. That needs to be application/activity+json or application/ld+json; profile="https://www.w3.org/ns/activitystreams" for ActivityPub to work. https://www.w3.org/TR/activitypub/#server-to-server-interactions

Awesome, thanks! Just from testing it quickly I seem to be getting some 500 errors from bridgy-fed but it's probably something I messed up, I'll look into it this weekend

TomCasavant avatar May 03 '24 20:05 TomCasavant

Welcome! And 500s are always the server's fault; even if you're doing something wrong, it should return 4xx etc. I'm working through lots of BF bugs right now, hopefully I'll fix yours soon.

snarfed avatar May 03 '24 20:05 snarfed

Useful, thanks @snarfed - I've patched user.js in my forked copy of Postmarks to set this content type correctly now.

andypiper avatar May 03 '24 22:05 andypiper

I was looking into this again this morning, @snarfed made the error log a little more specific: we were getting 'id (guid letters and numbers) is not owned by activitypub'

the issue ended up being in the createFollowMessage id https://github.com/ckolderup/postmarks/blob/58d1ca1f052870d750193ff23694ef57779af37b/src/activitypub.js#L147

We should be passing along the full guid url like we are in our other messages: id: `https://${domain}/m/${guid}`,

This fixed it https://fed.brid.gy/ap/@[email protected]

Something went wrong and @[email protected] wasn't added to my list of followers though (we must have sent an accept message because bridgy-fed says it followed the account). So I haven't actually managed to test if posts are going through yet

I was trying to trigger an unfollow so I could try getting bridgy-fed to follow the account again but I think something's broken with our 'Undo follow' setup, I can't seem to unfollow anyone (tried a couple of mastodon accounts), it removes it from our side but from mastodon's side it still says we're following them

Still, that's a bit of progress

TomCasavant avatar Jul 27 '24 15:07 TomCasavant

Manually added bsky.brid.gy as a follower so it could send the create activity...and it worked!

Screenshot_20240727_123658_Bluesky.jpg

Edit: I think the failure to add the account to my list of followers might have been something I did while experimenting w/ it

But the Unfollow issue is still there (though I see that was already marked as an issue #72 )

TomCasavant avatar Jul 27 '24 16:07 TomCasavant

Working on a pull request for this fix, and that "failure to add the account to my list of followers might have been something I did" is actually because postmarks isn't seeing the Accept Follow anywhere so it doesn't get added to the list of followers- so I'll have to keep looking at that

TomCasavant avatar Nov 07 '24 20:11 TomCasavant

Figured it out, the express.json configuration didn't have application/ld+json. PR incoming

TomCasavant avatar Nov 08 '24 20:11 TomCasavant