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

checkSession endpoint is hit twice when building

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 6.2.3
    • Component/s: Core
    • Labels:
    • Story Points:
      1
    • Sprint:
      2017 Sprint 11 Tooling

      Description

      Description

      When building an application (and other commands that require a user to be logged in) the CLI appears to be hitting the checkSession endpoint twice, once before executing the command and then once again in the command that has been executed.

      2016-09-23T13:10:49.712Z | TRACE  | check if session is invalidated
      2016-09-23T13:10:52.269Z | TRACE  | registry result 200 application/json undefined undefined false undefined
      2016-09-23T13:10:52.279Z | TRACE  | registry returned { expiry: 1475241053030 }
      2016-09-23T13:10:52.279Z | TRACE  | refresh session expiry to:  1475241053030
      2016-09-23T13:10:52.281Z | TRACE  | session expiry 1475241053030 false
      2016-09-23T13:10:52.281Z | TRACE  | Arrow Cloud config file: /Users/eharris/.acs
      2016-09-23T13:10:52.283Z | TRACE  | found Arrow Cloud login { mid: '0c3c5f85cf1a73d7f072e4e38d40219695855086',
        publishPort: 443,
        publishHost: 'https://admin.cloudapp-enterprise-preprod.appctest.com',
        username: 'eharris@appcelerator.com',
        cookie: [ 'connect.sid=s%3A4O8AjS2WTpr0w045gTzgp2Bj.8krzD4V6QTo%2FqpiQiGKp6ebSlrXwpf10eWOC%2B0gYtq8; Path=/; Expires=Fri, 07 Oct 2016 11:22:36 GMT; HttpOnly' ],
        defaultEP:
         { publishHost: 'https://admin.cloudapp-enterprise-preprod.appctest.com',
           publishPort: 443 } } , checking nodeACSEndpoint= https://admin.cloudapp-enterprise-preprod.appctest.com
      2016-09-23T13:10:52.284Z | TRACE  | Arrow Cloud cookie expiry [ 1475839356000 ]
      2016-09-23T13:10:52.284Z | TRACE  | session already loaded in opts.session
      2016-09-23T13:10:52.285Z | TRACE  | getCredentials() session:
      {
        "ipaddress": "10.142.9.89",
        "username": "eharris@appcelerator.com",
        "password": "<OMITTED>",
        "session": "<OMITTED>",
        "nonce": "<OMITTED>",
        "environment": {
          "name": "production",
          "isProduction": true,
          "acsBaseUrl": "https://preprod-api.cloud.appctest.com",
          "acsAuthBaseUrl": "https://dolphin-secure-identity.cloud.appcelerator.com",
          "nodeACSEndpoint": "https://admin.cloudapp-enterprise-preprod.appctest.com"
        },
        "token": "<OMITTED>",
        "fingerprint": "0c3c5f85cf1a73d7f072e4e38d40219695855086",
        "fingerprint_description": "Mac OSX Serial Number: C02S40W9G8WP",
        "org_id": 100001710,
        "expiry": 1475241053030
      }
      2016-09-23T13:10:52.285Z | TRACE  | loading plugins for command "run"
      2016-09-23T13:10:52.317Z | TRACE  | run search paths:
      [
        "/Users/eharris/.appcelerator/install/5.5.0/package",
        "/Users/eharris/.appcelerator/install/5.5.0/package/node_modules",
        "/Users/eharris/Documents/Appcelerator_Studio_Workspace/ppTAlloy/plugins",
        "/Users/eharris/Documents/Appcelerator_Studio_Workspace/ppTAlloy/node_modules",
        "/Users/eharris/Documents/Appcelerator_Studio_Workspace/node_modules",
        "/Users/eharris/Documents/node_modules",
        "/Users/eharris/node_modules",
        "/Users/node_modules",
        "/node_modules",
        "/Users/eharris/.appcelerator/.npm/lib/node_modules"
      ]
      2016-09-23T13:10:52.318Z | DEBUG  | [PLUGIN-LOAD] 0ms /Users/eharris/.appcelerator/install/5.5.0/package/appc.js
      2016-09-23T13:10:52.528Z | DEBUG  | [PLUGIN-LOAD] 209ms /Users/eharris/.appcelerator/install/5.5.0/package/node_modules/appc-cli-titanium/appc.js
      2016-09-23T13:10:52.528Z | DEBUG  | run plugin: /Users/eharris/.appcelerator/install/5.5.0/package/node_modules/appc-cli-titanium
      2016-09-23T13:10:52.530Z | DEBUG  | [PLUGIN-LOAD] 0ms /Users/eharris/.appcelerator/install/5.5.0/package/node_modules/arrow/appc.js
      2016-09-23T13:10:52.532Z | DEBUG  | run plugin: /Users/eharris/.appcelerator/install/5.5.0/package/node_modules/arrow
      2016-09-23T13:10:52.535Z | TRACE  | plugin "arrow" failed its "when" function check, skipping...
      2016-09-23T13:10:52.536Z | TRACE  | loading plugin "titanium" for command "run" CLI options via function
      2016-09-23T13:10:52.537Z | TRACE  | loading plugin "titanium" for command "run" CLI options via array
      2016-09-23T13:10:52.539Z | TRACE  | executing command "run" with the following plugins:
      ["titanium"]
      2016-09-23T13:10:52.540Z | TRACE  | Attempting to load session info from config file
      2016-09-23T13:10:52.541Z | TRACE  | check if session is invalidated
      2016-09-23T13:10:55.161Z | TRACE  | registry result 200 application/json undefined undefined false undefined
      2016-09-23T13:10:55.161Z | TRACE  | registry returned { expiry: 1475241055924 }
      2016-09-23T13:10:55.161Z | TRACE  | refresh session expiry to:  1475241055924
      2016-09-23T13:10:55.163Z | TRACE  | session expiry 1475241055924 false
      2016-09-23T13:10:55.164Z | TRACE  | session already loaded in opts.session
      

      Steps to reproduce
      1. Run appc -p ios -l trace in a titanium project
      Actual result

      checkSession endpoint is hit twice

      Expected result

      checkSession endpoint only needto be hit once

        Attachments

          Activity

            People

            • Assignee:
              fmiao Feon Sua Xin Miao
              Reporter:
              eharris Ewan Harris
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code