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

Unable to subscribe to relays from Misskey #2

Open
bleonard252 opened this issue Apr 14, 2023 · 26 comments
Open

Unable to subscribe to relays from Misskey #2

bleonard252 opened this issue Apr 14, 2023 · 26 comments

Comments

@bleonard252
Copy link

I'm unable to follow any of the relay feeds from my Calckey instance (a fork of Misskey). They're all listed as "pending:"

image

I'm not sure how this ActivityPub Relay supports *key.

Does it help if I add the Calckey instance is set up at a subdomain of a Glitch-soc (Mastodon fork) instance that has these subscribed?

@astro
Copy link
Owner

astro commented Apr 14, 2023

Can you try dumping the HTTP(s) requests between relay.fedi.buzz and your Calckey instance in general and especially from the seconds after a follow request?

Anecdote: I've set up a Pleroma instance, and since 3a3a25d following works. Pleroma ingests the posts URLs into its database but still does not fetch the actual metadata and content.

@bleonard252
Copy link
Author

I'm getting absolutely nothing relay-related in the logs. I'm not sure how I would set up such a mechanism.

I looked through my instance and found out it knows about the service accounts for the relays I've tried following. It doesn't see any of their posts or Announces, it seems.

On a side note, I discovered the really neat but possibly unintended side effect that people can directly follow @tag-something and @instance-domain at relay.fedi.buzz and it actually works (Mastodon sees it as a boost)!

@moyitpro
Copy link

moyitpro commented May 6, 2023

I think we found the problem. Misskey and any of its forks requires authorized fetch support, so Fedibuzz is going to need to add support for this.

Here is the issue I’m referring to;
https://codeberg.org/calckey/calckey/issues/10002#issuecomment-904240

@astro
Copy link
Owner

astro commented May 6, 2023

Ah right! Thank you for clearing that up.

I don't have these signatures as they are not included in Mastodon's streaming API. Out of curiosity: does *key provide these signatures in a streaming API?

Signatures would certainly make sense if buzzrelay was sending content. But all a following instance gets is links to content.

@astro astro closed this as completed May 6, 2023
@moyitpro
Copy link

moyitpro commented May 6, 2023

Misskey tends to use a different API, but I was able to get Fedibuzz working with my Calckey instance since it has Mastodon API compatability.

I think the relay issue with Misskey is for the fact that none of the stuff are being signed. I set up a relay to connect my Mastodon instance with my Calckey instance and required me to generate a RSA key. My guess is that any connections from the relay to the instance that created the relay request by the instance's administrator must be signed.

https://github.com/yukimochi/Activity-Relay/wiki/01.-Install

@astro
Copy link
Owner

astro commented May 6, 2023

Great to know that Calckey can follow buzzrelay! 🎉

Just for the record, there are two signature schemes in ActivityPub:

  • HTTP signature of an actor, implemented
  • Linked Data Signatures by the author, of the content. We would need to get that from the input API so we could just pass it along.

If Mastodon was ever changed to check the LDS then that would mean Game Over for this project.

@moyitpro
Copy link

moyitpro commented May 7, 2023

What I meant is my Mastodon instance can follow a Calckey instance, but a Calckey instance can't use Fedibuzz at all. If you can spin up a test instance and see what is going on as the status stays in pending, and never accepted.

@darrinsmart
Copy link

I tried following a tag from my gotosocial instance, which also requires all requests to be signed. It looks like the follow-request goes out to relay.fedi.buzz, but then the relay connects back to dereference my user account and that is failing.

timestamp="13/05/2023 10:09:21.957" func=federation.(*federator).AuthenticateFederatedRequest level=DEBUG requestID=mpghc5m804000r3sfkmg msg="http request wasn't signed or http signature was invalid"
timestamp="13/05/2023 10:09:21.957" func=middleware.Logger.func1.1 level=INFO latency="492.776µs" clientIP=2a00:8180:.... userAgent=buzzrelay/0.1.0 method=GET statusCode=401 path=/users/darrin requestID=mpghc5m804000r3sfkmg msg="Unauthorized: wrote 82B"

Taking a quick look at the source.. it looks like this might be this call to fetch() in endpoint.rs. If I'm reading it correctly fetch::fetch() doesn't sign the request.

My understanding is that Mastodon behaves similarly when configured in secure mode. Maybe this is also the issue with Calckey.

@astro
Copy link
Owner

astro commented May 13, 2023

@darrinsmart Thanks for the research! I should probably setup a testing gotosocial instance for this... or can you work on a patch? I understand this now and will change the fetch() call.

@ThatOneCalculator
Copy link

Awesome! Sorry I'm late to the thread, but yes Calckey requires secure fetch.

@astro astro reopened this May 14, 2023
@astro
Copy link
Owner

astro commented May 14, 2023

Now running with Authorized Fetch:tm:. Works for you?

@bleonard252
Copy link
Author

bleonard252 commented May 14, 2023 via email

@moyitpro
Copy link

Can confirm the same, not sure how to debug this on Calckey.

2023-05-14_18-03-26 2023-05-14_18-04-52

@bleonard252
Copy link
Author

bleonard252 commented May 14, 2023 via email

@moyitpro
Copy link

Relays are set up by admins in Calckey's Control Panel. I might spin up an ngrok-based instance on my computer to test if it works, but I have a hunch the relay as a whole may be broken, if the following technique no longer works...

I was able to get an Activity-Relay, based relay with three hosts joined to it (this includes my Calckey instance) and it worked. Must be the implementation.

@astro
Copy link
Owner

astro commented May 15, 2023

@moyitpro It is the implementation that we are trying to fix here!

@darrinsmart
Copy link

I can follow from my gotosocial instance now. Thanks @astro!

It doesn't actually work after that, I think because gotosocial doesn't yet have explicit relay support yet and I was just testing by following from my user account. fedi.buzz attempts to deliver posts but gts is rejecting them. I haven't looked into why - there is no particular error logged except "Bad Request". I expect it probably isn't an issue with fedi.buzz.

@astro
Copy link
Owner

astro commented May 26, 2023

I've had a debugging session together with @CutestNekoAqua. Calckey can now follow the relay. It's still not rendering posts, just like Pleroma.

@Ninlives
Copy link

It seems my Misskey instance can subscribe to relay.fedi.buzz, but no activities can be delivered due to the following error:
image
And by the way, I tried to run my own buzzrelay service, but the following error appears unless I set services.buzzrelay.streams to mkForce []:
image
And Misskey failed to subscribe to my own buzzrelay service due to the following error:
image
Any clues?

@astro
Copy link
Owner

astro commented Jun 18, 2023

@Ninlives Can you please create separate tickets? Include your service.buzzrelay config! Please paste console output with backticks, I cannot copy anything from screenshots.

@Ninlives
Copy link

@astro Sorry, my bad, will do maybe tomorrow. By the way, is there an option to print some debug message about what requests are being processed etc. from buzzrelay?

@astro
Copy link
Owner

astro commented Jun 19, 2023

@Ninlives No. You can add dbg!(&req); in some places.

@moyitpro
Copy link

This appears to be fixed, at least in Calckey.

https://codeberg.org/calckey/calckey/commit/27965f708d639ef7e127d75a6f1c49a1b14d17e5

Now they are rendering posts as seen with Calckey 14.0 RC3

https://sakurajima.social/@[email protected]

@astro astro closed this as completed Jun 29, 2023
@ThatOneCalculator
Copy link

ThatOneCalculator commented Jun 29, 2023

I think this was closed prematurely. It works on Calckey now but still not Misskey as far as I can tell.

@astro astro reopened this Jun 29, 2023
@astro astro changed the title Unable to subscribe to relays from *key Unable to subscribe to relays from ~*key~Misskey Jun 29, 2023
@astro astro changed the title Unable to subscribe to relays from ~*key~Misskey Unable to subscribe to relays from Misskey Jun 29, 2023
@jprjr
Copy link

jprjr commented Oct 20, 2023

Just thought I'd share - I'm on Firefish (rebranded Calckey), I seem to be able to connect to relays, but I'm unable to follow those account-like relays (@[email protected], for example). The follow request remains in a processing state, could it be an issue with authorized fetch for following the account-like relays?

@ThatOneCalculator
Copy link

ThatOneCalculator commented Oct 20, 2023

If it's a "hashtag"/"group" actor and not a "person" actor, Firefish doesn't support those. I'm not sure how the relay handles that.

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

7 participants