akirk / friends

A social network between WordPresses. Privacy focused, by itself a self-hosted RSS++ reader with notifications.
https://wpfriends.at/
GNU General Public License v2.0
82 stars 14 forks source link

"this feed doesn't contain any entries" for valid mastodon feeds, even after remote updates #162

Open alecmuffett opened 1 year ago

alecmuffett commented 1 year ago

Example:

Subscribe [Runa Sandvik] ([preview]) as [Status]
Type: application/activity+json | Parser:  | rel: self
Preview for https://mastodon.social/users/runasand
Parser Details
Parser: [ActivityPub](https://www.w3.org/TR/activitypub/)
Items in the Feed
This feed doesn't contain any entries. There might be a problem parsing the feed.

...and this/similar happens for ALL activitypub feeds which I try to follow, even if they make several updates after the subscription time.

I added an RSS feed to one of the attempted mastodon users, and that worked okay (at least: after an "explicit refresh") so I know that feed retrieval in general is working; just not Mastodon.

I have a WP 6.1 instance on an older PHP which is soon due for a refresh/rebuild, but even so I am not aware of why this might be happening, especially since RSS feeds are working.

Is there any debugging that I can squeeze out of this, please?

akirk commented 1 year ago

This is a known issue, see #136.

alecmuffett commented 1 year ago

Noted, and I saw that, but I also failed to get new content which was added after subscription.

In short: no content at all.

Is there a feed-debugging switch, perhaps?

akirk commented 1 year ago

There is a "show log output" link below the feed list, what does it say for you?

Screenshot 2023-01-04 at 07 43 15

To retry a follow, you can remove the "Active" checkbox and click save (this will send an undo follow request). And then re-activate the feed and save it.

akirk commented 1 year ago

With #163 the "Preview" link now should work.

akirk commented 1 year ago

(If you check the screenshot above, I received a 401 here but I followed the user a couple of times when implementing #163 which might be why)

alecmuffett commented 1 year ago

When I tried just now, using the plugin from the Wordpress repo, it found 0 new posts.

I've just installed the main branch from here, and suddenly it finds 20 posts, which I presume is the backfill.

I will also update my other feeds, and see if they pick up new posts going forwards.

alecmuffett commented 1 year ago

@akirk

An error of type E_PARSE was caused in line 99 of the file /..../wp-content/plugins/friends/templates/admin/settings.php. Error message: syntax error, unexpected ')'

https://.../wp-admin/admin.php?page=friends-settings

There has been a critical error on this website. Please check your site admin email inbox for instructions.

Learn more about troubleshooting WordPress.

akirk commented 1 year ago

Sorry about that, this was PHP8 syntax. Fixed in 2896c3d

akirk commented 1 year ago

This will now be caught via Github Actions, see https://github.com/akirk/friends/actions/runs/3837596872/jobs/6533083125

akirk commented 1 year ago

You can log the actual HTTP requests but it's a bit of a challenge: Using the Code Snippets plugin, you can use this snippet to log them (possibly using the WP_DEBUG_LOG constant to log into a dedicated file)..

mjgardner commented 1 year ago

I am using the Friends 2.2.0 plugin with WordPress 6.1.1 on PHP 7.4.33 and having a similar problem. I do get log output on a feed's page saying posts were found, e.g.:

2023-01-07 03:52:46: Found 1 new post. Will be fetched again at 2024-01-07 02:36:11.

And on the same Feeds page, it says "View 29 posts'; however, the Friends page says, "Unfortunately, we could not find a post." even though directly above it says, "29 statuses".

This happens with ActivityPub subscriptions from Mastodon and Akkoma servers, Atom and RSS feeds, and a Microformats subscription.

akirk commented 1 year ago

Could it be that the account has only posted @-replies to people you don't follow?

Because of this setting, those won't be shown:

Screenshot 2023-01-07 at 06 35 52

Do you see "hidden items" in the header of that page?

Screenshot 2023-01-07 at 06 36 36
mjgardner commented 1 year ago

Could it be that the account has only posted @-replies to people you don't follow?

No, I specifically have that checked for this account. image

Do you see "hidden items" in the header of that page?

I do not. Here is the header along with the indication of no posts: image

akirk commented 1 year ago

Hm, I see. This is strange. Are the posts visible elsewhere? i.e. on /friends/ or /friends/type/status/?

Could you install the "Friends Debugger" via plugins? You'll then get an "View cached posts" link like this:

Screenshot 2023-01-07 at 08 39 19

You'll then arrive on this page where you need to change the "All formats" to "status":

Screenshot 2023-01-07 at 08 42 00

Can you then see the posts in that view?

mjgardner commented 1 year ago

Hm, I see. This is strange. Are the posts visible elsewhere? i.e. on /friends/

Nope: image

or /friends/type/status/?

For some reason, only my local blog posts are visible there, along with a stray block inserter: image

Could you install the "Friends Debugger" via plugins? You'll then get an "View cached posts" link like this:

After installing the Friends Debugger, selecting "View x posts" on any of my friend detail pages, whether on the main Edit User page or the Edit Feeds page, yields a 404 error page. I do not get the opportunity to change post format from "All formats" to "status". image

mjgardner commented 1 year ago

I do see lots of posts when I go to the new "Cached Friends Posts" item that appeared in my admin sidebar when I installed Friends Debugger, though (/wp-admin/edit.php?post_type=friend_post_cache)

image
akirk commented 1 year ago

For some reason, only my local blog posts are visible there, along with a stray block inserter:

Oh no, this is not a stray inserter but the Status page is supposed to be a status feed that also contains your own posts and a post window for directly posting to your status page. So for some reason, the posts of the custom post type "Cached Friend Posts" are not shown which is why only your posts do appear.

I am wondering if this is an interaction with another plugin. Could you go into Troubleshoot mode on the Plugins page by clicking on Troubleshoot on the Friends entry:

Screenshot 2023-01-08 at 08 27 40

Then you arrive on a screen like this:

Screenshot 2023-01-08 at 08 28 25

In a new tab, please check the /friends/type/status page if now other posts are shown. If yes, then another plugin is likely interacting.

On the right hand side of the troubleshoot screen you can one-by-one activate more plugins so that ideally you can see when it starts to break.

mjgardner commented 1 year ago

I am wondering if this is an interaction with another plugin. Could you go into Troubleshoot mode on the Plugins page by clicking on Troubleshoot on the Friends entry:

Then you arrive on a screen like this:

In a new tab, please check the /friends/type/status page if now other posts are shown. If yes, then another plugin is likely interacting.

Found the culprit: @dshanske's IndieWeb Post Kinds plugin, repo @ https://github.com/dshanske/indieweb-post-kinds. SCR-20230108-3mm

What's strange is that @mikewmerritt says in https://github.com/akirk/friends/issues/144#issuecomment-1370351451 that he's using the same plugin.

akirk commented 1 year ago

Thank you, I'll investigate. Maybe it's a specific setting?

mjgardner commented 1 year ago

Maybe it's a specific setting?

I'll start tweaking and let you know if I find anything.

mikewmerritt commented 1 year ago

What's strange is that @mikewmerritt says in #144 (comment) that he's using the same plugin.

I do have the plugin installed but am having this same issue. I'll try doing the same troubleshooting and see if I get similar results.

alecmuffett commented 1 year ago

I am now getting the "Unfortunately, we could not find a post" error too, in peculiar circumstances.

I follow https://mastodon.neilzone.co.uk/@neil

He posted https://mastodon.neilzone.co.uk/@neil/109655903284097321

This arrived in my feed as a (hidden) post, immediately after he boosted something else I'd written:

Screenshot 2023-01-09 at 01 48 30

If I click on 3 hours ago it takes me to https://alecmuffett.com/friends/mastodon.neilzone.co.uk-neil/17224/ which says Unfortunately, we could not find a post.

Screenshot 2023-01-09 at 01 50 21

Then I click on 331 hidden items (in this case, just one hidden item) and - without a header/banner/heading - I see:

Screenshot 2023-01-09 at 01 51 16

...pop up into place; the URL in this instance is https://alecmuffett.com/friends/mastodon.neilzone.co.uk-neil/17224/?show-hidden=1 - note 17224

Interestingly: if I go click on View 101 cached posts for Neil, there is no sign of post number 17224.

So I suspect the SQL queries used to retrieve hidden posts, are being excessively effective.

alecmuffett commented 1 year ago

Whilst I am here and have your attention, please, @akirk — what is the proper way for me to reply to Neil's welcome? I cannot work out what I am meant to do to reply to it.

alecmuffett commented 1 year ago

Aha! I found it! For some reason posting number 17224 is literally in the Bin!

Is this how you are trying to do autodelete?

Screenshot 2023-01-09 at 01 59 06

mjgardner commented 1 year ago

I’ve also been mess­ing with the Friends and ActivityPub plu­g­ins for WordPress on this blog, and I share Shelley’s con­cerns about the for­mer bloat­ing the data­base with feed items. You can con­trol this some­what by set­ting reten­tion val­ues in days or a num­ber of posts, but you have to go into each friend’s Feeds tab and do it man­u­al­ly – there’s no default setting.

After read­ing that post, I’m also con­sid­er­ing dis­abling Friends in favor of a feed read­er, espe­cial­ly because (as Shelley also not­ed) there are gaps when with favorites and com­ment con­ver­sa­tions bridg­ing between WordPress and Mastodon servers. Like her, I’m not keen on installing a single-​user Mastodon instance or oth­er fedi­verse serv­er that requires man­ag­ing an unfa­mil­iar pro­gram­ming language.

I’m also try­ing to do this in tan­dem with a suite of IndieWeb plu­g­ins, and I’m run­ning into an issue with my friends feed page not show­ing any posts when the Post Kinds plu­g­in is acti­vat­ed. I real­ly want to keep this plu­g­in because it lets me inter­act bet­ter with oth­er IndieWeb sites as well as the Bridgy POSSE/​back­feed ser­vice con­nect­ing me to oth­er social networks.

My ide­al is a per­son­al web­site where I write every­thing , includ­ing long-​form arti­cles, short sta­tus­es, and replies like these. Folks can then find me via a sin­gle iden­ti­fi­able address and then subscribe/​follow the entire fire­hose of con­tent or choose sub­sets accord­ing to post types, top­ics, or tags. They’d then be able to reply or react on my site or their favored plat­form, which my site would col­lect regard­less of ori­gin, with sub­se­quent replies and reac­tions get­ting pushed out to them. Oh, and it should work with both ActivityPub clients and servers, IndieWeb sites, and syndicate/​backfeed to oth­er social net­works either with or akin to the Bridgy ser­vice I men­tioned above.

So far I haven’t seen any­thing that ticks all these box­es, and I’m get­ting itchy to write my own. Perl is my favorite pro­gram­ming lan­guage, so I’m look­ing at the Yancy CMS as a base. But I know that it would still be a hell of a project, and one of the rea­sons I chose WordPress for blog­ging was that it was well-​established and ‑sup­port­ed but still eas­i­ly exten­si­ble so that I could con­cen­trate on writ­ing instead of end­less­ly tweak­ing the engine. Unfortunately, I’m start­ing to fall into that trap anyway. [POSSE]: Publish (on your) Own Site, Syndicate Elsewhere [CMS]: content management system

(Originally published at: https://phoenixtrap.com/2023/01/08/re-wordpress-friends-activitypub-indieweb/)

alecmuffett commented 1 year ago

@mjgardner my take is far more relaxed than that; even a feed reader needs to retrieve copies of all of the remote content - and then it stores it in some kind of repository - so (unless you particularly worried about the integer post count being roughly correlated with the amount of postings you make on your WP blog) why not store and garbage collect them in WordPress?

Edit: that being said, I too would like to see a few more global settings...

akirk commented 1 year ago

@mjgardner thank you for the perspective and also linking to @shelleyp's post. I am thankful for further perspectives of what is expected from such a plugin like Friends and for understanding what people dislike about it.

I agree that the experience with ActivityPub and the Friends plugin (as I also commented here) is not perfect yet as quite a number of things are still missing (some of which are being worked on, like #168) or are not (yet) great from a UI perspective. Not an excuse but an explanation is that ActivityPub is mostly a surprisingly great fit for what the Friends plugin was designed for: connecting blogs/WordPresses (mostly through RSS).

As @alecmuffett said, the incoming posts need to be stored somewhere. The size limiter is currently only exposed for single feeds because I personally value to have the old posts of my friends and subscriptions available for search or reference.

I personally even use a plugin to the Friends plugin called Friends Post Collection that allows me to store posts and articles from the web into additional local friend users. I can then edit/reformat the posts before I send them to my e-reader with yet another plugin. The search function of WordPress lets me search those posts for things that I had read. In future I can probably tag those posts for better retrieval (similar to thinkery).

So, I understand this is a different approach in philosophy. I think the space used for text is small in comparison of the value it brings to keep the text around. If I found something interesting and goes offline, I still have it for my reference unless I decide that it should be automatically moved to trash (through rules) or deleted after a defined amount of time.

There is room for extending the Friends plugin in ways that manage the data differently (for example we had another discussion about using WordPress users for friends/subscriptions in #120) but so far the approach has worked well for me.

mjgardner commented 1 year ago

Oh, I agree that the con­tent has to go some­where, which is why I’m sure to set reten­tion lev­els for almost all of the Friends data. That sort of thing is set­table by default in feed read­ers and pod­cast players.

(Originally published at: https://phoenixtrap.com/2023/01/09/wordpress-friends-retention/)

akirk commented 1 year ago

The Post Kinds interference is addressed in #176 and #177 introduces a global retention setting.