wordpress-activitypub
wordpress-activitypub copied to clipboard
Unable to follow on n4jjs.com or schwarzspanish.com from WordPress
Quick summary
I opened this original in case 523 (https://github.com/Automattic/wordpress-activitypub/issues/523):
From mastodon.lothlorien.net I can follow 3 of my WordPress blogs fine with the ActivityPub plugin, but two others (one is on the same server as a working version) I am experiencing this issue. I can not seem to follow n4jjs.com or schwarzspanish.com . I will say that those were two that I tried the plugin on last year (early in its life) and later deleted it from. Could this be the same issue, or maybe something residual from the install/uninstall?
Steps to reproduce
Attempt to follow any user (such as @[email protected] or @[email protected])
What you expected to happen
Expect the follow to function and the followers to update
What actually happened
Follow gets stuck in a pending state
Impact
Some (< 50%)
Available workarounds?
No and the platform is unusable
Logs or notes
No response
I have retested this with v2.0 of the plugin and the issue is still present on the two affected servers. I am trying to isolate which end of the connection (Mastodon or WordPress) is the cause still.
OK, I was finally able to get a debug that might give a clue from the mastodon side:
Jan 10 12:52:19 mastodon.lothlorien.net bundle[851]: 2024-01-10T17:52:19.218Z pid=851 tid=5tmp3z WARN: {"context":"Job raised exception","job":{"retry":16,"queue":"push","dead":false,"args":["{"@context":"https://www.w3.org/ns/activitystreams","id":"https://mastodon.lothlorien.net/2c850a2d-0e9b-4a36-a9c8-c62e5b30741e","type":"Follow","actor":"https://mastodon.lothlorien.net/users/jason","object":"https://n4jjs.com/@n4jjs.com"}",109307799703588249,"https:/n4jjs.com/index.php/wp-json/activitypub/1.0/users/0/inbox",{"bypass_availability":true}],"class":"ActivityPub::DeliveryWorker","jid":"81b86fd39c215155dae09c9d","created_at":1704909139.1165545,"enqueued_at":1704909139.1166928}}
Jan 10 12:52:19 mastodon.lothlorien.net bundle[851]: 2024-01-10T17:52:19.218Z pid=851 tid=5tmp3z WARN: Mastodon::UnexpectedResponseError: https://n4jjs.com/index.php/wp-json/activitypub/1.0/users/0/inbox returned code 401
Should the inbox be returning a 401?
Update on this is that users from other instances thought they were able to follow, but after refreshing they were also stuck with the following in a pending state. That seems to point to the plugin as the issue because it is impacting several Mastodon instances. The odd part is that other blogs on the same host with the same setup are working (different domain names). Is there any way to debug the 401 error on the inbox?
Retested with Mastodon v4.2.4 from two instances and still the same issue. Any thoughts on why I might get a 401 error on the follow post to the inbox?
@pfefferle Any thoughts on a way to debug why some of my sites give a 401 error when attempting to follow them and the others work fine? I have tried to uninstall, clean up and reinstall the plugin with no luck (but I could have missed something). Definitely appears to be the plugin because it is happening from multiple Mastodon instances.
Also had a few users on other instances test and for the two problem blogs (n4jjs.com and schwarzspanish.com) they are seeing the same thing. I am able to follow janetgschwarz.com for example which is on the same server as schwarzspanish.com. I will say I tried a very early copy of the plugin on the two sites that are having the issue...and when I had issues uninstalled it. Could something be left behind in WordPress that I am missing during an uninstall?
Retested with the latest update and still having the same issue on both broken sites. Any suggestion on how to completely purge the data for the plugin and reinstall it? I still think something from an early version is the cause.
Retested with v2.3.0 of the plugin and the issue still is continuing. Any suggestions?
It seems that your server does not accept the follow request. Do you use WordPress multi-site?
Do you have plugins that might strip request headers or add any security related features?
I have other sites running WordPress on the same httpd service (same server) that work fine. The only thing the sites failing have in common is I used an early version of the plugin on them that wasn't working for me and I uninstalled it. The issue is the follow request on the affected sites seems to give back a 401, but on the other sites on the same server it is fine.
Nothing should be stripping headers or altering the request. Given the other sites on the same host are configured the same and working I do not believe that is an issue.
Each site is a separate WordPress install in a unique directory on a common database server. I am not using the multi-site functionality because we had some requirements that prevented it.
Do you use the same PHP config for every site? any specialties in the htaccess files of the working installations?
The php configurations are all the same. Nothing different in the .htaccess files between the sites.
Are there any logs I can pull to show what is happening during the follow request.
I installed the plugin today on Wordpress hosted on Dreamhost (url: https://www.airj.info) - also installed the Webfinger plugin - but i have the same issue. Following the user @[email protected] gets stuck on pending and, on Mastodon side, the admins say the user is not reachable. The webfinger is fine.
Any idea how i can fix it? Thank you.
@alebaffa The endpoint returns a 404 instead of the user informations: https://www.airj.info/.well-known/webfinger?resource=acct%3Ainfo%40airj.info
OK, you seem to have added the wrong WebFinger ID to your comment, https://webfinger.net/lookup/?resource=airj%40airj.info seems to work.
Maybe you find some help here: https://wordpress.org/search/Dreamhost+intext%3A%22Plugin%3A+ActivityPub%22/ ???
And your profile URL seems to be not accessible:
curl "https://www.airj.info/@airj" \
-H 'Accept: application/activity+json'
Ok, so basically the only way is to use DNS redirect (like the guy who did it with Cloudflare). I don't want to do this. I give up.
Thanks for your help.
OK, but the issue alebaffa is having isn't the same as the issue on n4jjs.com or schwarzspanish.com as far as I can tell.
I did check my profile for @[email protected] and it seems to work: curl "https://n4jjs.com/@jason" -H 'Accept: application/activity+json'
I also double checked webfinger and it seems fine: https://webfinger.net/lookup/?resource=jason%40n4jjs.com
Retested on v2.5.0 and still having the same problem. I seem to be getting no response on this thread at all.
@jjschwarz the problem is, that it can't be fixed on the plugin level. your server seem to have issues replying to the Follow
request properly. And I can't debug that because I have no access to your server.
or it might be an issue, because of the index.php in the URL...
Understood, but given that any way to debug from logs or to capture data to debug?On Jul 1, 2024, at 6:42 PM, Matthias Pfefferle @.***> wrote: @jjschwarz the problem is, that it can't be fixed on the plugin level. your server seem to have issues replying to the Follow request properly. And I can't debug that because I have no access to your server.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
Ok, how could I change that to test if it is the issue? I do not see any setting appending that to the URL.On Jul 1, 2024, at 6:53 PM, Matthias Pfefferle @.***> wrote: or it might be an issue, because of the index.php in the URL...
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>