bridgy-fed icon indicating copy to clipboard operation
bridgy-fed copied to clipboard

Bluesky: not using external PDSes yet

Open snarfed opened this issue 1 year ago • 0 comments

Looks like we have a bug with Bluesky users with their own PDSes, eg @vriska.pds.vriska.dev on PDS vriska.pds.vriska.dev, did:plc:svu7ro7knzh3eovtpst2socq in the sandbox. We're still calling XRPCs like getRecord on atproto.brid.gy when we should be using the PDS in the user's DID doc.

WebFinger works ok, eg https://atproto.brid.gy/.well-known/webfinger?resource=acct:[email protected] , but AP actor https://atproto.brid.gy/ap/did:plc:svu7ro7knzh3eovtpst2socq tries to get the user profile from atproto.brid.gy instead of vriska.pds.vriska.dev:

INFO:protocol::Loading Object at://did:plc:svu7ro7knzh3eovtpst2socq/app.bsky.actor.profile/self local=True remote=None
INFO:protocol::  not in datastore
INFO:atproto::Finding ATProto PDS for at://did:plc:svu7ro7knzh3eovtpst2socq/app.bsky.actor.profile/self
INFO:protocol::Loading Object did:plc:svu7ro7knzh3eovtpst2socq local=True remote=None
INFO:protocol::  not in datastore
INFO:oauth_dropins.webutil.util::requests.get https://plc.directory/did:plc:svu7ro7knzh3eovtpst2socq {}
INFO:oauth_dropins.webutil.util::Received 404
WARNING:oauth_dropins.webutil.util::Error 404, response body: '{"message":"DID not registered: did:plc:svu7ro7knzh3eovtpst2socq"}'
INFO:lexrpc.base::226 lexicons loaded
DEBUG:lexrpc.client::Using server at https://atproto.brid.gy/
DEBUG:lexrpc.client::com.atproto.repo.getRecord: {'repo': 'did:plc:svu7ro7knzh3eovtpst2socq', 'collection': 'app.bsky.actor.profile', 'rkey': 'self'} None
DEBUG:lexrpc.base::Validating com.atproto.repo.getRecord parameters
DEBUG:lexrpc.client::Running <function get at 0x3eab74cb6980> https://atproto.brid.gy/xrpc/com.atproto.repo.getRecord?repo=did%3Aplc%3Asvu7ro7knzh3eovtpst2socq&collection=app.bsky.actor.profile&rkey=self None repo=did%3Aplc%3Asvu7ro7knzh3eovtpst2socq&collection=app.bsky.actor.profile&rkey=self {'User-Agent': 'Bridgy Fed (https://fed.brid.gy/)', 'Content-Type': 'application/json'}
DEBUG:lexrpc.client::Got: <!doctype html> <html lang=en> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
ERROR:oauth_dropins.webutil.flask_util::<class 'requests.exceptions.HTTPError'>: 500 Server Error: Internal Server Error for url: https://atproto.brid.gy/xrpc/com.atproto.repo.getRecord?repo=did%3Aplc%3Asvu7ro7knzh3eovtpst2socq&collection=app.bsky.actor.profile&rkey=self
WARNING:oauth_dropins.webutil.util::Error 500, response body: '<!doctype html>\n<html lang=en>\n<title>500 Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n'

First reported in https://github.com/snarfed/bridgy-fed/issues/381#issuecomment-1767502606 , thanks again @leo60228!

snarfed avatar Oct 18 '23 04:10 snarfed