Skip to content
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

[bug] Unable to follow Funkwhale channel #538

Closed
georgkrause opened this issue May 3, 2022 · 9 comments
Closed

[bug] Unable to follow Funkwhale channel #538

georgkrause opened this issue May 3, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@georgkrause
Copy link

It seems to be impossible to follow a funkwhale channel using gotosocial. Example: libremusicchallenge@soundship.de / https://soundship.de/channels/libremusicchallenge/

Not sure which site causes the problem, but since I can delegate the work to you ;) and its working with mastodon, I supposed its a GTS issue

@tsmethurst tsmethurst added the bug Something isn't working label May 4, 2022
@tsmethurst tsmethurst changed the title Unable to follow Funkwhale channel [bug] Unable to follow Funkwhale channel May 4, 2022
@tsmethurst tsmethurst added this to To Be Investigated in Federation Issues May 4, 2022
@tsmethurst
Copy link
Contributor

just to make some notes for myself, here's an example of the AP representation of that channel obtained from using curl -H 'Accept: application/activity+json' https://soundship.de/channels/libremusicchallenge

{
  "id": "https://soundship.de/federation/actors/libremusicchallenge",
  "outbox": "https://soundship.de/federation/actors/libremusicchallenge/outbox",
  "inbox": "https://soundship.de/federation/actors/libremusicchallenge/inbox",
  "preferredUsername": "libremusicchallenge",
  "type": "Person",
  "name": "Libre Music Challenge",
  "followers": "https://soundship.de/federation/actors/libremusicchallenge/followers",
  "following": "https://soundship.de/federation/actors/libremusicchallenge/following",
  "manuallyApprovesFollowers": false,
  "url": [
    {
      "type": "Link",
      "href": "https://soundship.de/channels/libremusicchallenge",
      "mediaType": "text/html"
    },
    {
      "type": "Link",
      "href": "https://soundship.de/api/v1/channels/libremusicchallenge/rss",
      "mediaType": "application/rss+xml"
    }
  ],
  "icon": null,
  "attributedTo": "https://soundship.de/federation/actors/gcrkrause",
  "category": "music",
  "tag": [
    {
      "type": "Hashtag",
      "name": "#Music"
    },
    {
      "type": "Hashtag",
      "name": "#cc"
    },
    {
      "type": "Hashtag",
      "name": "#challenge"
    },
    {
      "type": "Hashtag",
      "name": "#libre"
    },
    {
      "type": "Hashtag",
      "name": "#linuxaudio"
    },
    {
      "type": "Hashtag",
      "name": "#opensource"
    }
  ],
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    "https://funkwhale.audio/ns",
    {
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
      "Hashtag": "as:Hashtag"
    }
  ],
  "publicKey": {
    "owner": "https://soundship.de/federation/actors/libremusicchallenge",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwve5Gk4ui8mgtp+mq5T8\neGG94A87QFhINc26z5A2wcrmFqPl0rmJhOY79RQI5hlkO29O9/7vhjrbOqhPDNQU\nGoayz2iXArc8YpmBkCkOFhmgePzfpx51F8MpYF5DwMUmdjfTocGaNJAXJX9SGG1v\nOj8ofFDVIChT7BiXFMNLSV3NUHb3Y296oSYT3yYbr+o60Qlos1A/LxzxmUBH5vyR\nBnNjazhDs51ifBsSWN5KSgpML1t/zBflLXLQ4uOfY3n0rvioe0uE7jn9fjjXow09\n1IaotZLp5iv1C75uiFQ0NJ1n9UETfgpON5BDZCN0rTk86cHgSmya8GzqAgdSETYq\nKwIDAQAB\n-----END PUBLIC KEY-----\n",
    "id": "https://soundship.de/federation/actors/libremusicchallenge#main-key"
  },
  "endpoints": {
    "sharedInbox": "https://soundship.de/federation/shared/inbox"
  }
}

@tsmethurst
Copy link
Contributor

tsmethurst commented May 4, 2022

Logs on GtS while doing a search for https://soundship.de/federation/actors/libremusicchallenge:

time=2022-05-04T10:10:55Z level=debug msg=performing GET to https://soundship.de/federation/actors/libremusicchallenge func=Dereference
time=2022-05-04T10:10:55Z level=info msg=[1.886131ms] OK: wrote 556 bytes clientIP=144.91.112.147 latency=1.886131ms method=GET path=/users/tobi/main-key statusCode=200 userAgent=python-requests (funkwhale/1.2.3; +https://soundship.de)
time=2022-05-04T10:10:55Z level=info msg=[1.534954ms] OK: wrote 119 bytes clientIP=::1 latency=1.534954ms method=GET path=/.well-known/nodeinfo statusCode=200 userAgent=python-requests (funkwhale/1.2.3; +https://soundship.de)
time=2022-05-04T10:10:56Z level=info msg=[536.496µs] OK: wrote 202 bytes clientIP=144.91.112.147 latency=536.496µs method=GET path=/nodeinfo/2.0 statusCode=200 userAgent=python-requests (funkwhale/1.2.3; +https://soundship.de)
time=2022-05-04T10:10:56Z level=debug msg=performing GET to https://soundship.de/federation/actors/libremusicchallenge func=Dereference
time=2022-05-04T10:10:56Z level=info msg=[2.100144ms] OK: wrote 556 bytes clientIP=::1 latency=2.100144ms method=GET path=/users/tobi/main-key statusCode=200 userAgent=python-requests (funkwhale/1.2.3; +https://soundship.de)
time=2022-05-04T10:10:56Z level=info msg=[381.429µs] OK: wrote 119 bytes clientIP=144.91.112.147 latency=381.429µs method=GET path=/.well-known/nodeinfo statusCode=200 userAgent=python-requests (funkwhale/1.2.3; +https://soundship.de)
time=2022-05-04T10:10:56Z level=info msg=[512.102µs] OK: wrote 202 bytes clientIP=::1 latency=512.102µs method=GET path=/nodeinfo/2.0 statusCode=200 userAgent=python-requests (funkwhale/1.2.3; +https://soundship.de)

So it looks as though funkwhale receives the request OK, it does a dereference of the main key for the user doing the lookup, and then it checks the nodeinfo/2.0 endpoint and then gives up.

@tsmethurst
Copy link
Contributor

tsmethurst commented May 4, 2022

It looks to me like it's getting stuck here somewhere: https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/develop/api/funkwhale_api/federation/tasks.py#L191-226

It's looking for metadata.actorId in the nodeinfo. This makes sense, since funkwhale's nodeinfo returns:

{
  "version": "2.0",
  "software": {
    "name": "funkwhale",
    "version": "1.2.3"
  },
  "protocols": [
    "activitypub"
  ],
  "services": {
    "inbound": [],
    "outbound": []
  },
  "openRegistrations": false,
  "usage": {
    "users": {
      "total": 15,
      "activeHalfyear": 5,
      "activeMonth": 2
    }
  },
  "metadata": {
    "actorId": "https://soundship.de/federation/actors/service",
    "private": false,
    "shortDescription": "",
    "longDescription": "",
    "rules": "",
    "contactEmail": "mail@georg-krause.net",
    "terms": "",
    "nodeName": "Soundship",
    "banner": "https://s3.j19.planetexpress.cc/georg-funkwhale/dynamic_preferences/instance__banner/New%20Project%288%29.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=georg-funkwhale%2F20220504%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220504T102710Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=61a2695359cfc46826191e8ec303f7132a5424280f89225ef57cd3cba4f20a9c",
    "defaultUploadQuota": 1000,
    "library": {
      "federationEnabled": true,
      "anonymousCanListen": true,
      "tracks": {
        "total": 4468
      },
      "artists": {
        "total": 221
      },
      "albums": {
        "total": 383
      },
      "music": {
        "hours": 7412.558888888889
      }
    },
    "supportedUploadExtensions": [
      "aac",
      "aif",
      "aiff",
      "flac",
      "m4a",
      "mp3",
      "ogg",
      "opus"
    ],
    "allowList": {
      "enabled": false,
      "domains": null
    },
    "reportTypes": [
      {
        "type": "takedown_request",
        "label": "Takedown request",
        "anonymous": true
      },
      {
        "type": "invalid_metadata",
        "label": "Invalid metadata",
        "anonymous": false
      },
      {
        "type": "illegal_content",
        "label": "Illegal content",
        "anonymous": true
      },
      {
        "type": "offensive_content",
        "label": "Offensive content",
        "anonymous": false
      },
      {
        "type": "other",
        "label": "Other",
        "anonymous": false
      }
    ],
    "funkwhaleSupportMessageEnabled": true,
    "instanceSupportMessage": "",
    "endpoints": {
      "knownNodes": "https://soundship.de/api/v1/federation/domains",
      "channels": "https://soundship.de/federation/index/channels",
      "libraries": "https://soundship.de/federation/index/libraries"
    },
    "usage": {
      "favorites": {
        "tracks": {
          "total": 5
        }
      },
      "listenings": {
        "total": 13005
      },
      "downloads": {
        "total": 39358
      }
    }
  }
}

However, GoToSocial's nodeinfo only returns:

{
  "version": "2.0",
  "software": {
    "name": "gotosocial",
    "version": "v0.3.1 f040ad8 2022-05-03T10:06:08Z [go1.18.1]"
  },
  "protocols": [
    "activitypub"
  ],
  "services": {
    "inbound": [],
    "outbound": []
  },
  "openRegistrations": false,
  "usage": {
    "users": {}
  },
  "metadata": {}
}

The above is similar to what Mastodon returns. So Funkwhale can't find the metadata.actorId that it's looking for.

Now that i'm doing these tests, I notice that I also can't search this funkwhale account from Mastodon with AUTHORIZED_FETCH set to true. This implies that the issue is something to do with http signatures.

@igalic
Copy link
Contributor

igalic commented May 4, 2022

time to create this issue @ Funkwhale then

@tsmethurst
Copy link
Contributor

@georgkrause is this issue still ongoing, do you know?

@georgkrause
Copy link
Author

@tsmethurst I did not yet checked the bug and I am not aware of any fix. However, I am already planning to spend some time on the federation part of Funkwhale soonish(tm) and I will look into this as well.

@futzle
Copy link

futzle commented Oct 27, 2023

Hi GTS people: I encountered this same problem trying to follow a Funkwhale channel from my Mastodon server with AUTHORIZED_FETCH turned on. It's still happening on Funkwhale 1.3.3. As there wasn't an issue, I raised one in their Gitlab tracker.

@georgkrause
Copy link
Author

Since we are suspecting this to be an issue of Funkwhale, I'd be fine with closing this to keep your issue tracker tidy. :)

@tsmethurst
Copy link
Contributor

Ack, will do!

@tsmethurst tsmethurst moved this from To Be Investigated to Resolved in Federation Issues Dec 8, 2023
@tsmethurst tsmethurst closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

4 participants