Ttn-lw-cli applications subscribe HANG

When I execute ttn-lw-cli events --gateway_id [whatever]
the cli will (as expected) run until the access token expires and return.

When I’m not authenicated I can just do ttn-lw-cli login to get a new access token.
That all works fine :smiley:

However, when I execute ttn-lw-cli applications subscribe --application-id [whatever]
the cli (unexpectedly) will not return after the access token has expired :frowning:

The symptom I see is that I get the desired application output data while the access token is valid but no clue that the token has expired.
Visually it is as if the device had stopped sending data to the application, but it has been broadcasting fine, as witnessed by the gateway events.

I can use –log.level debug to get an indication of when the token will expire, along the lines of

DEBUG Using access token (valid until 8:06AM)

… but I would expect the ttn-lw-cli to actually terminate at 8:06AM and not just hang!

I feel ths behaviour is inconsistent with ttn-lw-cli events which sympathetically returns when the token expires.

This may be related to topic “Calling ttn-lw-cli from python hangs forever” but in my case I’m just trying to execute the command directly in a Windows 10 cmd shell.

1 Like

Good to know but you’ll need to file this as an issue on GitHub for any resolution.

Or fix it and make a pull request.

Nick @descartes I’ve raised the issue on github

Currently awaiting triage.

1 Like

I would have expected ttn-lw-cli to automatically refresh the token when it is about to expire.