Exception: accountId cannot be null
See original GitHub issueDescribe the bug
Getting an exception when trying to get account, see here:
var account = server.Accounts.Account(keyPair).Result;
This used to work and has only just stopped working. I have not updated/changed the version of the dotnet-stellar-sdk or changed the testnet-server.
Screenshots:
See full exception here:
System.ArgumentNullException
HResult=0x80004003
Message=accountId cannot be null
Parameter name: accountId
Source=stellar-dotnetstandard-sdk
StackTrace:
at stellar_dotnet_sdk.responses.Signer…ctor(String accountId, Nullable1 weight) in C:\Users\eric\Documents\GitHub\dotnetcore-stellar-sdk\stellar-dotnet-sdk\responses\AccountResponse.cs:line 147 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor
1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
AccountResponse still has KeyPair property, which at the moment returns back 0 after changes. Maybe remove that property fully or put obsolete, so people can fix their code.
Absolutely, if you want to contribute and make this change I will accept your PR. This project only gets stronger by more community participation. Otherwise, other contributors can pick up this suggestion and commit it.