Skip to content

Troubleshooting

Avvrik edited this page Dec 27, 2018 · 22 revisions

If you receive an error message, then the request could not be successfully processed. Here you can find out more about errors, so that you can prevent them next time. If you have trouble dealing with them, please refer to the log files, create an issue with a "bug" tag or contact us.

Error Handling

In case of an error, the resulting answer will carry an error attribute and the code of an error together with other parameters listed below. When you receive an error code, you can look the error up in the table.

All errors have the following format:

{"id":0,
"error":
{
"code": ..error code number.. ,
"name": ..error name.. ,
"message": ..description.. ,
"trace": 
[{"level":"error","file": ..file name.. ,"line": ..line number.. ,"method": ..name of the function from the source code which carries the error.. ,"timestamp": ..exact time of the error.. },
{"level":"error","file":..file name.. ,"line": ..line number.. ,"method": ..name of the function from the source code which carries the error.. ,"timestamp": ..exact time of the error.. }]
}}

List of errors (exception codes)

KeyChain exceptions

Error code Error name Comment
1 rpc_command_parse_code cannot parse json rpc command
2 command_not_implemented_code command is not implemented
3 command_depreciated_code command is depreciates
4 invalid_arg_exception_code invalid command arguments
5 privkey_not_found_code private key not found by keyname
6 privkey_invalid_unlock_code cannot unlock private key, possible wrong password
7 password_input_error_code error while getting password
8 internal_error_code some unspecified internal error

Internal errors

Error code Error name
10 parse_error_exception_code
11 timeout_exception_code
12 file_not_found_exception_code
13 key_not_found_exception_code
14 bad_cast_exception_code
15 assert_exception_code
16 encryption_error_code
17 null_optional_code
18 overflow_code
19 underflow_code
20 divide_by_zero_code
21 out_of_range_exception_code
22 eof_exception_code

Third party exceptions

Error code Error name Comments
23 unhandled_exception_code for unhandled 3rd party exceptions
24 std_exception_code for std::exceptions (3rd party)

Error example

Parsing error - the command was incorrect.

Field name Type Description Value example
error json object error specifics (see below)
code integer error code number 9
name string error name parse_error_exception_code
message string description of the error starting at the lower level where it occured and showing the higher level Parse Error: invalid index '123' in enum 'keychain_app::command_te' => cannot parse command
trace list of arrays trace of the error, starting from the lower level and moving to the higher levels [{"level":"error","file":"exception.cpp","line":230,"method":"fc_light::throw_bad_enum_cast","timestamp":"2018-12-25T16:38:41"},
{"level":"error","file":"keychain.cpp","line":90,"method":"keychain_app::keychain::operator ()","timestamp":"2018-12-25T16:38:41"}]
{"id":0,
"error":
{
"code":9,
"name":"parse_error_exception_code",
"message":"Parse Error: invalid index '123' in enum 'keychain_app::command_te' => cannot parse command",
"trace":
[{"level":"error","file":"exception.cpp","line":230,"method":"fc_light::throw_bad_enum_cast","timestamp":"2018-12-25T16:38:41"},
{"level":"error","file":"keychain.cpp","line":90,"method":"keychain_app::keychain::operator ()","timestamp":"2018-12-25T16:38:41"}]
}}

Log files

If you are experiencing any trouble working with KeyChain, here you can find locations of the log files:

For macOS and Linux:

/var/keychain/logs

For Windows, log file will be located in the same directory as KeyChain:

./logs

Developer Debug Information

If you need help fixing the bugs, please do not hesitate to contact us:

If you want to report a security issue, include the word "security" in the subject line.

We take security issues very seriously and we'll be looking forward to hearing from you. Still, we hope you enjoy using KeyChain and the integration goes smooth!