Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-5428

mender-cli: improve auth error messages

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Sprint:
      MEN Sprint 162
    • Story Points:
      3
    • Backlog:
      yes
    • Days in progress:
      0

      Description

      When mender-cli does not have a proper JWT token to the server it will create very confusing error messages.

      For example:

      $ mender-cli terminal --server "https://mender.example.com" c5f90b7c-bb8f-4527-8658-4352ae2500a4
      Configuration file not found. Continuing.
      Connecting to the remote terminal of the device c5f90b7c-bb8f-4527-8658-4352ae2500a4...
      FAILURE: Unable to connect to the device: websocket: bad handshake
      

      Also see the thread here: https://hub.mender.io/t/bad-handshake-with-mender-cli

      We should improve the usability of the "login" feature and features depending on it.

      Acceptance criteria:

      • All mender-cli commands that require a login generate an error if you are not logged in (i.e. authenticated successfully). It suggest running mender-cli login.
      • The --server argument is saved together with the login token. (Now It seems you have to pass --server for every single command now (unless you use hosted), which defeats the usability of login)
      • For the Troubleshoot features requiring instant access to a device, the error message indicates if a device is not connected to the Mender server (similarly to what we have in the UI)

        Attachments

          Activity

            People

            Assignee:
            tranchitella Fabio Tranchitella
            Reporter:
            a10003 Eystein Maloy Stenberg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support