buzzrelay icon indicating copy to clipboard operation
buzzrelay copied to clipboard

Unable to subscribe to relays from Misskey

Open bleonard252 opened this issue 3 years ago • 26 comments

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?

bleonard252 avatar Apr 14 '23 16:04 bleonard252

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 3a3a25d2a7caadd892b3bc6a75415322b2599720 following works. Pleroma ingests the posts URLs into its database but still does not fetch the actual metadata and content.

astro avatar Apr 14 '23 20:04 astro

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)!

bleonard252 avatar Apr 14 '23 21:04 bleonard252

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

moyitpro avatar May 06 '23 02:05 moyitpro

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 avatar May 06 '23 11:05 astro

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

moyitpro avatar May 06 '23 12:05 moyitpro

Great to know that Calckey can follow buzzrelay! :tada:

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.

astro avatar May 06 '23 19:05 astro

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.

moyitpro avatar May 07 '23 01:05 moyitpro

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.

darrinsmart avatar May 13 '23 18:05 darrinsmart

@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.

astro avatar May 13 '23 20:05 astro

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

ThatOneCalculator avatar May 13 '23 23:05 ThatOneCalculator

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

astro avatar May 14 '23 21:05 astro

I ended up axing my server due to technical constraints so I can't debug the issue anymore.

I tested following a virtual instance account from a Calckey server, and the "accept" response wasn't received. I tried that technique on Mastodon, and it marks it as followed right away, although on refresh it shows it as still "Awaiting approval." I tried following a virtual tag account and it did the same thing. This used to work (I think I mentioned it earlier in the thread), so I don't know what changed.

On Sun, May 14, 2023, at 5:43 PM, Astro wrote:

Now running with Authorized Fetch™️. Works for you?

— Reply to this email directly, view it on GitHub https://github.com/astro/buzzrelay/issues/2#issuecomment-1547007943, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUJCOSAJZ676E7GBFAFPOTXGFGXPANCNFSM6AAAAAAW6UY33U. You are receiving this because you authored the thread.Message ID: @.***>


Blake Leonard https://blakes.dev

bleonard252 avatar May 14 '23 21:05 bleonard252

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

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

moyitpro avatar May 14 '23 22:05 moyitpro

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...

On Sun, May 14, 2023, at 6:06 PM, James Moy wrote:

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

2023-05-14_18-03-26 https://user-images.githubusercontent.com/161183/238211634-fd5e2146-cbba-46d4-88e6-56ae1f623813.png 2023-05-14_18-04-52 https://user-images.githubusercontent.com/161183/238211617-41f40aa9-8e09-4607-b701-2682d6161ad0.png

— Reply to this email directly, view it on GitHub https://github.com/astro/buzzrelay/issues/2#issuecomment-1547011354, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUJCOTADNSPY3YH3C267LDXGFJM7ANCNFSM6AAAAAAW6UY33U. You are receiving this because you authored the thread.Message ID: @.***>


Blake Leonard https://blakes.dev

bleonard252 avatar May 14 '23 22:05 bleonard252

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.

moyitpro avatar May 14 '23 22:05 moyitpro

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

astro avatar May 15 '23 00:05 astro

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.

darrinsmart avatar May 15 '23 07:05 darrinsmart

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

astro avatar May 26 '23 20:05 astro

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?

Ninlives avatar Jun 18 '23 06:06 Ninlives

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

astro avatar Jun 18 '23 10:06 astro

@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?

Ninlives avatar Jun 18 '23 12:06 Ninlives

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

astro avatar Jun 19 '23 00:06 astro

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]

moyitpro avatar Jun 25 '23 03:06 moyitpro

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

ThatOneCalculator avatar Jun 29 '23 23:06 ThatOneCalculator

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?

jprjr avatar Oct 20 '23 14:10 jprjr

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.

ThatOneCalculator avatar Oct 20 '23 14:10 ThatOneCalculator