-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support GoToSocial (blocked on GoToSocial) #1033
Comments
Hmm! We had some problems with other servers discovering Thanks for the logs, they're useful. Looks like your server is fetching and parsing our Webfinger and then fetching the AP actor https://bsky.brid.gy/bsky.brid.gy, which is good. I see in our logs that we returned 200 to that request with valid a AS2 JSON actor. We serve it with (I'm pretty sure your last log line is unrelated, I see why BF fetches that, it's a separate thing, and also it was >50s later here.) Otherwise, you can see the https://bsky.brid.gy/bsky.brid.gy AS2 JSON in a browser, feel free to send it to the GoToSocial maintainers if they want to look! |
I turned on TRACE logging to search for the opt-in account. GoToSocial is getting the response and parsing it successfully. But when it tries to add it to the local database, it's running into a constraint violation on the url field and rolling back the insert. @[email protected] is in my db with https://fed.brid.gy/fed.brid.gy as the URI and https://fed.brid.gy/ as the URL. It's trying to add @[email protected] with https://bsky.brid.gy/bsky.brid.gy as the URI...and https://fed.brid.gy/ again as the URL. It looks like it's using the But that would explain why @WinsDominoes can find it - if their DB doesn't already have a reference to @[email protected], it'll be able to insert the record for @[email protected] I don't know the spec very well, so I'm not sure if the So I don't know if the problem is that the field needs to be unique in the actual JSON, or that GoToSocial needs to change the data constraints. The GTS team is on vacation this month, but if it looks like the change needs to be on their end, I can try the schema change on my test server, see if it helps, and file an issue when they get back and reopen the repo. I'll try to get some debug info on the follow requests tomorrow evening if I have time. |
Great sleuthing! Sounds like you found the problem. AP |
Aha! The extra constraint on URL is a known issue in GTS: One of those cites a couple of places where they do lookups assuming it's unique, so those need to be fixed in order to safely change the schema. So the discovery part is definitely covered by that issue! That leaves the Follow part, which I still need to collect logs for. |
OK, I think the key lines related to trying to follow my bsky account from gts are these:
I think GTS not being able to locate the account in the DB (except that this time I confirmed that the account is in the DB, with the correct URI) is likely a bug in GTS. I've got most of a month to look at that part again if I want to before submitting a bug report to them. I'm not sure about the two attempts to contact the bridge's sharedInbox, though. |
Aha, useful! So in the process of handling the first shared inbox request, we synchronously POSTed our own {
"id": "https://bsky.brid.gy/convert/ap/did:plc:atsrwbmgqyeko5cjtzt5cymo/followers#accept-https://gts.keysmash.xyz/users/addhawk/follow/015VX2246S40WTNVYE0T9E0WAW",
"actor": "https://bsky.brid.gy/ap/did:plc:atsrwbmgqyeko5cjtzt5cymo",
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Accept",
"object": {
"actor": "https://gts.keysmash.xyz/users/addhawk",
"id": "https://gts.keysmash.xyz/users/addhawk/follow/015VX2246S40WTNVYE0T9E0WAW",
"url": "https://gts.keysmash.xyz/users/addhawk#followed-did:plc:atsrwbmgqyeko5cjtzt5cymo",
"type": "Follow",
"object": "did:plc:atsrwbmgqyeko5cjtzt5cymo",
"to": [
"did:plc:atsrwbmgqyeko5cjtzt5cymo",
"https://www.w3.org/ns/activitystreams#Public"
]
},
"to": [
"https://www.w3.org/ns/activitystreams#Public"
]
} Granted, we should send that |
OK! Fixed #1041, which is the main reason BF was getting stuck on the 500 from sending GTS a Let me know how it goes, happy to help more! |
Reopening to track our GoToSocial interop. Current status here is that GoToSocial (0.16.0, latest released version 500s when we fetch it with an HTTP signature with |
According to https://github.com/superseriousbusiness/gotosocial/blob/c023bd30f381d6532578ee0bc40d12704c2b97a6/internal/typeutils/astointernal.go#L173, a likely workaround would be to swap the order of the "url": [
"https://fed.brid.gy/",
"https://bsky.brid.gy/"
] to "url": [
"https://bsky.brid.gy/",
"https://fed.brid.gy/"
] . I'm not sure how quickly that'd fix it on servers that already have this account in their database, but I suspect it'd bypass the problem on ones that so far have only |
I'll remove the |
Workaround for GoToSocial. See snarfed#1033 (comment)
Workaround for GoToSocial. See #1033 (comment)
While GoToSocial can now fetch the
edit: it seems it does have the
|
That's the same bug, yes. (superseriousbusiness/gotosocial#2945) Can you cause the instance to refetch/update |
As I understand it, the problem is not I bodged it like this, and got the bridge to mostly work:
Weirdly I now have two of them: sqlite database outputsqlite> SELECT * FROM accounts WHERE url = 'https://fed.brid.gy/'; id = 01JCRQHFA6ZFSA5DDXH4Z4FA3R created_at = 2024-11-15 20:16:56.683142+00:00 updated_at = 2024-11-15 20:16:56.683142+00:00 fetched_at = 2024-11-15 20:16:56.683142+00:00 username = fed.brid.gy domain = fed.brid.gy avatar_media_attachment_id = 01JCRQHFBBXSYCWNFSVGRT5VX9 avatar_remote_url = https://fed.brid.gy/static/bridgy_logo_square.jpg header_media_attachment_id = 01JCRQHFJ4CKKJC00ZG2WYHPEB header_remote_url = https://fed.brid.gy/static/bridgy_fed_banner.png display_name = Bridgy Fed emojis = null fields = null fields_raw = null note = Bridgy Fed is a bridge between decentralized social networks like the IndieWeb, fediverse, Bluesky, and others. More info here. note_raw = memorial = 0 bot = 1 locked = 1 discoverable = 0 uri = https://fed.brid.gy/fed.brid.gy url = https://fed.brid.gy/ inbox_uri = https://fed.brid.gy/fed.brid.gy/inbox shared_inbox_uri = https://web.brid.gy/ap/sharedInbox outbox_uri = https://fed.brid.gy/fed.brid.gy/outbox following_uri = https://fed.brid.gy/fed.brid.gy/following followers_uri = https://fed.brid.gy/fed.brid.gy/followers featured_collection_uri = actor_type = Application private_key = public_key = {"N":19086279233169020349192059689095836109398073954970021960930094516078417621184632944226647104938930843509708224671637763291274700600219006379085971423674967673991604978212422869676544214149539308800434426486918105134222702089925275950630755331516635692291258590592206061429747183887180147349018066861611836960803945376945234918904904061857800412842583032159150976623242576886922171076759834609466509564094008513359614213287367050678004119092016769549824252851267796191985400591509438743289115102691701592785990614370076528839419173141277249730942474779752241907587872581899336638856293133797513866512743681525158220667,"E":65537} public_key_uri = https://fed.brid.gy/fed.brid.gy#key sensitized_at = silenced_at = suspended_at = suspension_origin = public_key_expires_at = moved_to_uri = also_known_as_uris = ["https://fed.brid.gy/"] move_id = sqlite> SELECT * FROM accounts WHERE url = 'https://fed.brid.gy/fed.brid.gy'; id = 01JCRPWDQ3KZTD5T6EB5XSCXGB created_at = 2024-11-15 20:05:27.166682+00:00 updated_at = 2024-11-15 20:05:27.166682+00:00 fetched_at = 2024-11-15 20:05:27.166682+00:00 username = bsky.brid.gy domain = bsky.brid.gy avatar_media_attachment_id = 01JCRPWDZYZ9D4RW3VMMMCZ12W avatar_remote_url = https://fed.brid.gy/static/bridgy_logo_square.jpg header_media_attachment_id = 01JCRPWE86F61GEDB70WC7373F header_remote_url = https://fed.brid.gy/static/bridgy_fed_banner.png display_name = Bridgy Fed for Bluesky emojis = null fields = null fields_raw = null note = Anyway, this moved me on to the next series of errors: following bridged bsky accounts fails with the following.
|
Yes, which fails only because it can't put the signing user into its database when the
Progress 🙂 The error is thrown here:
I'll look through a bit to see how that's hit precisely, if I can see it by just reading the code. Edit: I don't think I can find it. (My Go is limited and I don't think the language lends itself to reading with half-knowledge.) |
I enabled trace logging in GoToSocial and retried a follow. Looks like it's upset with this: {
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "https://bsky.brid.gy/ap/did:plc:inze6wrmsm7pjl7yta3oig77",
"id": "https://bsky.brid.gy/convert/ap/did:plc:inze6wrmsm7pjl7yta3oig77/followers#accept-https://gotosocial.i.eta.st/users/eta/follow/01JYZNV5JJ9GP3QQTDJJG4HP5X",
"object": {
"actor": "https://gotosocial.i.eta.st/users/eta",
"id": "https://gotosocial.i.eta.st/users/eta/follow/01JYZNV5JJ9GP3QQTDJJG4HP5X",
"object": "did:plc:inze6wrmsm7pjl7yta3oig77",
"to": "https://bsky.brid.gy/ap/did:plc:inze6wrmsm7pjl7yta3oig77",
"type": "Follow",
"url": "https://gotosocial.i.eta.st/users/eta#followed-did:plc:inze6wrmsm7pjl7yta3oig77"
},
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Accept"
} I would hazard a guess that it's looking at the (edit: looking at the spec and what mastodon does, I'm not sure that's indeed compliant) |
Yeah, that is definitely not compliant on our end. I think other software probably just looks at the I'll file a separate issue. |
I think I've fixed #1033 (comment) on our end. @eeeeeta mind trying again? |
@snarfed Yes, I can follow bridged bluesky users now, thank you! |
Exciting! Thanks for confirming! I've lost the plot here overall a bit...sounds like GTS still needs to fix #1033 (comment) ? And nothing else outstanding on our side? |
For instances where the So in theory bridging could work already, as long as both |
It does! I deleted Over on Bluesky, I was able to find and follow my GoToSocial profile, and the next post I made on GTS did in fact get bridged! https://bsky.app/profile/kelson.notes.kvibber.com.ap.brid.gy/post/3lc7cqax2sh42 Now to test the other direction.... |
Great news! Thanks all! Now to get GTS to fix the actual bug so that admins don't all have to do that manually. |
And I can follow a Bluesky account from GoToSocial now! I had to withdraw the request, follow, unfollow, and follow again, but hopefully that's only because I'd already tried to follow that account in the past. |
Following up on #995: My GoToSocial server is unable to discover @[email protected] at all. It can retrieve the profile for my bridged Bluesky account @[email protected], but the follow request doesn't seem to reach Bluesky.
Some possibly relevant logs from the GoToSocial side:
The last line is particularly weird, since that's neither the username nor the domain I'm using on this server.
The text was updated successfully, but these errors were encountered: