Do you see the post body in your logs?
Hey Matthias , thanks for responding , and writing the plugin!
Can you give me an example of what the post body would look like ?
I did just see this entry , which is a 202 , but most are just the single 500 error lines , like above.
xxx.xxx.xxx.xxx – – [14/Sep/2023:19:46:56 +0200] “POST /wp-json/activitypub/1.0/users/1/inbox HTTP/1.1” 202 12 “-” “http.rb/5.1.1 (Mastodon/4.1.4+nightly-20230708; +https://mastodon.world/)”
This morning I have removed ActivityPub 1.0 and installed 0.17.0
https://wordpress.org/plugins/activitypub/advanced/
I now see incoming requests getting a 202 error not the 500 error.
Using a Mastodon account on another server I was also able to cancel the follow request and then follow instantly.
Hmm, thanks for the information! I will investigate why this happens!
Maybe it is because of the Signature Verification we introduced in 1.0.0.
I’ve just upgraded to version 1.0.1 using the git repository.
Now seeing HTTP error code 200 on every request , just like 0.17.0
It looks like you fixed whatever was causing my 500 error issues.
Thank you!
Mark.
Looks like I spoke too soon.
Now seeing most requests get a 410 error code.
It is weird because sometimes the same server gets different responses.
176.9.111.120 - - [22/Sep/2023:11:18:44 +0200] "POST /wp-json/activitypub/1.0/users/1/inbox HTTP/1.1" 202 12 "-" "http.rb/5.1.1 (Mastodon/4.2.0; +https://mastodon.scot/)"
176.9.111.120 - - [22/Sep/2023:11:18:52 +0200] "POST /wp-json/activitypub/1.0/users/1/inbox HTTP/1.1" 410 77 "-" "http.rb/5.1.1 (Mastodon/4.2.0; +https://mastodon.scot/)"
176.9.111.120 - - [22/Sep/2023:11:18:58 +0200] "POST /wp-json/activitypub/1.0/users/1/inbox HTTP/1.1" 202 12 "-" "http.rb/5.1.1 (Mastodon/4.2.0; +https://mastodon.scot/)"
I’ve rolled back to version 0.17.0
That is not an issue per se, because the responses are based on the Actor the server send a request on behalf. So if an Activity is faulty or if the profile of the Actor is not accessible, it might throw errors. The plugin tries to handle faulty profiles/followers and removes them after x errors.
So receiving error codes is not generally a bad thing, it is simply that something with the request on the remote site is faulty or not (or not yet) implemented by the plugin.
We added a lot of 4xx messages in 1.0.1, because the default that WordPress returns if you respond with an WP_Error without a defined Error Code was 500. That’s why you might see some more 4XX errors and no 5XX errors any more.
We did that, to tell the requesting site that the Request couldn’t be processed properly instead of responding with a “500 Internal Server Error”. This way, the Requester will not send a retry, what he might have done by a 500 error.
But we will keep improving the error handling over time.
Thanks for taking the time and writing up the explanation , I really appreciate that.
I will switch back to 1.0.1 and report back.
I was able to un-follow and follow again from a Mastodon account this time.
More of the 500 errors were likely caused by using :-
Captcha by BestWebSoft – Spam Protection, Security Plugin for WordPress Forms
https://wordpress.org/plugins/captcha-bws/
I have now disabled this plugin for comments , and now fediverse comments / replies are working.