superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.61k stars 303 forks source link

[bug] Cannot follow anyone #1056

Closed hiredman closed 1 year ago

hiredman commented 1 year ago

Describe the bug with a clear and concise description of what the bug is.

I can't send out follow requests.

I see something like(at info level):

timestamp="15/11/2022 21:17:05.616" func=processing.(*processor).ProcessFromClientAPI level=INFO activityType=Create objectType=Follow fromAccount=hiredman msg="processing from client"
timestamp="15/11/2022 21:17:05.617" func=federation.(*federatingActor).Send level=INFO msg="federating actor: send activity Follow via outbox https://toots.downey.family/users/hiredman/outbox"
timestamp="15/11/2022 21:17:05.621" func=router.loggingMiddleware.func1 level=INFO latency=28.965012ms clientIP=50.54.217.89 userAgent="Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0" method=POST statusCode=200 path=/api/v1/accounts/01AEPFGZV9XC26E1EE72A744WD/follow msg="OK: wrote 175B"
timestamp="15/11/2022 21:17:05.631" func=transport.(*transport).do level=INFO pubKeyID=https://toots.downey.family/users/hiredman/main-key method=POST url=https://tech.lgbt/inbox msg="performing request"
timestamp="15/11/2022 21:17:05.911" func=router.loggingMiddleware.func1 level=INFO latency=1.029833ms clientIP=198.199.90.37 userAgent="http.rb/5.1.0 (Mastodon/4.0.2; +https://tech.lgbt/)" method=GET statusCode=200 path=/users/hiredman/main-key msg="OK: wrote 563B"
timestamp="15/11/2022 21:17:06.159" func=router.loggingMiddleware.func1 level=INFO latency=2.40089ms clientIP=198.199.90.37 userAgent="http.rb/5.1.0 (Mastodon/4.0.2; +https://tech.lgbt/)" method=GET statusCode=401 path=/users/hiredman msg="Unauthorized: wrote 48B"
timestamp="15/11/2022 21:17:06.258" func=concurrency.(*WorkerPool).Queue.func1 level=ERROR msg="worker.Worker[messages.FromClientAPI] BatchDeliver: at least one failure: POST request to https://tech.lgbt/inbox failed (401): 401 Unauthorized"

When I attempt to follow anyone, regardless of if they are on a mastodon or another gotosocial instance

I just installed gotosocial.

I have caddy2 acting as a reverse proxy terminating ssl.

host is toots.downey.family and account-domain is downey.family (so they don't match).

What's your GoToSocial Version?

gotosocial version 0.5.2 git-c31f219

GoToSocial Arch

amd64 linux binary

Browser version

Firefox/106.0

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

I just installed gotosocial.

I have caddy2 acting as a reverse proxy terminating ssl.

host is toots.downey.family and account-domain is downey.family (so they don't match).

Anything else we need to know?

No response

hiredman commented 1 year ago

apologies, I think this was just a faulty redirect of webfinger requests

phikal commented 1 year ago

@hiredman What specifically did you have to change to fix this?

Update: I am using Nginx, and had a block like this in my server configuration:

    location ^~ /.well-known {
        alias /var/www/html/.well-known/;
    }

I belive I had this lying around for letsencrypt, but in this case is blocked the reverse proxy. Removing it and reloading the server seems to have helped.

phikal commented 1 year ago

Also, @hiredman have all issues been resolved since you fixed the webfinger requets? Because in my instance I appear to recieve new posts (ok), but I cannot request public follower/followed lists. I don't know if this is a misconfiguration on my part or a gotosocial limitation.

hiredman commented 1 year ago

yes, everything seems to be working fine now (although I am very new to this, so may not know the extent of everything)

my issue was when redirecting from downey.family to toots.downey.family the path part of the uri was being stripped

https://downey.family/.well-known/webfinger?resource=acct:hiredman@downey.family was redirecting to https://toots.downey.family?resource=acct:hiredman@downey.family

phikal commented 1 year ago

Kevin Downey @.***> writes:

yes, everything seems to be working fine now (although I am very new to this, so may not know the extent of everything)

my issue was when redirecting from downey.family to toots.downey.family the path part of the uri was being stripped

@. was redirecting to @.

Can you re-produce the issue I mentioned above, with people apparently following nobody (except at most yourself)?

hiredman commented 1 year ago

you may be running in the fact that gotosocial doesn't back fill information

phikal commented 1 year ago

But that doesn't make sense, considering that every ActivityPub actor should have a collection of followers and following, which Mastodon does correctly implement.

matthewp commented 1 year ago

I'm also unable to follow anyone. My webfinger seems correct to me. I'm not really sure what is going on. If I search for an account on pinafore it returns 0 results from /api/v2/search. But looking at the logs I can see that gotosocial made a request to the correct webfinger. When I curl that webfinger I get back what I would expect. So I'm not sure why it doesn't include that as a result.

The opposite is also true, if I search for my gotosocial account from a mastodon app it doesn't find it.