this post was submitted on 07 Apr 2025
1 points (100.0% liked)

ActivityPub

0 readers
1 users here now

Focused discussion related to ActivityPub integration in NodeBB


This is a forum category containing topical discussion. You can start new discussions by mentioning this category.

founded 4 months ago
 

tl;dr — you can now find remote categories and see your tracked/watched categories in /world.

A new alpha version of NodeBB was tagged today: v4.3.0-alpha.3. The biggest change is to the /world route, which up until now showed a list of topics from outside of the local NodeBB instance.

New to this alpha release:

  1. A quick search widget was added, allowing you to directly search for remote categories. There is no need to navigate to to the search page to discover new categories.
  2. Your list of tracked and watched categories will show at the top of the page.
    • "Tracking" and "Watching" categories—both local and remote—is how content discovery happens in NodeBB. Tracked categories will have new content show up in the "unread" page, while watched categories take that a step further and notify you when new content is posted.
    • Tracking and watching a category will tell NodeBB to subscribe to that remote community for updates

At this time we're continuing to look for stability issues with the remote category integration. We'll be working on QoL fixes as we move into the beta phase this/next week.

60bd030a-7626-4629-9ac4-8ddd2bd34f3f-image.png

0a11627f-65cc-477b-8c33-49f1ea6de53f-image.png

top 32 comments
sorted by: hot top controversial new old
[–] projectmoon@forum.agnos.is 2 points 1 month ago (1 children)

After restarting NodeBB, I can load the category, though. Maybe some deadlock on initial import of the community.

[–] julian@community.nodebb.org 1 points 1 month ago

:grimacing:

[–] Snoopy@piefed.social 2 points 1 month ago

Very cool ! That's amazing :D

[–] projectmoon@forum.agnos.is 1 points 1 month ago

Does this refactoring also include changes to the synchronization of local + remote categories? Or is it still trying to follow Group actors as a Group, which Lemmy does not like?

[–] projectmoon@forum.agnos.is 1 points 1 month ago (1 children)

I've successfully managed to find and track https://sh.itjust.works/c/localllama from my instance. But when I try, for example, https://lemmy.world/c/technology, I can't find anything. These Lemmy communities DO, however, show up as users on my NodeBB instance. Is there something I'm doing wrong? I tried going directly to /category/@technology@lemmy.world too.

[–] julian@community.nodebb.org 1 points 1 month ago

@projectmoon@forum.agnos.is have you tried navigating directly to the url without the preceding @? It isn't required (for NodeBB).

In cases where the category is currently a user, you'll have to put the whole handle into the search box and execute the search, the category will then be migrated from the user.

[–] projectmoon@forum.agnos.is 1 points 1 month ago

Not specifically that URL, no. Now I just tried it. It resulted in a deadlock in Postgres. :smile:

2025-04-08T12:42:10.933614676Z 2025-04-08 12:42:10.933 UTC [32590] DETAIL:  Process 32590 waits for ShareLock on transaction 35424413; blocked by process 32626.
2025-04-08T12:42:10.933621228Z 	Process 32626 waits for ShareLock on transaction 35424434; blocked by process 32590.
2025-04-08T12:42:10.933624695Z 	Process 32590: 
2025-04-08T12:42:10.933626920Z 	INSERT INTO "legacy_object" ("_key", "type")
2025-04-08T12:42:10.933629244Z 	SELECT k, $2::TEXT::LEGACY_OBJECT_TYPE
2025-04-08T12:42:10.933631398Z 	  FROM UNNEST($1::TEXT[]) k
2025-04-08T12:42:10.933633432Z 	    ON CONFLICT
2025-04-08T12:42:10.933635396Z 	    DO NOTHING
2025-04-08T12:42:10.933637329Z 	Process 32626: 
2025-04-08T12:42:10.933639423Z 	INSERT INTO "legacy_object" ("_key", "type")
2025-04-08T12:42:10.933641588Z 	SELECT k, $2::TEXT::LEGACY_OBJECT_TYPE
2025-04-08T12:42:10.933643603Z 	  FROM UNNEST($1::TEXT[]) k
2025-04-08T12:42:10.933645586Z 	    ON CONFLICT
2025-04-08T12:42:10.933647519Z 	    DO NOTHING
2025-04-08T12:42:10.933654783Z 2025-04-08 12:42:10.933 UTC [32590] HINT:  See server log for query details.
2025-04-08T12:42:10.933656978Z 2025-04-08 12:42:10.933 UTC [32590] CONTEXT:  while inserting index tuple (6227,69) in relation "legacy_object"
2025-04-08T12:42:10.933659042Z 2025-04-08 12:42:10.933 UTC [32590] STATEMENT:  
2025-04-08T12:42:10.933660966Z 	INSERT INTO "legacy_object" ("_key", "type")
2025-04-08T12:42:10.933663000Z 	SELECT k, $2::TEXT::LEGACY_OBJECT_TYPE
2025-04-08T12:42:10.933664863Z 	  FROM UNNEST($1::TEXT[]) k
2025-04-08T12:42:10.933666666Z 	    ON CONFLICT
2025-04-08T12:42:10.933668430Z 	    DO NOTHING
[–] Fitik@fedia.io 1 points 1 month ago

Great to see! Existed to see better interoperability between Threadiverse software! Well be cool to see NodeBB users posting in Lemmy/Mbin/Piefed communities

[–] julian@community.nodebb.org 1 points 4 weeks ago

I just realized that while we now have the ability to browse and follow remote communities, we don't have a page listing communities ordered by popularity or recency... time to add to my ever expanding list 😩

[–] projectmoon@forum.agnos.is 1 points 4 weeks ago (1 children)

Is it also possible to add remote communities to the main forum list? Or merge them into existing local categories?

[–] julian@community.nodebb.org 1 points 4 weeks ago

Right now you're able to add remote categories to your world page. It's possible that we could allow admins to add remote categories to the forum index, although that'd be something we add later on.

[–] projectmoon@forum.agnos.is 1 points 3 weeks ago (1 children)

I'm seeing issues with loading remote categories. I can't load the NodeBB bug reports category at all, and for the ActivityPub category, I can find it in my world category search, but I get a 404 when trying to load it. Also can't load general-discussion@community.nodebb.org for example.

It seems the NodeBB development board is the only one really federating for me. Any way I can solve this?

I am running beta2 of 4.3.0.

[–] julian@community.nodebb.org 1 points 3 weeks ago (1 children)

@projectmoon@forum.agnos.is hmm... could be a bug in the user migration code path.

Can you run your forum in dev mode (./nodebb dev) and try to load some of the categories here in your forum, and let me know if you see any errors in the console?

[–] projectmoon@forum.agnos.is 1 points 2 weeks ago

@julian@community.nodebb.org could not run it in dev mode directly because of docker compose, but did set NODE_ENV to development and got verbose logs. Only thing that shows up is:

2025-05-03T19:35:59.553Z [4567/53] - warn: Route requested but not found: /category/activitypub@community.nodebb.org
[–] projectmoon@forum.agnos.is 1 points 2 weeks ago (1 children)

So, this URL does work: https://forum.agnos.is/category/nodebb-development@community.nodebb.org

Maybe it has something to do with the activitypub category being a sub-category of nodebb development?

[–] julian@community.nodebb.org 1 points 2 weeks ago (1 children)

@projectmoon@forum.agnos.is no, that didn't matter. There is no concept of nested categories in ActivityPub yet.

But the issue seems legitimate, I can't access the ActivityPub category from a test Mastodon server either.

[–] projectmoon@forum.agnos.is 1 points 2 weeks ago (1 children)

@julian@community.nodebb.org I was able to access it from a Lemmy instance. So it is federating, at least partly. But interesting to know that Mastodon has issues with it...

One thing that might be helpful is that NodeBB gives an invalid ID error when trying to follow the category via the sync function in admin settings. Stack trace shows it's the error being thrown when trying to follow (activitypub.js line 43).

[–] julian@community.nodebb.org 1 points 2 weeks ago

@projectmoon@forum.agnos.is thanks, can you try again? For whatever reason the handle-to-cid association was lost, and I'm not sure why. I've manually restored it now.

[–] projectmoon@forum.agnos.is 1 points 2 weeks ago (1 children)

Yep, shows up now on my end. Maybe check other categories too?

[–] julian@community.nodebb.org 1 points 2 weeks ago (1 children)

Were there other categories breaking?

[–] projectmoon@forum.agnos.is 1 points 2 weeks ago (1 children)

@julian@community.nodebb.org Yes, maybe? https://forum.agnos.is/category/bug-reports@community.nodebb.org for example. Maybe it's not federated? Since I don't see anything about what fediverse handle to use like in the ActivityPub forum.

[–] julian@community.nodebb.org 1 points 2 weeks ago (1 children)

That's correct, that category wasn't federating, but it is now :+1:

[–] projectmoon@forum.agnos.is 1 points 2 weeks ago (1 children)

@julian@community.nodebb.org Cool, I can now load it. Another question: I have a bunch of lemmy communities (and also a few "null" entries) stuck on "pending" in the category synchronization settings. Pressing remote/delete doesn't do anything. Is there an easy way to get rid of them by editing the database?

Also, are there plans to merge the federation synchronization and new remote category following stuff together into one cohesive set of functionality?

[–] julian@community.nodebb.org 1 points 2 weeks ago (1 children)

@projectmoon@forum.agnos.is said in Updates to the world page: > > > Also, are there plans to merge the federation synchronization and new remote category following stuff together into one cohesive set of functionality?

Yes... the remote category functionality supercedes the category sync functionality in some ways, but there is still a use case for it.

Most likely I will need to develop proper support for cross-posting (at least locally), and that would work well with the remote category functionality, so that topics are cross-posted to the synchronized category, instead of moved.

[–] projectmoon@forum.agnos.is 1 points 2 weeks ago

@julian@community.nodebb.org It would be good for outgoing posts if cross posting is used for synced categories. But it doesn't solve the problem of incoming posts. For that, it would make sense to still slot incoming posts based on the sync setup. But there is still the problem of Lemmy not accepting follows from category actors.

[–] kichae@community.nodebb.org 1 points 1 month ago

This is incredible, Julian. I'm legitimately kind of stunned by this, how well it's working already, and how quickly this got refactored.

[–] eeeee@community.nodebb.org 1 points 1 month ago* (last edited 1 month ago) (1 children)

This looks good. Just my thoughts on Lemmy, I have various issues with it not federating well to various site at times. I mention this only if you encounter testing issues with Lemmy, more likely the issue is their side. It has some good features but its frustrating as the instance I use appears to have bugs!

[–] kichae@community.nodebb.org 1 points 1 month ago* (last edited 1 month ago) (2 children)

@eeeee Yeah, Lemmy is rougher at the edges than it looks sometimes. Part of the issue, I think, is that older versions of the software don't parallelize federation, so the queues can get way backed up. I've also just had follow requests from nodeBB dropped at an unusually high rate, which makes me think that Lemmy is doing things internally to compensate for some of the sharp edges of federation.

[–] Snoopy@piefed.social 1 points 1 month ago

And how it works with PieFed ? :)

[–] nutomic@lemmy.ml 1 points 1 month ago (1 children)

What exactly do you mean with parallel federation and queues backed up? There is such a feature but only a single case that requires it, which is federation from lemmy.world to aussie.zone. NodeBB wont be affected by that.

[–] kichae@community.nodebb.org 1 points 1 month ago* (last edited 1 month ago) (1 children)

@nutomic@lemmy.ml Mostly what I've observed is significant instances of timing out when trying to find communities on new instances from non-Lemmy-based websites, something that hasn't been notable from Lemmy-to-Lemmy first encounters. From the outside, it points to y'all doing some kind of compensation for possible AP issues.

I know I said "Lemmy is rough around the edges", but I really meant "ActivityPub is rough around the edges". Lemmy's just the hegemon in the AP categorized content space.

[–] nutomic@lemmy.ml 1 points 1 month ago

In principle that sounds like a problem with NodeBB or other platforms you are using. Lemmy doesnt do anything special to fetch remote communities. But if you notice any error responses served by Lemmy you can open an issue.