snarfed / bridgy

📣 Connects your web site to social media. Likes, retweets, mentions, cross-posting, and more...
https://brid.gy
Creative Commons Zero v1.0 Universal
707 stars 52 forks source link

Bluesky object has unknown $type: app.bsky.graph.defs#listView #1581

Closed snarfed closed 9 months ago

snarfed commented 10 months ago

Details in https://console.cloud.google.com/errors/detail/COew8cf13qu8Cg;time=P30D?project=brid-gy . Happening during poll, looks like someone liked a feed, which we don't currently know how to convert to AS1, so we choked. cc @JoelOtter. Stack trace:

 ValueError: Bluesky object has unknown $type: app.bsky.graph.defs#listView
at .to_as1 ( /layers/google.python.pip/pip/lib/python3.11/site-packages/granary/bluesky.py:824 )
at .to_as1 ( /layers/google.python.pip/pip/lib/python3.11/site-packages/granary/bluesky.py:760 )
at .to_as1 ( /layers/google.python.pip/pip/lib/python3.11/site-packages/granary/bluesky.py:707 )
at .to_as1 ( /layers/google.python.pip/pip/lib/python3.11/site-packages/granary/bluesky.py:770 )
at ._post_to_activity ( /layers/google.python.pip/pip/lib/python3.11/site-packages/granary/bluesky.py:1076 )
at .get_activities_response ( /layers/google.python.pip/pip/lib/python3.11/site-packages/granary/bluesky.py:1012 )
at .poll ( /workspace/tasks.py:141 )
at .dispatch_request ( /workspace/tasks.py:90 )
at .background_handle_exception ( /workspace/flask_background.py:43 )

Logs:

Params: [('source_key', 'agdicmlkLWd5ci0LEgdCbHVlc2t5IiBkaWQ6cGxjOno1N3RrZzRiM2h3N2ZzbjQ3bHVkM2tmNQw'), ('last_polled', '1970-01-01-00-00-00')]
Source: sylee.dev (Bluesky) did:plc:z57tkg4b3hw7fsn47lud3kf5, https://brid.gy/bluesky/did:plc:z57tkg4b3hw7fsn47lud3kf5
Last poll: https://brid.gy/log?start_time=1698303699&key=agdicmlkLWd5ci0LEgdCbHVlc2t5IiBkaWQ6cGxjOno1N3RrZzRiM2h3N2ZzbjQ3bHVkM2tmNQw
Updating sylee.dev (Bluesky) /bluesky/did:plc:z57tkg4b3hw7fsn47lud3kf5 : {'poll_status': 'polling', 'last_poll_attempt': datetime.datetime(2023, 10, 26, 8, 1, 46, 662568, tzinfo=datetime.timezone.utc), 'rate_limited': False}
no refresh_token
226 lexicons loaded
Using server at https://bsky.social/
com.atproto.server.createSession: {} {'identifier': 'sylee.dev', 'password': ''}
Validating com.atproto.server.createSession parameters
Running <function post at 0x3e7525f77f60> https://bsky.social/xrpc/com.atproto.server.createSession {'identifier': 'sylee.dev', 'password': ''}  {'User-Agent': 'Bridgy (https://brid.gy/about)', 'Content-Type': 'application/json'}
Logged into https://bsky.social/ as did:plc:z57tkg4b3hw7fsn47lud3kf5, setting access_token
Validating com.atproto.server.createSession output
226 lexicons loaded
Using server at https://bsky.social/
app.bsky.feed.getAuthorFeed: {'actor': 'sylee.dev', 'limit': 30} {}
Validating app.bsky.feed.getAuthorFeed parameters
Running <function get at 0x3e7525f454e0> https://bsky.social/xrpc/app.bsky.feed.getAuthorFeed?actor=sylee.dev&limit=30 {} actor=sylee.dev&limit=30 {'User-Agent': 'Bridgy (https://brid.gy/about)', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNvbS5hdHByb3RvLmFwcFBhc3MiLCJzdWIiOiJkaWQ6cGxjOno1N3RrZzRiM2h3N2ZzbjQ3bHVkM2tmNSIsImlhdCI6MTY5ODMwNzMwNywiZXhwIjoxNjk4MzE0NTA3fQ.-ndbB5qearoN-llty5ZvChEp9ngyHr4r2oBjP25UYJk', 'Content-Type': 'application/json'}
Validating app.bsky.feed.getAuthorFeed output
app.bsky.feed.getLikes: {'uri': 'at://did:plc:z57tkg4b3hw7fsn47lud3kf5/app.bsky.feed.post/3kcmzw3yt4e2a'} {}
Validating app.bsky.feed.getLikes parameters
Running <function get at 0x3e7525f454e0> https://bsky.social/xrpc/app.bsky.feed.getLikes?uri=at%3A%2F%2Fdid%3Aplc%3Az57tkg4b3hw7fsn47lud3kf5%2Fapp.bsky.feed.post%2F3kcmzw3yt4e2a {} uri=at%3A%2F%2Fdid%3Aplc%3Az57tkg4b3hw7fsn47lud3kf5%2Fapp.bsky.feed.post%2F3kcmzw3yt4e2a {'User-Agent': 'Bridgy (https://brid.gy/about)', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNvbS5hdHByb3RvLmFwcFBhc3MiLCJzdWIiOiJkaWQ6cGxjOno1N3RrZzRiM2h3N2ZzbjQ3bHVkM2tmNSIsImlhdCI6MTY5ODMwNzMwNywiZXhwIjoxNjk4MzE0NTA3fQ.-ndbB5qearoN-llty5ZvChEp9ngyHr4r2oBjP25UYJk', 'Content-Type': 'application/json'}
Validating app.bsky.feed.getLikes output
...
app.bsky.feed.getLikes: {'uri': 'at://did:plc:z57tkg4b3hw7fsn47lud3kf5/app.bsky.feed.post/3kcfd4c6p4m2q'} {}
Validating app.bsky.feed.getLikes parameters
Running <function get at 0x3e7525f454e0> https://bsky.social/xrpc/app.bsky.feed.getLikes?uri=at%3A%2F%2Fdid%3Aplc%3Az57tkg4b3hw7fsn47lud3kf5%2Fapp.bsky.feed.post%2F3kcfd4c6p4m2q {} uri=at%3A%2F%2Fdid%3Aplc%3Az57tkg4b3hw7fsn47lud3kf5%2Fapp.bsky.feed.post%2F3kcfd4c6p4m2q {'User-Agent': 'Bridgy (https://brid.gy/about)', 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImNvbS5hdHByb3RvLmFwcFBhc3MiLCJzdWIiOiJkaWQ6cGxjOno1N3RrZzRiM2h3N2ZzbjQ3bHVkM2tmNSIsImlhdCI6MTY5ODMwNzMwNywiZXhwIjoxNjk4MzE0NTA3fQ.-ndbB5qearoN-llty5ZvChEp9ngyHr4r2oBjP25UYJk', 'Content-Type': 'application/json'}
Validating app.bsky.feed.getLikes output
[crash]
Updating sylee.dev (Bluesky) /bluesky/did:plc:z57tkg4b3hw7fsn47lud3kf5 : {'poll_status': 'error'}
snarfed commented 10 months ago

(Btw @JoelOtter none of these issues are urgent, and you're obviously not obligated to keep working on any of this more than you want to or can afford! I'd love the help, but this is all for fun, and totally up to you how much time you put in and when. I appreciate everything you've done already!)

JoelOtter commented 10 months ago

Weird! Just looked and likes of feeds don't show up in the app view. I wonder if we can just...not handle these?

snarfed commented 10 months ago

Yes! Definitely sounds like the right idea.

snarfed commented 9 months ago

fixed by snarfed/granary@d330febd1a9b389c1c1bc31a6e6d31779f6f3620