Could not find repo for DID #188
-
Hello there, the inline example in atproto/car/init.py stopped working last week. The line repo = client.com.atproto.sync.get_repo({'did': client.me.did}) atproto/atproto/car/__init__.py Line 40 in 1e1829e throw an atproto.exceptions.BadRequestError: Response(success=False, status_code=400, content=XrpcError(error='InvalidRequest', message='Could not find repo for DID: '), headers=Headers({'date': 'Mon, 20 Nov 2023 14:09:40 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '100', 'connection': 'keep-alive', 'x-powered-by': 'Express', 'access-control-allow-origin': '*', 'ratelimit-limit': '3000', 'ratelimit-remaining': '2998', 'ratelimit-reset': '1700489680', 'ratelimit-policy': '3000;w=300', 'etag': 'W/"64-u+z2SVfRs2zfn34PuZ9u5A4P55k"', 'vary': 'Accept-Encoding'})) I could verify the correctness of the DID in other ways. Additional information: the more or less 'official' indigo-implementation seems to have a similar issue. Did they change the handling in the protocol? Thanks for looking into it. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hello, maybe this is related bluesky-social/atproto#1832 |
Beta Was this translation helpful? Give feedback.
-
Thanks for your quick reaction, especially since the release 1.0.0 is still further up on the road... It looks like it might be:
Will you be able to fix this on the python side to get back to the previous behavior, or will the coding just get more complicated for users of your python wrapper? (I assume the issue won't simply disappear when they have fiished the roll-out, or will it?) Cheers |
Beta Was this translation helpful? Give feedback.
-
You receive the server side error. Python SDK works properly and show this error as expected. To be honest I don't know why server returns this error for you. Perhaps your account has not been migrated yet or something. Try to login to the official bsky app. Also, maybe you are using the deprecated server method. Double-check if there is another way to get a repo I'll try to run this example with my account later |
Beta Was this translation helpful? Give feedback.
-
True, the SDK's Getting a repo essentially works without login. I can look for the DID elsewhere, say So I already tested with a handful of DIDs, and it's been the same error. It seems to be related with what @strideynet describes here. Most probably it concerns all accounts that have been migrated already. The official app doesn't have the option to DL (archive) the repo, and all programmatical ways I know of - indigo, dart api, Python SDK - seem to have the same problems. I fear it can only be fixed by bluesky-social, and they probably have different priorities... :( |
Beta Was this translation helpful? Give feedback.
-
Repos have been moved to new PDSs and don't all live on |
Beta Was this translation helpful? Give feedback.
Repos have been moved to new PDSs and don't all live on
bsky.social
anymore. You should be checking a user's DID doc to figure out which PDS is hosting their repo and then downloading it from there using the getRepo endpoint or you can download it from the Relay service atbsky.network
which stores a mirror of all repos. Since migrating users to new PDSs, some users have repos with bad signatures that will be fixed the next time they create a record, so the Relay service may not provide the repo for those users while their PDS will still work for getRepo. See https://atproto.com/blog/repo-export#on-another-instance