ITADN

Handle does not resolve, must use DID for login

#229ClosedIsolyth 创建于 2025-09-21
by designarea/atproto
I
Isolythcommented
# Bug report ## Details ### Describe the bug When I attempt to get the profile using a handle, I get `Unhandled exception. System.ArgumentException: "@hailey.at" does not validate as a handle. (Parameter 's') at idunno.AtProto.Handle.Parse(String s, Boolean throwOnError, Handle& result) in /_/src/idunno.AtProto/Handle.cs:line 262 at idunno.AtProto.Handle..ctor(String s, Boolean validate) in /_/src/idunno.AtProto/Handle.cs:line 40 at idunno.AtProto.Handle..ctor(String s) in /_/src/idunno.AtProto/Handle.cs:line 56 at Program.<Main>$(String[] args) in /home/isolyth/Documents/Programming/Projects/Hyperblock/Hyperblock/Program.cs:line 6 at Program.<Main>(String[] args)` Additionally, I get the following error when I attempt to use agent.login with my handle rather than my DID `Unhandled exception. System.ArgumentException: {s} is not a valid AtIdentifier (Parameter 's') at idunno.AtProto.AtIdentifier.Create(String s) in /_/src/idunno.AtProto/AtIdentifier.cs:line 28 at idunno.AtProto.AtProtoAgent.Login(String identifier, String password, String authFactorToken, Uri service, CancellationToken cancellationToken) in /_/src/idunno.AtProto/Authentication/AtProtoAgent.cs:line 441 at Program.<Main>$(String[] args) in /home/isolyth/Documents/Programming/Projects/Hyperblock/Hyperblock/Program.cs:line 5 at Program.<Main>(String[] args)` ### Expected behavior I expect to be able to get the profile information based on an @handle (DID does not work here, that also gives an error). And I also expect to be able to use my handle to login, as that is what the documentation states. ### Actual behavior See error. ## Helpful Extra information ### What operating system(s) are you using? - [ ] Windows - [ ] macOS - [ ] Ubuntu - [X] Other Linux - [ ] Other (specify below) ### Reproduction code ```c# using idunno.AtProto; using idunno.Bluesky; using BlueskyAgent agent = new(); await agent. Login("@isolyth.dev", "apppassword"); Console.Write(await agent.GetProfile(new Handle("@isolyth.dev"), cancellationToken: new())); ``` Theissue occurs with any handle.
关闭于 2025-09-21 3 条评论