Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Create address returns "error", does not create new address (v.2.5.2) #70

Closed
titanomachy opened this issue Dec 20, 2017 · 6 comments
Closed

Comments

@titanomachy
Copy link

Latest wallet (2.5.2) on Debian.
neo> create address returns an "error" string, no address is being created.
neo> create address 1 returns an "error" string, no address is being created.
neo> create address 3 returns an "error" string, no address is being created. Since nothing is being logged for this one, I am not sure what is causing it. Is there a debug mode?

@titanomachy titanomachy changed the title Create address returns "error", does not creat new address (v.2.5.2) Create address returns "error", does not create new address (v.2.5.2) Dec 20, 2017
@metachris
Copy link
Contributor

  • Are you sure you have an open wallet before trying create address?
  • What Debian version are you using.

Tried reproducing it with Debian Stretch, dotnet 2.0 and neo-cli 2.5.2, and it works for me:

# dotnet neo-cli.dll
NEO-CLI Version: 2.5.2.0

neo> create wallet test
password: ***
password: ***
address: AeptyfhH8kGCTupLgUSdee8P9X4VXrP1K9
pubkey: 03c3baa1d9b3dd6a0f088e58167d9f452c6bfadb631e76f371dfc2b50b360f03c3
neo> create address
[1/1]
export addresses to address.txt
neo>

@titanomachy
Copy link
Author

  1. Yes, the wallet is open. I just double checked.
  2. Debian 8.9

I will compile the wallet to a debug-binary and report back. I don't work with .NET, but is there no other way to be able to implement a debug mode? Extended error messages could be helpful too.

@erikzhang
Copy link
Member

You can build a debug client with this:

dotnet publish -c Debug

@titanomachy
Copy link
Author

The error it returned was "error: Specified method is not supported.". The wallet is open and the commands I used were create address and create address 1. Both returned this error.

Could we not have a more explicit error feedback in this wallet? I think it would help me, others, and the developers to decrease the time spend on debugging and answering issues posted here on Github.

Eg. The program is actually explicit enough when I don't have my wallet open and I try to use the "create address" command. It states "Console.WriteLine("You have to open the wallet first.");", but if I check the source code for the OnCreateAddressCommand() method in the MainService class it returns the string "error" when the argument length is longer than 3. Should it not just tell me that I use a too high number and that it should have no more than 3 positions (or better: be lower than 999)?

In my case, for the create address command, the initial "error" did not tell my what went wrong. In the debug mode the error "Specified method is not supported" tells me a little more, but not why exactly it did not support this method, because the "help" function tells me I should use the command that way.

I'll fork the repository and help where I can, but I do not work with .NET or C# so you will have to check the pull request thoroughly.

@erikzhang
Copy link
Member

In v2.5.2, you can't add new addresses to the old db3 format wallet file any more. You can use the new JSON format.

@titanomachy
Copy link
Author

Okay thanks, I'll convert the wallet or transfer to the JSON format.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants