-
Notifications
You must be signed in to change notification settings - Fork 331
Description
Summary
Getting the title error while trying to login using command:
ttn-lw-cli login --api-key $TTS_DEFAULT_CLI_API_KEY
This looks like new bug in release 3.34.1, because I get no error while using 3.33.0 version.
I use TTS as docker contenerized and locally deployed LoRaWAN network.
I follow every step of tutorial: https://www.thethingsindustries.com/docs/enterprise/docker/running-the-stack/
To additional automization I create CLI API key using:
docker compose run --rm stack is-db create-user-api-key ,
then I use that key to login, create default application, application API key etc.
Steps to Reproduce
- docker compose pull
- docker compose run --rm stack is-db migrate
- docker compose run --rm stack is-db create-admin-user
--id admin
--email [email protected] - docker compose run --rm stack is-db create-oauth-client
--id cli
--name "Command Line Interface"
--owner admin
--no-secret
--redirect-uri "local-callback"
--redirect-uri "code" - docker compose run --rm stack is-db create-oauth-client
--id ${ID}
--name "${NAME}"
--owner admin
--secret "${CLIENT_SECRET}"
--redirect-uri "${REDIRECT_URI}"
--redirect-uri "${REDIRECT_PATH}"
--logout-redirect-uri "${LOGOUT_REDIRECT_URI}"
--logout-redirect-uri "${LOGOUT_REDIRECT_PATH}" - docker compose run --rm stack is-db create-user-api-key
--user-id admin
--name "cli default API key" - docker exec stack ttn-lw-cli login
--api-key <cli_default_API_key>
--insecure
Current Result
Login fail, further actions with API KEY cannot be done, cause of the lack of the authentication
Expected Result
Login should succed, then command should be corectly authenticted:
INFO (4.8) Creating default API key for application 'default-app'...
INFO Telemetry is enabled. Check the documentation for more information on what is collected and how to disable it {"documentation_url": "https://www.thethingsindustries.com/docs/reference/telemetry/cli"}
WARN Using insecure connection to OAuth server
WARN Using insecure connection to API
INFO API key ID:
INFO API key value:
Relevant Logs
WARN Using insecure connection to OAuth server
WARN Using insecure connection to API
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x2478750]
goroutine 80 [running]:
go.thethings.network/lorawan-stack/v3/pkg/telemetry/exporter/cli.(*cliTask).Run(0xc000f9cbd0, {0x3255988?, 0xc000f85080?})
/home/runner/work/lorawan-stack/lorawan-stack/pkg/telemetry/exporter/cli/cli.go:171 +0xf0
go.thethings.network/lorawan-stack/v3/cmd/ttn-lw-cli/commands.init.preRun.func239.2({0x3255988, 0xc000f85080})
/home/runner/work/lorawan-stack/lorawan-stack/cmd/ttn-lw-cli/commands/root.go:184 +0xa2
created by go.thethings.network/lorawan-stack/v3/cmd/ttn-lw-cli/commands.init.preRun.func239 in goroutine 1
/home/runner/work/lorawan-stack/lorawan-stack/cmd/ttn-lw-cli/commands/root.go:180 +0x559
URL
No response
Deployment
The Things Stack Open Source (self-hosted)
The Things Stack Version
3.34.1
Client Name and Version
$ ttn-lw-cli version
The Things Network Command-line Interface: ttn-lw-cli
Version: 3.34.1
Build date: 2025-04-28T08:37:25Z
Git commit: e22b9512d
Go version: go1.23.3
OS/Arch: linux/amd64
Other Information
No response
Proposed Fix
No response
Contributing
- I can help by doing more research.
- I can help by implementing a fix after the proposal above is approved.
- I can help by testing the fix before it's released.
Validation
- The fix is tested in a staging environment.
- The fix is documented in The Things Stack Documentation
Code of Conduct
- I agree to follow TTN's Community Code of Conduct.