Open alecmuffett opened 10 months ago
Sorry for the trouble! It looks like a two things come together here.
Thanks for quoting the requests above, it seems like these users have accounts on Mastodon servers that have "Authorized Fetch" activated, and it looks like for some reason the outgoing request was not signed. Could it be that for your blog the Rest URL is on another host? i.e. https://github.com/Automattic/wordpress-activitypub/blob/efd98acd0bf3f2c42f0ffc3d8f10920e74cb8512/includes/model/class-application-user.php#L38 returns a different host than your blog? I've learned today that Mastodon will try to do a Webfinger lookup on the URL, so for example for the code linked above returns https://alex.kirk.at/wp-json/activitypub/1.0/application
upon which Mastodon queries https://alex.kirk.at/.well-known/webfinger?resource=application@alex.kirk.at
to get the profile URL.
The other thing is that ActivityPub "feeds" are not refreshed since they'll receive new messages through push. If you manually refresh them, it fetches their ActivityPub outbox which should have been done upon initial add (so that their page doesn't appear empty after adding them even though nothing has been yet pushed to them).
I hope this helps. Since a bit of time passed since you reported this, did you observe new items coming in?
I think you may have found it. Investigating...
Okay, so some more interesting stuff here.
I moved my ActivityPub Friends aggregation to a standalone WP instance, and decided to webfinger it per your recommendation:
IPADDR - - [15/Nov/2023:19:46:24 +0000] "GET /.well-known/webfinger?resource=acct:USER@DOMAIN HTTP/1.1" 500 297 "-" "curl/8.1.2"
IPADDR - - [15/Nov/2023:19:52:23 +0000] "GET /.well-known/webfinger?resource=acct: USER@DOMAIN HTTP/1.1" 500 297 "-" "curl/8.1.2"
2023/11/15 19:46:24 [error] 985#985: *365596 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined method WP_Error::get_url() in /big/www-elsewhere/wordpress/wp-content/plugins/activitypub/integration/class-webfinger.php:36
2023/11/15 19:52:23 [error] 985#985: *365717 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined method WP_Error::get_url() in /big/www-elsewhere/wordpress/wp-content/plugins/activitypub/integration/class-webfinger.php:36
This seems relevant. Running latest WP with full patches on latest Ubuntu LTS with PHP 8.1.2
So a WPError got passed into a routine which was expecting a User; possibly this is because the only user on the instance is the admin account and is not posting anything and/or is somehow not fully set up?
Interesting. Looks like this is then more a problem on the ActivityPub side of things. For the USER@DOMAIN
above, is the USER
an existing username on your site? cc @pfefferle
Okay... so...
I have 2x WP instances: my blog, and a dedicated "friends plugin" aggregator, which is the one we are talking about here.
On that instance, I have ActivityPub Enable Blog
set — in the expectation that the aggregator will never "post" anything - and I have put a token/name into the box provided, in the expectation that that would propagate. For the record (trying to keep this away from casual scrapers rather than human beings) the ID is @foo@foo.alecmuffett.com
where foo=='elsewhere'
I also don't have Enable Authors
set, which I presume is why when I did my webfinger test against the administrator, the webfinger failed against the admin-username for the wp-instance. My bad for reporting that / forgetting that the admin user is not enabled. Webfinger of the above-cited ID, seems to work reasonably.
There are ~120 subscriptions on the aggregator, and only a mere handful of them are updating, and of those most are updating once per day. I can't easily/clearly correlate which of them are RSS vs: ActivityPub subscriptions - and for some reason RSS appears to be the default even/if/when I subscribe to a Mastodon user using the Bookmarklet when visiting their page.
Aside: maybe I should log a request for the Users page to enumerate which types of feed are enabled for each user, in a concise fashion?
If you install the Friends debugger, there is a "Feed Log" at wp-admin/admin.php?page=friends-last-log which might be helpful but probably it's easier to download the OPML file from the Friends Settings page to get that list:
Trying to grasp what you wrote, I realize a better tool for double checking feeds across users would help you and be useful in general. I'll think of something and hope to provide that soon.
Regarding the feed log: I found it referenced in the PHP and spent 20 minutes a couple of nights ago attempting to guess the URL. I couldn't find it in the documentation, perhaps I should have looked at the dashboard more carefully.
The Debug: Feed log is linked from the sidebar:
Maybe you found this Feed Log bit in the source?
I see different:
Here's a feed for 404 Media, which Friends has not updated since November 9th when I added it, but that doesn't match reality.
I know something has changed with respect to user handling, so is it correct for ewadmin
to be the post owner?
Okay, so I accessed wp-admin/admin.php?page=friends-last-log
and it says:
Feed Log
No active feeds found.
...which is worrying.
Could you try to just go into one of the friends and check if it really is the case, and if no, try to activate the feed?
So I set up a WP ActivityPub/Friends instance last night, and subscribed ~120 feeds to it.
Apart from the initial load of articles upon subscription, no feeds are refreshing and they are all stale unless individually refreshed.