Uploaded image for project: 'Appcelerator CLI'
  1. Appcelerator CLI
  2. CLI-865

If incorrect credentials are input on login then the CLI will error with 'The registry server is currently unavailable'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 5.1.0
    • Fix Version/s: Release 5.1.0
    • Component/s: Registry
    • Environment:

      Windows 10 Pro, OSX 10.11.1
      Appc Core: 5.1.0-41
      Appc NPM: 4.2.1

    • Severity:
      Blocker
    • Story Points:
      3
    • Sprint:
      2015 Sprint 22 Tooling

      Description

      Description

      This is a regression

      The regression seems to be caused by the change from this check in 5.0.4 to this check in 5_1_X

      When logging in using appc login and inputting incorrect credentials the CLI will error out with the below after retrying the login 10 times

      ? Appcelerator ID: eharris@appcelerator.com
      ? Password: *****
      registry result 500 application/json false undefined true 1
      detected server issue, will re-try again in 1000ms 500
      registry result 500 application/json false undefined true 2
      detected server issue, will re-try again in 2000ms 500
      registry result 500 application/json false undefined true 3
      detected server issue, will re-try again in 3000ms 500
      registry result 500 application/json false undefined true 4
      detected server issue, will re-try again in 4000ms 500
      registry result 500 application/json false undefined true 5
      detected server issue, will re-try again in 5000ms 500
      registry result 500 application/json false undefined true 6
      detected server issue, will re-try again in 6000ms 500
      registry result 500 application/json false undefined true 7
      detected server issue, will re-try again in 7000ms 500
      registry result 500 application/json false undefined true 8
      detected server issue, will re-try again in 8000ms 500
      registry result 500 application/json false undefined true 9
      detected server issue, will re-try again in 9000ms 500
      registry result 500 application/json false undefined true 10
      ERROR  | Error: The registry server is currently unavailable. Please try again in a few minutes or contact Appcelerator Support at support@appcelerator.com
          at C:\Users\ewanh\.appcelerator\install\5.1.0-41\package\lib\registry.js:462:17
          at Request._callback (C:\Users\ewanh\.appcelerator\install\5.1.0-41\package\lib\appc-registry-server-sdk\index.js:989:5)
          at Request.self.callback (C:\Users\ewanh\.appcelerator\install\5.1.0-41\package\node_modules\request\request.js:198:22)
          at Request.emit (events.js:110:17)
          at Request.<anonymous> (C:\Users\ewanh\.appcelerator\install\5.1.0-41\package\node_modules\request\request.js:1082:10)
          at Request.emit (events.js:129:20)
          at IncomingMessage.<anonymous> (C:\Users\ewanh\.appcelerator\install\5.1.0-41\package\node_modules\request\request.js:1009:12)
          at IncomingMessage.emit (events.js:129:20)
          at _stream_readable.js:908:16
          at process._tickCallback (node.js:355:11)
      

      This is a regression from 5.0.4 as the CLI will reprompt when incorrect credentials are input with 5.0.4

      ? Password: ***
      registry result 500 application/json false undefined true 1
      registry returned { message: 'Invalid Appcelerator ID and password combination.',
        code: 400,
        success: false,
        'request-id': '9f2f25ec-cae9-46de-9035-387d8436ecaa' }
      login returned { [Error: Invalid Appcelerator ID and password combination.] code: 400 } { message: 'Invalid Appcelerator ID and password combination.',
        code: 400,
        success: false,
        'request-id': '9f2f25ec-cae9-46de-9035-387d8436ecaa' }
      Invalid Appcelerator ID and password combination.
      Invalid Appcelerator ID and password combination.
      

      Running with DEBUG=* shows that the output received from registry is the same for both versions

      5.0.4

      arrow:sdk sending request to https://software.appcelerator.com/api/login
      arrow:sdk response received err=null, body={ message: 'Invalid Appcelerator ID and password combination.',
        code: 400,
        success: false,
        'request-id': '7a594b36-2dbe-4c0b-b77b-8df4ab6ccbc3' }, status code=500
      registry result 500 application/json false undefined true 1
      registry returned { message: 'Invalid Appcelerator ID and password combination.',
        code: 400,
        success: false,
        'request-id': '7a594b36-2dbe-4c0b-b77b-8df4ab6ccbc3' }
      login returned { [Error: Invalid Appcelerator ID and password combination.] code: 400 } { message: 'Invalid Appcelerator ID and password combination.',
        code: 400,
        success: false,
        'request-id': '7a594b36-2dbe-4c0b-b77b-8df4ab6ccbc3' }
      Invalid Appcelerator ID and password combination.
      Invalid Appcelerator ID and password combination.
      

      5.1.0-41

      ? Appcelerator ID: eharris@appcelerator.com
      ? Password: ****
      arrow:sdk sending request to https://software.appcelerator.com/api/login
      arrow:sdk response received err=null, body={ message: 'Invalid Appcelerator ID and password combination.',
        code: 400,
        success: false,
        'request-id': 'b84fdd47-b63a-44cc-abcb-2008c62a7f7b' }, status code=500
      registry result 500 application/json false undefined true 1
      detected server issue, will re-try again in 1000ms 500
      arrow:sdk sending request to https://software.appcelerator.com/api/login
      arrow:sdk response received err=null, body={ message: 'Invalid Appcelerator ID and password combination.',
        code: 400,
        success: false,
        'request-id': '53473d97-4372-471d-9ec9-93d3adf86341' }, status code=500
      registry result 500 application/json false undefined true 2
      detected server issue, will re-try again in 2000ms 500
      arrow:sdk sending request to https://software.appcelerator.com/api/login
      

      Steps to reproduce

      1. Run appc login -l trace
      2. Enter some incorrect credentials

      Actual result

      The CLI will send a login request 10 times and then error with {{ Error: The registry server is currently unavailable.}}

      Expected result

      The CLI should throw a prompt asking for the correct credentials

        Attachments

          Activity

            People

            • Assignee:
              fmiao Feon Sua Xin Miao
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Praveen Innamuri (Inactive)
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code