EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

[txn_test_gen_plugin] got "abi file cannot be found" error when request create_test_accounts api. #9076

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hey:

I'm trying to test eos performance on my computer using txn_test_gen_plugin. I followed the steps listed in https://github.com/EOSIO/eos/tree/master/plugins/txn_test_gen_plugin. And an error happened when I ran

$ curl --data-binary '["eosio", "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]' http://127.0.0.1:8888/v1/txn_test_gen/create_test_accounts

The error message is

{
  "code": 500,
  "message": "Internal Service Error",
  "error": {
    "code": 10,
    "name": "assert_exception",
    "what": "Assert Exception",
    "details": [
      {
        "message": "abi_file.is_open(): abi file cannot be found",
        "file": "tester.cpp",
        "line_number": 54,
        "method": "read_abi"
      }
    ]
  }
}

I think the reason is this line ( txn_test_gen_plugin.cpp:138) can not find the abi of eosio.token.

abi_def currency_abi_def = fc::json::from_string(contracts::eosio_token_abi().data()).as();

But the error still show up after I set up eosio.token contract.

Thank you if you would provide any ideas.

spoonincode commented 4 years ago

Did you build eosio from source, or did you install via a binary? I believe, at the moment, you need to build from source to use this plugin.

ghost commented 4 years ago

Did you build eosio from source, or did you install via a binary? I believe, at the moment, you need to build from source to use this plugin.

I did not build the project since it would take hours, I'll try and feedback then. Thanks a lot !

ghost commented 4 years ago

Did you build eosio from source, or did you install via a binary? I believe, at the moment, you need to build from source to use this plugin.

It works, you saved my day.