Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

cleos set contract error message & usage info not update? #6343

Closed
dixia opened this issue Nov 19, 2018 · 2 comments
Closed

cleos set contract error message & usage info not update? #6343

dixia opened this issue Nov 19, 2018 · 2 comments
Assignees

Comments

@dixia
Copy link
Contributor

dixia commented Nov 19, 2018

If you point cleos to a wrong path which beginner does a lot, you will get error messages which does not hint the correct path for them and sometimes confusing.

For example, if you have a folder at path:

/Users/dixia/code/onboarding/inline_action/addressbook

and use the following command:

cleos set contract addressbook ./addressbook addressbook.wasm addressbook.abi

Error 3160009: No wast file found
Error Details:
no wasm file found ./addressbook/addressbook.wasm

Firstly. why it is saying wast file is not found? I thought a wast file is not required or at least user does not have generate themselves?

Also it does not show the absolute path which the cleos is trying to read the contract from. That is difficult for beginner/new adopter to troubleshooting their problems if they use a wrong path or somehow in case of docker the path is not point to correct mapping folder.

Moreover, the usage of cleos set contract actually does not say the contract-dir has to be an absolute path.

contract-dir TEXT The path containing the .wasm and .abi

It can do the job & good developers can figure it out. But this will consume new developers quite some time. Can we add support for relative path or update the usage?

@dixia dixia changed the title error message is not update and does not show correct path cleos set contract error message not update and has some unclear messaging? Nov 19, 2018
@dixia dixia changed the title cleos set contract error message not update and has some unclear messaging? cleos set contract error message & usage info not update? Nov 19, 2018
@conr2d
Copy link
Contributor

conr2d commented Nov 19, 2018

The name of exception wast_file_not_found is changed to wasm_file_not_found, but not merged to master yet. (#6048)

@jgiszczak
Copy link
Contributor

The name of the exception has been corrected and is correct beginning with the v1.5.0 release. The path in the error message now prints the canonical path, making debugging erroneous relative paths easier. This is also available beginning with the v1.5.0 release.

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

No branches or pull requests

4 participants