jointakahe / takahe

An ActivityPub/Fediverse server
BSD 3-Clause "New" or "Revised" License
1.1k stars 83 forks source link

Unable to interact with flipboard.com #681

Closed karthikb351 closed 6 months ago

karthikb351 commented 6 months ago

Flipboard is now federating via activitypub on the main flipboard.com domain. Takahe seems to have an issue interacting with that instance.

Announcement: https://flipboard.social/users/mike/statuses/111602382232229349

This is the error I'm getting on stator.

stator_1  | [2023-12-23 13:34:01]     INFO - HTTP Request: POST https://flipboard.com/users/polygon/inbox "HTTP/1.1 415 "
stator_1  | [2023-12-23 13:34:01]    ERROR - POST error to https://flipboard.com/users/polygon/inbox: 415 b'{"timestamp":1703338441117,"path":"/users/polygon/inbox","status":415,"error":"Unsupported Media Type","requestId":"2dda8c6d"}'
stator_1  | Traceback (most recent call last):
stator_1  |   File "/takahe/stator/models.py", line 204, in transition_attempt
stator_1  |     next_state = current_state.handler(self)
stator_1  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
stator_1  |   File "/takahe/users/models/follow.py", line 76, in handle_unrequested
stator_1  |     instance.source.signed_request(
stator_1  |   File "/takahe/users/models/identity.py", line 1152, in signed_request
stator_1  |     return HttpSignature.signed_request(
stator_1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
stator_1  |   File "/takahe/core/signatures.py", line 276, in signed_request
stator_1  |     raise ValueError(
stator_1  | ValueError: POST error to https://flipboard.com/users/polygon/inbox: 415 b'{"timestamp":1703338441117,"path":"/users/polygon/inbox","status":415,"error":"Unsupported Media Type","requestId":"2dda8c6d"}'
andrewgodwin commented 6 months ago

Fixing this is going to require someone to sit down and spend some quality time with a local dev copy. I presume it's just a small tweak to how things are fetched.

alphatownsman commented 6 months ago

the error happens when sending follow request.

is there code of flipboard.com available?

andrewgodwin commented 6 months ago

No, this sort of debugging generally requires treating the other end as a black box and repeatedly trying different things until it's clear what works.

alphatownsman commented 6 months ago

This seems fixed now in main.

It's still not possible to follow flipboard.com account but the problem seems on their end. AFAIK they are using actor_url + '/inbox' instead of actual inbox url to post back ACCEPT for follow request.