Git Product home page Git Product logo

Comments (12)

gugray avatar gugray commented on June 15, 2024

Thanks for the useful details! I found the trace of this request in the log. The problem is that my data model treats the "to" and "cc" fields as arrays; that is what I have always seen from Mastodon. In the request from GoToSocial, the "to" field's value is a string.

I'm trying to track this down (not because I want to be "right" but to understand what's going on). So far I cannot find a single document with a formal specification of what is a valid Activity, the acceptable types of each field etc... I've seen this JSON polymorphism elsewhere (in "object") and in all honesty this is driving me crazy.

But, I'll stop whining and return to doing what I did with the Parrot all along: undestand the protocol through good old trial-and-error.

from rss-parrot.

kvibber avatar kvibber commented on June 15, 2024

Ugh, I see what you mean. I just spent more time than I should looking through the vocab doc and can't find any indication of whether single-item parameters should be just the items or single-item arrays. Though there are a couple of single-item "to" examples buried in a non-normative section, so even if it doesn't say so, it at least has an example that matches GoToSocial's interpretation.

from rss-parrot.

gugray avatar gugray commented on June 15, 2024

Thanks for looking into this too! I didn't mean to say GoToSocial was doing anything wrong; it's just hard to figure out some of the details about ActivityPub. Any case, if to/cc is used either as an array or a string in the wild, that's what the parrot will need to get used to :)

from rss-parrot.

gugray avatar gugray commented on June 15, 2024

Also @kvibber can you give me access to a GoToSocial instance? I don't seem to find any directory, hence also no instance where I could sign up.

from rss-parrot.

kvibber avatar kvibber commented on June 15, 2024

@gugray Sorry it took a while to get back to you. Yes, I can set up a test account for you on my test instance, gts.keysmash.xyz. It's not open for public signups, so let me know how I should send you the login info.

from rss-parrot.

gugray avatar gugray commented on June 15, 2024

Sorry, now I've been focusing on other things. Could you do these two things?

1: Check if the problem is still there. I already made parsing this JSON more robust back in January; unless there are other issues too, it should already work!

2: If the problem is there, I'd like an account with the Parrot's email, [email protected]

Thanks~

from rss-parrot.

kvibber avatar kvibber commented on June 15, 2024

Interesting: I'm still not able to follow an RSS-Parrot-generated account from GTS or get a reply from @ birb, but I'm seeing a different error now:

timestamp="23/02/2024 04:47:49.083" func=server.glob..func1.Logger.func13.1 level=INFO latency="271.219µs" userAgent="RSS-Parrot-Bot/0.0.57 (+https://rss-parrot.net)" method=GET statusCode=406 path=/users/kelsonv/main-key clientIP=64.176.202.191 pubKeyID=https://rss-parrot.net/u/birb#main-key errors="Error #01: no format can be offered for requested Accept header(s) [application/json]; this endpoint offers [application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\" application/activity+json text/html]\n" requestID=be0mnn4d04000vfe7ry0 msg="Not Acceptable: wrote 186B"

It looks like another case where GoToSocial is more strictly enforcing the spec than most AP software. So requesting one of these types should fix that part:

I'll set up that test account for you and send the login info to that email address.

from rss-parrot.

kvibber avatar kvibber commented on June 15, 2024

I found another log entry that looks relevant:

timestamp="23/02/2024 04:47:21.121" func=dereferencing.(*Dereferencer).enrichAccount level=ERROR requestID=v89mnn4d040017ssgt7g msg="error webfingering[1] remote account [email protected]: fingerRemoteAccount: error webfingering @[email protected]: Finger: non webfinger type response: application/activity+json; charset=utf-8"

It took some digging to find what it was expecting, but apparently webfinger is supposed to respond with application/jrd+json

from rss-parrot.

kvibber avatar kvibber commented on June 15, 2024

OK, I've set up the test account and emailed the info to [email protected]. Let me know if you have any problems connecting to it!

from rss-parrot.

gugray avatar gugray commented on June 15, 2024

Changes from latest commit:

  • GTS expects application/jrd+json in Content-Type of webfinger response; rejected application/json
  • GTS expects application/activity+json in Content-Type of POST activity calls; rejected application/json
  • GTS expects application/activity+json in Accept header of GET requests of user profiles; rejected application/json
  • When querying /users/rssparrot/main-key (from HTTP signature), GTS only returns the key, not the rest of the user info. This caused the Parrot to miss a lot of fields. No querying by activity's actor, not key URL from signature.
  • GTS puts a single tag as an object in the activity; other systems always use an array here. Now parsing permissively, accepting nothing, a single tag, and an array of tags as well.
  • GTS sends Follow and Undo requests to the instance inbox, not the user inbox. It puts the followed/unfollowed user name in the activity's 'to' field. This is exactly the opposite of what Mastodon servers do. Now coping with both.
  • GTS does not have a shared inbox. Now sending toots to individual users if they don't have a shared inbox in their profile. (Mastodon servers all have a shared inbox.)

What works now:

  • Can request a feed from the birb by sending DM to @birb@rss-parrot. Responses show up in GTS.
  • Can follow feed accounts in the Parrot.
  • Toots about new posts show up in GTS timeline.

What does not work:

  • When I toot in GTS with public, unlisted or followers visibility, the Parrot receives no notification about the mention whatsoever. Therefore it cannot respond the these toots.

from rss-parrot.

kvibber avatar kvibber commented on June 15, 2024

Thanks yet again for helping with this!

Interestingly, my own account is able to get a reply from birb when mentioning it in a public or unlisted post, so I'm not sure why it didn't work with the test account. Maybe they have different settings.

While I'm at it, I decided to check against Snac2, which is another small-scale ActivityPub server I'm also testing. And it seems to work fine there too.

from rss-parrot.

gugray avatar gugray commented on June 15, 2024

For now I'm inclined to consider this solved! If any anomalies come up, we can deal with those in separate issues.

Thanks for your help and insights in untangling this!

from rss-parrot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.