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

Follow Request From Lemmy Not Working #370

Closed
BentiGorlich opened this issue Dec 20, 2023 · 9 comments
Closed

Follow Request From Lemmy Not Working #370

BentiGorlich opened this issue Dec 20, 2023 · 9 comments
Labels
activitypub ActivityPub related issues bug Something isn't working help wanted Extra attention is needed more information needed requires more info to solve

Comments

@BentiGorlich
Copy link
Member

BentiGorlich commented Dec 20, 2023

Describe the bug
When clicking subscribe on a lemmy instance it is stuck on "subscription pending"

On which Mbin instance did you find the bug?
fedia.io

To Reproduce
Steps to reproduce the behavior:

  1. Go to Lemmy instance
  2. Search for a mBin magazine
  3. Click subscribe
  4. See it stuck on "subscription pending"

Expected behavior
The follow should be accepted

Screenshots

Desktop (please complete the following information):
irrelevant

Smartphone (please complete the following information):
irrelevant

Additional context
#351

@BentiGorlich BentiGorlich added bug Something isn't working help wanted Extra attention is needed more information needed requires more info to solve activitypub ActivityPub related issues labels Dec 20, 2023
@BentiGorlich
Copy link
Member Author

@Nutomic I'd like to continue here, as the problem is unrelated to the other issue.
I had the env var on for additional logging, so I would have seen logging output for it, but there was none. Since it was a local test instance I doubt that there was anything going on there that would delay the sending...

Maybe it is fixed in a newer Version of mBin... Can you try following this magazine? The instance is running on the latest commit: https://gehirneimer.de/m/Test

@BentiGorlich
Copy link
Member Author

Following that magazine worked from https://infosec.pub but not from https://feddit.de

@Nutomic
Copy link

Nutomic commented Dec 20, 2023

Both of those instances use 0.19.0 which has a known bug with sending out activities. Better use voyager.lemmy.ml which is one of our test instances and has that bug fixed. I just followed from there and it went through fine.

Btw, a bit off topic here but it would be helpful if you could send me the json of activities and objects that mbin produces. Then I can add them to Lemmy unit tests to ensure that Lemmy can parse them without problems. Here you can see examples for different projects.

@BentiGorlich
Copy link
Member Author

Ah ok. I thought that bug is not affecting Follow activities. But ok then, so it is solved 👍

Yeah we lack exactly that: unit tests for AP. I'll keep that in mind. When we get around to documenting exactly what you have in your federation documentation I'll create an issue in Lemmy with a link to the doc :)

@Nutomic
Copy link

Nutomic commented Dec 20, 2023

For the tests there is no need for documentation, I just need the json itself.

@BentiGorlich
Copy link
Member Author

Here is an example. I did manually fill out according to our code though, don't know if that is enough for you

{
    '@context': 'https://www.w3.org/ns/activitystreams',
    'id': 'https://some-mbin.instance/f/object/2721ffc3-f8a9-417e-a124-af057434a3af#accept',
    'type': 'Accept',
    'actor': 'https://some-mbin.instance/m/someMag',
    'object': [
        'id': 'https://some-other.instance/f/object/c51ea652-e594-4920-a989-f5350f0cec05',
        'type': 'Follow',
        'actor': 'https://some-other.instance/u/someUser',
        'object': 'https://some-mbin.instance/m/someMag'
    ]
}

@Nutomic
Copy link

Nutomic commented Dec 22, 2023

I had to replace ' with " and the [] in object with {}, then it works fine. However I just came across this Kbin issue indicating that Lemmy fails to parse post removals from Kbin. Could you give me examples of those activities so I can see where the problem is?

LemmyNet/lemmy#4323

@BentiGorlich
Copy link
Member Author

Totally missed your post, sorry. Sorry about the wrong syntax, php handles all this stuff as an array and because I manually copied it I messed it a bit up 😅

Here is an example of a delete message:

{
    '@context': 'https://www.w3.org/ns/activitystreams',
    'id':,
    'type': 'Delete',
    'actor': 'https://example.org/u/exampleUser',
    'object': {
        'id': 'https://example.org/m/exampleMag/t/1',
        'type': 'Tombstone',
    }
    'to': ['https://www.w3.org/ns/activitystreams#Public'],
    'cc': ['https://example.org/m/exampleMag'],
}

@BentiGorlich
Copy link
Member Author

Since this issue has been closed in the lemmy repo I am going to close this one as well as this was not a bug on our side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues bug Something isn't working help wanted Extra attention is needed more information needed requires more info to solve
Projects
None yet
Development

No branches or pull requests

2 participants