New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Federation with Hubzilla #121
Comments
Thanks for reporting this. If anyone runs a Hubzilla instance and can help debug what's happening, that would be much appreciated! |
Hey @Eldarendil I'm new to Hubzilla. I've set up an instance and enabled Activity Pub support. I followed an account on write.as but am not sure where the stream should show up. Should it be in my channel home? |
I also found this issue on their tracker which seems to be related: https://framagit.org/hubzilla/addons/issues/123 |
@robjloranger |
@Eldarendil I will try to do some more debugging today. I need to find the logs for my hub instance and look around. edit: I have something misconfigured perhaps. It appears to work following others outside my hub but even mastodon isn't populating my stream. |
I figured out logging.. it was in the admin UI... 🤕 This may be related to
|
Ah, and there might be ActivityPub issues with our development.write.as instance... The base URL for AP requests is wrong right now (notice it's looking for |
I'm getting the same with my production instance:
And the same with following a mastodon account. |
When I tried this some time ago (last year) there wasn't any problem discovering the writeas activitypub profile. What I recall happening was we found it and sent a follow request and the follow request returned a hard (4xx or 5xx) HTTP error from the writeas server. I don't really work on federation or hubzilla these days so I'm not likely to be much help to you but I do know that 90% of the AP projects with which we had federation problems turned out to be because hubzilla supplies an actor document with an array for the url field, and not a single url.
This indicates the probe was successful. It is invoking the message delivery system to deliver a "permissions_create" message. For ActivityPub this is a follow request. From the Hubzilla UI you should see that a new connection was created. So the interesting logs will be further down past this point. We will create a follow request and send it to the other end and should report whether or not this succeeded (at a minimum we usually report if it failed). You can increase the log level and get a lot more detail but also a lot more noise. I also recommend turning on the 'logrot' addon to rotate these logfiles in 10M chunks if you are doing any serious debugging. It will save your disk filling up. |
Oh! That helps, I remember seeing a |
@redmatrix do you know off hand where that is in the hubzilla code? Or for certain if the JSON field URL is an array or an object. |
I just sent this packet and received a 500 error from loranger.xyz. The signature might be mangled from copy/paste. I can try again if you think that's the problem, but our signatures have been pretty reliable.
loranger.xyz did retrieve the actor record at https://hz.macgirvin.com/channel/ziggy before returning 500.
|
can you try against @log@rob.writefreely.dev? that one has the potential fix. Looking at my hubzilla logs I see a lot more info now but still the 404 on |
In previous Hubzilla versions the url element held two links - the text/html and another Zot specific link. It looks as if the devs removed the second one, but I'm mentioning because it can theoretically hold any number of links and probably requires enumerating and looking for a text/html mediaType if the url field isn't a simple string. |
Ya my attempt just assumes the first one in the list is correct. Wouldn't it be nice if all the activity pub implementation followed the exact same protocol? |
I just tried again and got another 500. Don't worry about the zot-info failures. We always try our protocol first because it has better privacy controls. Anyway I can't help much more right now. I've got a farm to run. Hopefully there's enough info here to move forward. |
No problem, thanks so much for your help and input @redmatrix. It is greatly appreciated. pinging @thebaer to see how far to go with this |
Hang on - I had just tried your channel again. I'll try the other one you mentioned and then I gotta run. |
Sadly the same result. 2019-06-14T23:15:31Z:LOG_INFO:9d386a8134:pubcrawl.php:1235:pubcrawl_queue_deliver: pubcrawl_queue_deliver: queue post returned 500 from https://rob.writefreely.dev/api/collections/log/inbox |
Just tried one more thing in between feeding horses and cows. If I send the url as a string the follow request goes through successfully. Going forward we actually do need the ability for an array here so I do not plan on checking in this change, but tried it to pinpoint that this probably was in fact the major issue. |
Please note that hubzilla changed the actor from object to string type since version 4.0.3 |
@git-marijus Yes but we're discussing an issue with the actor->url and not the actor itself. Actor->url did change (in hubzilla) from a sequential array to an object during this time, but just like the actor many projects expect only a string (URI) and cannot handle either an object or array. The AS spec allows all of these types and in many places support of all these types is required - for instance selecting the best candidate from arrays of different image sizes or video encoding urls, which are frequently encountered in the fediverse today. The only unique thing Hubzilla is doing here is using object/array in the actor->url whereas most other projects typically use these additional constructs in the object->url. |
https://framagit.org/hubzilla/addons/merge_requests/263 This should resolve the issue (against my better judgement and once it works its way through the system to a release) but I would still encourage other projects to be a bit more flexible with spec-compliant content. |
With this https://framagit.org/hubzilla/addons/merge_requests/263 change it seems writefreely fetches the actor after receiving the follow and than returns 500:
|
URL can be an array : https://www.w3.org/TR/activitystreams-vocabulary/#dfn-url |
The problem is that any project tries to be compliant with mastodon first. Mastodon uses URIs for almost anything so everybody only implemented URI handling. |
I agree, we need to work on handling the different allowable data types. |
I can now confirm that with hubzilla 4.2.1 i could sucessfully connect and receive blogs posts at write.as and pencil.writefree.ly Still not working with log@rob.writefreely.dev that instance might have issues though as it's a dev instance. |
@git-marijus yes, my dev instance is running an arbitrary commit of a develop branch. I'm glad it is working as expected now, however I intend to begin work on proper support for activity streams soon. |
I can confirm that writefreely posts correcly appear in Hubzilla timeline. Thanks for the fix, and I think you can close this issue. |
Describe the bug
New posts not shown in Hubzilla
Steps to reproduce (if necessary)
Steps to reproduce the behavior:
Expected behavior
I should see the new post in Hubzilla
Application configuration
Tested in qua.name instance
Version or last commit: v0.9.1-49-g901bf14
The text was updated successfully, but these errors were encountered: