Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using --verbose with kamus-cli: [TypeError: Cannot convert undefined or null to object] #131

Closed
itsvikasgupta opened this issue Mar 27, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@itsvikasgupta
Copy link
Contributor

Getting an error using --verbose with kamus-cli:

$ kamus-cli  encrypt --verbose --secret mysecret --service-account default --namespace kube-system --kamus-url http://localhost:8080
/usr/local/lib/node_modules/@soluto-asurion/kamus-cli/node_modules/caporal/lib/program.js:179
    Object.keys(logger.transports).forEach(t => logger.transports[t].level = level)
           ^

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Program._changeLogLevel (/usr/local/lib/node_modules/@soluto-asurion/kamus-cli/node_modules/caporal/lib/program.js:179:12)
    at Program._run (/usr/local/lib/node_modules/@soluto-asurion/kamus-cli/node_modules/caporal/lib/program.js:159:12)
    at Program.parse (/usr/local/lib/node_modules/@soluto-asurion/kamus-cli/node_modules/caporal/lib/program.js:276:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/@soluto-asurion/kamus-cli/lib/index.js:39:6)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:862:12)
    at internal/main/run_main_module.js:21:11

However, if I don't use --verbose, the error is different:

[info  kamus-cli]: Encryption started...
[info  kamus-cli]: service account: default
[info  kamus-cli]: namespace: kube-system
[warn  kamus-cli]: Auth options were not provided, will try to encrypt without authentication to kamus
Handling connection for 8080
[error kamus-cli]: Error while trying to encrypt with kamus: Encrypt request failed due to unexpected error. Status code: 400
@omerlh
Copy link
Contributor

omerlh commented Mar 27, 2019

Thanks for reporting this issue! Will take a look :)

@omerlh omerlh added the bug Something isn't working label Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants