EOSIO / eos

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

St12out_of_range exception while signing transaction with api #6057

Closed Kognitif closed 5 years ago

Kognitif commented 5 years ago

This is transaction im trying to run.

{
    "expiration": "2018-10-17 19:21:09",
    "ref_block_num": 19891762,
    "ref_block_prefix": 1581009896,
    "context_free_actions": [],
    "max_net_usage_words": 0,
    "max_cpu_usage_ms": 0,
    "delay_sec": 0,
    "actions": {
        "account": "eosio.token",
        "name": "transfer",
        "authorization": {
            "actor": "sender",
            "permission": "active"
        },
        "data": "10326dcb6537198520afe1cb65371985102700000000000003454f53000000000474657374"
    },
    "signatures": []
}

I tried also this

[
    {
        "expiration": "2018-10-19 03:20:04",
        "ref_block_num": 16199345,
        "ref_block_prefix": 3454957377,
        "actions": {
            "account": "eosio.token",
            "name": "transfer",
            "authorization": [
                {
                    "actor": "kognitifhot1",
                    "permission": "active"
                }
            ],
            "data": "10326dcb6537198520afe1cb65371985102700000000000003454f53000000000474657374"
        },
        "signatures": []
    },
    [
        "EOS5JSmsYEotdJQ8stvNi6RVjur9Wqeov9F8wQaXxYnp9yygASebW"
    ],
    ""
]

And this is the error:

object(stdClass)#484 (3) {
  ["code"]=>
  int(500)
  ["message"]=>
  string(22) "Internal Service Error"
  ["error"]=>
  object(stdClass)#485 (4) {
    ["code"]=>
    int(13)
    ["name"]=>
    string(16) "St12out_of_range"
    ["what"]=>
    string(63) "basic_string::at: __n (which is 0) >= this->size() (which is 0)"
    ["details"]=>
    array(0) {
    }
  }
}

I am using jungle testnet and rpc-api

andriantolie commented 5 years ago

Can you provide more details about the api endpoint that you use and your full POST request body?

Kognitif commented 5 years ago

I've figured it out. This is because the timestamp.

When i use timestamp like this 2018-10-17 19:21:09 instead of this 2018-10-17T19:21:09.000, cpp throwing error.

andriantolie commented 5 years ago

Glad to know that you figured out the problem. I'm closing this issue then.