pixelfed / pixelfed

Photo Sharing. For Everyone.
https://pixelfed.org
GNU Affero General Public License v3.0
5.62k stars 670 forks source link

ActivityPub Federation debugging, how to? #4528

Closed tassoman closed 1 year ago

tassoman commented 1 year ago

I can search profiles, but they come empty. No posts at all or profile picture.

immagine

I enabled .env variables

# ActivityPub Configuration
ACTIVITY_PUB="true"
AP_REMOTE_FOLLOW="true"
AP_INBOX="true"
AP_OUTBOX="true"
AP_SHAREDINBOX="true"
AP_LOGGER_ENABLED="true"

I can't find any AP log, the only log file i can find is laravel log.

(dev) tassoman@host:~/pixelfed$ find -iname *.log
./storage/logs/laravel.log

Any idea how to debug what's happening?

tramtrist commented 1 year ago

I dont have the answer but Ive been checking /var/logs/nginx/ logs to see whats up in the way of the error log and 404s in the access log

tassoman commented 1 year ago

There is no activity inside the access log, except for my requests. No http errors, also. Neither PHP errors (debug mode is on) :shrug:

tramtrist commented 1 year ago

Did you run php artisan config:cache after you edited the env file? If its not that could be a whole host of other things like DNS, reverse proxy issue, certs, etc

tassoman commented 1 year ago

Diagnostic says :heavy_check_mark: green for each relevant AP setting. I cache settings, after each environment edit.
Instance page is listing the instances I've "pinged" counting 1 profile and 0 statuses. Certificates are ok. I can see also weird blind requests looking for wordpress flaws, I bet the server can be reached flawless. (otherwise, I wouldn't have responses).

Looks like other servers don't react to "ping"

tassoman commented 1 year ago

I asked another instance administrator, and they didn't found any evidence of federation.

Then I checked the routes, by cleaning and re route:cache but I got an error. I can't understand

php artisan route:list

   Error 

  Undefined constant App\Providers\RouteServiceProvider::HOME

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:954
    950▕         }
    951▕ 
    952▕         array_pop($this->buildStack);
    953▕ 
  ➜ 954▕         return $reflector->newInstanceArgs($instances);
    955▕     }
    956▕ 
    957▕     /**
    958▕      * Resolve all of the dependencies from the ReflectionParameters.

      +12 vendor frames 
  13  [internal]:0
      Illuminate\Foundation\Console\RouteListCommand::Illuminate\Foundation\Console\{closure}()

      +16 vendor frames 
  30  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()
tassoman commented 1 year ago

Now my route list is ok, it lists 728 routes.
If I put a status URI inside the search field, I can retrieve the status from remote instance.
If I write a @username@remote.server I can't retrieve any past posts, no avatar image, only Bio. All remote avatars are missing. Remote profile's following/follow list is 0 vs 0.
If I follow the pixelfed profile, from remote, the request still pending. In the access Log I can see regular requests form the instance (but not the answer). No errors in Debug Mode laravel.log.
Horizon have no failing jobs.

Anything wrong?
Pixelfed is only able to fetch new statuses but not profiles, only bios.

immagine

SiskoUrso commented 1 year ago

Having this same issue on a fresh install, unable to load any remote profiles data, looks just like in your first set of screenshots in the original post.

Edit: After posting this I just wanted to add that I am able to lookup myself through mastodon and pull up my profile with the avatar and follow it which is recognized on my profile on pixelfed instance. But still no change with profiles from remote instances within pixelfed. So federation is working to some degree.

tassoman commented 1 year ago

Avatars are stored into S3 (if configured) the directory is cache/ and must be enabled as public read-only