#Debugging #activitypub implementations seems to be quite hard.
-
#Debugging #activitypub implementations seems to be quite hard. I've got a pretty simple server set up that for now only serves information for one
Actor
of typeService
. My goal at some point is to have this be a working bot that does things. But for the time being I'm still struggling to get other servers to actually consume that actor from my server. I've got #webfinger working I believe correctly (here) and the ID it returns responds with what seems to me like a validActor
json-id (here). However the several instances I've tried accessing it from all seem to not be able to consume that for any reason. Misskeys end up with anAn error has occurred
message, mastodons just say they're not finding anything.
With the misskeys at least I see a request coming in to/.well-known/webfinger
, but mastodon instances don't seem to attempt to make any call, even if I search directly for the URL of the actor object. Meanwhilefedify lookup
seems to be fine with what it gets from the webfinger request since it then proceeds to hit the actor URL as well and prints out the json-ld it gets from it.
There don't seem to be any tools that I can point at a resource and have them tell me what it is I haven't implemented properly which is a bit frustrating. -
replied to Ку 🇧🇬🇪🇺:neobear_devil_blank_hammer_fire_laptop: on last edited by
@kunev if you're seeing traffic, that's probably me looking into it, because I also struggled to get started
-
replied to heta sniglar i ditt område on last edited by
@kunev local masto instance says `Actor https://dev.fedi-babel.xyz/@babelbot has no 'preferredUsername', which is a requirement for Mastodon compatibility`
-
replied to Ку 🇧🇬🇪🇺:neobear_devil_blank_hammer_fire_laptop: on last edited by
@kunev Your Actor JSON-LD seems lacking the name field. It might be why Mastodons say they're not finding anything.
-
replied to heta sniglar i ditt område on last edited by
@[email protected] I was only looking at mastodon's output in hivemind, but obviously the important bits only go in
log/development.log
.
Thanks! -
replied to Ку 🇧🇬🇪🇺:neobear_devil_blank_hammer_fire_laptop: on last edited by
I wrote a tool verify.funfedi.dev that tests these kinds of things:
- It's running into timeouts. This probably means that you are running something singlethreaded that needs to be multithreaded.
- Second your preferredUsername needs to be
babelbot
to match your webfinger
Hope this helps.
-
replied to 洪 民憙 (Hong Minhee) on last edited by [email protected]
@[email protected] thanks! Turns out it was
preferredName
that mastodon insists on, and adding that also fixed it for misskey.
I gotta figure out why akkoma/pleroma don't like it yet. but that's still great progress. -
replied to Ку 🇧🇬🇪🇺:neobear_devil_blank_hammer_fire_laptop: on last edited by
@kunev Good job!
-
replied to Helge on last edited by
@[email protected] awesome! This is exactly the type of thing I wanted to find!
I'm not sure about the timeouts, it's a quart app that's running asynchronously, and it basically does no IO except the network requests themselves. But I am currently running it like a trash goblin, just firing up the dev server behind a caddy to terminate the tls, so that might not be great. I'll try running it properly with hypercorn later to see if that helps. The server itself isn't really seeing much traffic right not so that it would hit any performance issues, I can see requests overnight from the people that have replied to this and not much more. -
replied to Ку 🇧🇬🇪🇺:neobear_devil_blank_hammer_fire_laptop: on last edited by
First, I could lookup https://dev.fedi-babel.xyz/@babelbot from mastodon.social. So the first round of problems seems to be solved.
Regarding timeouts. verify.funfedi.dev tries to post to the inbox. It might be related to that. It might also be due to the signed get. Are you using something synchronous for HTTP requests? (e.g. the requests library instead of httpx or asyncio).
Second do you know about my library bovine. It might simplify your implementation.
-
replied to Helge on last edited by
@[email protected] I'm not doing any requests, it's all just a few functions returning pretty much static jsons. However there's still no handler for the inbox, so posting to it would get a 404.
My initial idea is to do more stuff on my own, rather sloppy at that, in order to grok the protocol better. But I'll definitely look at bovine for inspiration and probably use it later when I actually want to build something more usable than just that playground thing I'm doing right now. Thanks!