openziti / ziti-sdk-c

A C-based sdk for delivering secure applications over a Ziti Network
https://docs.openziti.io/docs/reference/developer/sdk/ziti-sdk-c
Apache License 2.0
71 stars 14 forks source link

log erroneously reports identity file not found #450

Closed qrkourier closed 1 year ago

qrkourier commented 2 years ago
[        0.000]   DEBUG ziti-sdk:model_support.c:67 parse_tokens() jsmn_parse() failed: -3                                                               
[        0.000]   ERROR ziti-sdk:ziti.c:226 ziti_init_opts() /home/runner/work/ziti-sdk-c/ziti-sdk-c/library/ziti.c:196 - load_config(options->config, &c
fg) => -13 (Configuration is invalid)                                                                                                                    
[        0.000]    WARN ziti-sdk:zitilib.c:286 load_ziti_ctx() identity file[id.json] not found                                                          

In this case the file id.json was an invalid config file. The contents had been truncated and so it's no surprise it couldn't be loaded. However, the error "not found" mislead me to troubleshoot the existence of the file instead of its contents.

dovholuknf commented 2 years ago

can you provide the command you ran as well, please?

qrkourier commented 2 years ago
import openziti
openziti.load("id.json")
qrkourier commented 2 years ago

via ziti-sdk-py