wordpress-activitypub icon indicating copy to clipboard operation
wordpress-activitypub copied to clipboard

Post not showing up at Mastodon

Open jeckman opened this issue 1 year ago • 38 comments

Quick summary

I run ActivityPub on WordPress here: @[email protected]

To test it, I followed myself from mastodon.social: https://mastodon.social/@[email protected]

I don't see any posts since Sept 2023, but I post regularly.

I tried unfollowing and refollowing - but I'm stuck on even how to troubleshoot what's going on here not knowing where the problem might be

Steps to reproduce

Visit https://mastodon.social/@[email protected] or find the user @[email protected] on any ActivityPub site

What you expected to happen

Posts should appear, including those written this week

What actually happened

I see nothing newer than Sept 28, 2023

Impact

One

Available workarounds?

No and the platform is unusable

Logs or notes

No response

jeckman avatar Aug 28 '24 20:08 jeckman

Can you install a cron plugin to check if there are some blocking wp_crons?

pfefferle avatar Aug 29 '24 05:08 pfefferle

Or have you disabled or maybe misconfigured your WP_Cron setup?

pfefferle avatar Aug 29 '24 05:08 pfefferle

Nothing blocking WP_Cron, and the posts do show up on another WordPress instance running Friends plugin - so at least WP to WP it is working.

jeckman avatar Aug 29 '24 20:08 jeckman

I'm also seeing this on one of my sites - @[email protected] - it was working fine and then it just stopped. I've been meaning to come report it. WP site is at https://status.murkworks.net and here's a view of the profile from my Mastodon instance https://mastodon.murkworks.net/@[email protected] so.

I'm able to refresh the profile fine so it is talking to the world. I'm getting 200 OK in response to hits on wp-cron.php and I'm having that run every five minutes at the system level, but it doesn't help.

solarbirdy avatar Aug 29 '24 21:08 solarbirdy

Solarbirdy - since you're also running a mastodon instance, is there anything logged on that side? I'm not running one and therefore stuck on how to debug

jeckman avatar Aug 30 '24 13:08 jeckman

Does Mastodon index your posts if you put the permalink of a new post into the search field?

I am currently at vacation, will run some tests when I am back!

pfefferle avatar Aug 30 '24 18:08 pfefferle

@jeckman - As in, apache logs or something? Not that I've found.

@pfefferle - That's interesting. YES. And the post once searched for appears, but only on the individual author profile (as viewed from Mastodon), and not on the blog profile (also as viewed from mastodon).

I searched for the most recent post, now it appears in the @[email protected] profile as it should:

image

But it still does not appear in the @[email protected] profile:

image

And none of the posts between that and the older ones have federated.

Also - relax and enjoy your vacation, this is not any kind of Sev1 crisis for us, the important back-end notifications hang off the RSS feed directly. The Federation feed is an additional courtesy for the Mastodon users we host, so not critical - but I do want to get it working again, obviously. ^_^

(It's weird that it's this one. This is the simplest, most basic wordpress setup we have, and it's the one not Federating.)

solarbirdy avatar Aug 30 '24 18:08 solarbirdy

Mine do show up in mastodon if I search for them by permalink, and then after that they show up in the profile

jeckman avatar Aug 30 '24 18:08 jeckman

Ok, then it does not seem to be a caching issue, but a distribution thing! @solarbirdy can you check if your blogs domain is on a block list of your instance?

pfefferle avatar Aug 30 '24 19:08 pfefferle

Thought I had the same problem, but either random tinkering or just waiting "solved" it. Test posts federated successfully.

harcesz avatar Sep 06 '24 21:09 harcesz

I believe I'm seeing this as well. Specifically I have 2 mastodon users. The first follows both the overall blog profile and the author profile. The second is only following the blog profile.

The user following the author sees the posts but not the boost by the blog profile, and the user only following the blog profile is not seeing the posts getting boosted by the blog profile.

Looking at the blog profile via my mastodon instance I do see one boosted post from the 13th Sept, but not the newer post

blog profile: @[email protected] author profile @[email protected]

hardillb avatar Sep 26 '24 22:09 hardillb

Hey @hardillb 👋

Have checked if you have some blocking WP_Crons in your queue?

pfefferle avatar Sep 27 '24 07:09 pfefferle

I don't think so, the health check page shows all is good.

wcli cron test reports Success: WP-Cron spawning is working as expected.

wcli cron event list shows

+------------------------------------+---------------------+-----------------------+------------+
| hook                               | next_run_gmt        | next_run_relative     | recurrence |
+------------------------------------+---------------------+-----------------------+------------+
| wp_update_user_counts              | 2024-09-27 07:27:43 | 23 seconds            | 12 hours   |
| action_scheduler_run_queue         | 2024-09-27 07:27:53 | 33 seconds            | 1 minute   |
| jetpack_sync_full_cron             | 2024-09-27 07:28:03 | 43 seconds            | 5 minutes  |
| jetpack_sync_cron                  | 2024-09-27 07:30:34 | 3 minutes 14 seconds  | 5 minutes  |
| jetpack_clean_nonces               | 2024-09-27 07:34:38 | 7 minutes 18 seconds  | 1 hour     |
| wp_privacy_delete_old_export_files | 2024-09-27 07:43:57 | 16 minutes 37 seconds | 1 hour     |
| w3_objectcache_cleanup             | 2024-09-27 07:52:34 | 25 minutes 14 seconds | 1 hour     |
| activitypub_update_followers       | 2024-09-27 07:56:11 | 28 minutes 51 seconds | 1 hour     |
| wp_version_check                   | 2024-09-27 08:04:17 | 36 minutes 57 seconds | 12 hours   |
| wp_update_themes                   | 2024-09-27 08:04:22 | 37 minutes 2 seconds  | 12 hours   |
| wp_update_plugins                  | 2024-09-27 08:06:30 | 39 minutes 10 seconds | 12 hours   |
| w3_pgcache_cleanup                 | 2024-09-27 08:20:21 | 53 minutes 1 second   | 1 hour     |
| wp_scheduled_auto_draft_delete     | 2024-09-27 08:23:36 | 56 minutes 16 seconds | 1 day      |
| jp_purge_transients_cron           | 2024-09-27 09:53:09 | 2 hours 25 minutes    | 1 day      |
| activitypub_cleanup_followers      | 2024-09-27 10:56:11 | 3 hours 28 minutes    | 1 day      |
| jetpack_v2_heartbeat               | 2024-09-27 16:27:26 | 9 hours               | 1 day      |
| jp_sitemap_cron_hook               | 2024-09-27 17:28:57 | 10 hours 1 minute     | 12 hours   |
| wp_scheduled_delete                | 2024-09-27 17:49:47 | 10 hours 22 minutes   | 1 day      |
| recovery_mode_clean_expired_keys   | 2024-09-27 19:26:52 | 11 hours 59 minutes   | 1 day      |
| delete_expired_transients          | 2024-09-27 20:04:53 | 12 hours 37 minutes   | 1 day      |
| akismet_scheduled_delete           | 2024-09-28 01:12:47 | 17 hours 45 minutes   | 1 day      |
| wp_site_health_scheduled_check     | 2024-09-28 08:11:42 | 1 day                 | 1 week     |
| wp_delete_temp_updater_backups     | 2024-10-01 23:08:38 | 4 days 15 hours       | 1 week     |
+------------------------------------+---------------------+-----------------------+------------+

Let me know if there is another way to test/check

hardillb avatar Sep 27 '24 07:09 hardillb

Could there be a race condition? Was there someone following that account when you published the post?

pfefferle avatar Sep 27 '24 07:09 pfefferle

No, the accounts have been following for over a week and the last publish was yesterday. The blog profile has only boosted one post back on the 13th and none since.

hardillb avatar Sep 27 '24 07:09 hardillb

and you have enabled "Blog-Profile" and "Author-Profiles" in the settings?

pfefferle avatar Sep 27 '24 07:09 pfefferle

Yep, running the defaults

image

hardillb avatar Sep 27 '24 08:09 hardillb

Do you use caching plugins?

pfefferle avatar Sep 27 '24 08:09 pfefferle

Yes, I have W3 Total Cache installed with these 3 drop-ins enabled

image

hardillb avatar Sep 27 '24 08:09 hardillb

Maybe this is the problem. W3 Total Cache has some issues with content negotiation: https://github.com/Automattic/wordpress-activitypub/wiki/Caching

pfefferle avatar Sep 27 '24 08:09 pfefferle

OK, I'll have a look at the caching settings/plugin, but out of curiosity why would this only block the blog profile and not the author profiles?

hardillb avatar Sep 27 '24 08:09 hardillb

Only an assumption! It seems like a random thing (it worked one time) and that's why I assume the caching. When a caching plugin does not support content negotiation, it depends on the file in the cache. If it is the JSON it might work, otherwise it might break.

pfefferle avatar Sep 27 '24 08:09 pfefferle

Yep, if I turn off the object caching things look to be working (well I get JSON back if I pass a Accept: application/activity+json header when testing with curl.

I'll raise an issue with W3 Total Cache

hardillb avatar Sep 27 '24 11:09 hardillb

And as I said, we also try to work against that issue: https://github.com/Automattic/wordpress-activitypub/pull/894

pfefferle avatar Sep 27 '24 11:09 pfefferle

Just to come back to this, It turns out it's not the Object Cache, but the Page Cache that is the problem. Also using Redis rather than Disk: Enhanced appears to work correctly on a test setup

hardillb avatar Sep 29 '24 08:09 hardillb

Oh yes, it's always the page cache, because it could cache the wrong representation, if it does not use different buckets based on the accept header. Sorry if I was not clear about that!

pfefferle avatar Sep 29 '24 11:09 pfefferle

I'll do a deeper dive later, but seems I'm also still having this/similar issue; post show up on mastodon a day later, with the correct posting hour, and so would be missed by most. Less then ideal. But I'm not sure if it's somehow not a mastodon issue, as some online debug tool fetches correct and up to date data... No catching on the website.

harcesz avatar Oct 01 '24 11:10 harcesz

@harcesz the plugin sends the post asynchronously through wp-cron. Maybe you can check how often this will be triggered!?!

pfefferle avatar Oct 01 '24 11:10 pfefferle

I have exactly the same issue. I don't know if the plugin need the Wordpress cron, I didn't setup yet. But anyway, I think it's not related, because I can see the numbers of postings. There is only no content in Mastodon visible. https://social.tchncs.de/deck/@[email protected] https://satolab.ignorelist.com/?author=1Mein

Looks like permission issue...

wadaki avatar Oct 02 '24 23:10 wadaki

The number you see on mastodon has not much to do with the actual posts that show up there! Mastodon can get the number of post from an API.

One thing: Mastodon does not import old posts, only new ones that are created after someone is following the blog!

Can you provide us an example post URL so that we can have a look?

pfefferle avatar Oct 03 '24 08:10 pfefferle