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

If you use "-o json", then text is returned along with the JSON data

    Details

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

      Appc CLI NPM: 4.2.3-2
      Appc CLI Core: 5.2.0-252
      Node: v4.2.4
      OS: El Capitan (10.11.3)

    • Severity:
      Blocker
    • Story Points:
      1
    • Sprint:
      2016 Sprint 03 Tooling

      Description

      Details: If you use "-o json", then text is returned along with the JSON data.

      Notes:

      • This is a regression from Appc CLI Core 5.1.0.
      • This is affecting Studio from running an Android project; see no_android.png and no_android2.png attachments and see stack trace from Studio:

        !STACK 0
        Unexpected character (A) at position 0.
        	at org.json.simple.parser.Yylex.yylex(Yylex.java:611)
        	at org.json.simple.parser.JSONParser.nextToken(JSONParser.java:270)
        	at org.json.simple.parser.JSONParser.parse(JSONParser.java:119)
        	at org.json.simple.parser.JSONParser.parse(JSONParser.java:82)
        	at org.json.simple.parser.JSONParser.parse(JSONParser.java:76)
        	at com.appcelerator.titanium.android.core.AndroidSDKLocator.loadTiInfo(AndroidSDKLocator.java:841)
        	at com.appcelerator.titanium.android.core.AndroidSDKLocator.updateTiInfo(AndroidSDKLocator.java:224)
        	at com.appcelerator.titanium.android.core.AndroidSDKLocator.access$0(AndroidSDKLocator.java:222)
        	at com.appcelerator.titanium.android.core.AndroidSDKLocator$1.run(AndroidSDKLocator.java:242)
        	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
        

      • This is affecting Studio from launching the dashboard:

        !ENTRY com.aptana.core 1 0 2016-02-10 10:56:06.699
        !MESSAGE (Build 4.5.0.201602100601) [INFO] com.aptana.core/debug/shell Running process:
        Process: "/usr/local/bin/appcelerator" "platform" "sso" "https://appc-studio.appcelerator.com/" "--no-colors" "--no-progress-bars" "--no-prompt" "--no-banner" "--prompt-type" "socket-bundle" "--prompt-port" "54616" "--username" "wluu@appcelerator.com" "--password" "**********"
        Working directory: /
        Environment: {ANALYTICS_SOURCE=studio, APTANA_VERSION=4.5.0.1446607552, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.9i7gwlu4vz/Render, HOME=/Users/wluu, JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home, LANG=en_US.UTF-8, LOGNAME=wluu, PATH=/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Applications/android-sdk-macosx/tools:/Applications/android-sdk-macosx/platform-tools:/Applications/VMware Fusion.app/Contents/Library/:/Users/wluu/mongodb-osx-x86_64-2.6.7/bin:/usr/local/mysql-5.6.25-osx10.8-x86_64/bin:/Applications/apache-ant-1.9.6/bin, PWD=/, SHELL=/bin/bash, SHLVL=1, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.azqUFO1GOB/Listeners, STUDIO_NAME=Appcelerator Studio, STUDIO_PRODUCT_ID=com.appcelerator.titanium.rcp.product, STUDIO_VERSION=4.5.0.201602100601, TMPDIR=/var/folders/g9/bw6h6yr11t79h_mw4q1r87pm0000gp/T/, USER=wluu, XPC_FLAGS=0x0, XPC_SERVICE_NAME=0, __CF_USER_TEXT_ENCODING=0x1F6:0x0:0x0}
         
        !ENTRY com.aptana.core 1 0 2016-02-10 10:56:07.556
        !MESSAGE (Build 4.5.0.201602100601) [INFO] com.aptana.core/debug/shell/output Process Output:
        AppC CLI requires appcelerator@4.2.3 or newer.
        To install the latest version: [sudo] npm install appcelerator -g 
         
        https://security-preprod.cloud.appctest.com/auth/8eb4c9fe4f987748ca18c4fd0e3f0a2862ef1482%20XYDL%2F5StdTj1xqmH15lAQao6IXIZ0dSsNHNO0pV1OZ93zYVWOmFeEZqBiJGoRL7AaZF%2BsXQVHXayDpNIUT6gsHRDoPdE8z3yXKoeZ7iafcXDS%2BgYwZcWUihsQnHac52bjXJZLQgwjn4x1Fr7qD20Z5rSNQxT%2FN%2BvsKR8jb4DAFwpKC2I8pSuH7ZXcZupqncNl%2FT2LAWSu%2FWaXZCKcihs%2F7tmMkNOSBI7RduiCalMxE%2Bie9UPwvzwRVfkIvIC1B5G0kfhYxTixWZwIC30VZvPlVFmYHqB0sCeuYpqZrYmyNOLGPMuxGyb5aRL6%2F9RQG%2FgkKKjk7QMqT5aMNbWvL%2BJtjgrj1YggYbR79mtCzR5ZHromtSjRbBER6%2Bp7u3RSTWS9g8b8lwuvLviJZwwIu056hNTjxLIYDudoJ2aA0lPaRxvB2Xh39MN8G3ltWg7h2eYCtoFEWADVrX1RXbjmPY5hX4oPfxaRGYLfLSge6FmqkMNlZ%2F1HWdPXKcgHyA1GMvcObQRswSVGPmFcZQcim5FM9wHaDydgqwr2T8MtfwZqpEE2mNqLPuM%2F7JZC7%2FnzFJn7CDYuk2%2FihQaDfeWfCkMPOi3Eu42LAwwMqHg18xY7fw8fGD3ppE%2FaTizwlXeMoWzeOKWfLXtN3aQgDeKBzga8bzNg1MlQH4XI%2B3Pb2pYlGvsmXanKcdnfpdjkd2QZa%2BskZl42RsJpaRgRzT20iUylI0rfMR89xvCb%2BhYZ4S%2FZSA1U0%2FX4H1p%2BgKRX4zdqq5DAqGY0b7FxA%2B3ndKb9Z8tOQ%3D%3D?redirect=https%3A%2F%2Fappc-studio.appcelerator.com%2F
         
        !ENTRY com.appcelerator.titanium.ui 4 0 2016-02-10 10:56:07.557
        !MESSAGE (Build 4.5.0.201602100601) [ERROR]  no protocol: AppC CLI requires appcelerator@4.2.3 or newer.
        To install the latest version: [sudo] npm install appcelerator -g 
         
        https://security-preprod.cloud.appctest.com/auth/8eb4c9fe4f987748ca18c4fd0e3f0a2862ef1482%20XYDL%2F5StdTj1xqmH15lAQao6IXIZ0dSsNHNO0pV1OZ93zYVWOmFeEZqBiJGoRL7AaZF%2BsXQVHXayDpNIUT6gsHRDoPdE8z3yXKoeZ7iafcXDS%2BgYwZcWUihsQnHac52bjXJZLQgwjn4x1Fr7qD20Z5rSNQxT%2FN%2BvsKR8jb4DAFwpKC2I8pSuH7ZXcZupqncNl%2FT2LAWSu%2FWaXZCKcihs%2F7tmMkNOSBI7RduiCalMxE%2Bie9UPwvzwRVfkIvIC1B5G0kfhYxTixWZwIC30VZvPlVFmYHqB0sCeuYpqZrYmyNOLGPMuxGyb5aRL6%2F9RQG%2FgkKKjk7QMqT5aMNbWvL%2BJtjgrj1YggYbR79mtCzR5ZHromtSjRbBER6%2Bp7u3RSTWS9g8b8lwuvLviJZwwIu056hNTjxLIYDudoJ2aA0lPaRxvB2Xh39MN8G3ltWg7h2eYCtoFEWADVrX1RXbjmPY5hX4oPfxaRGYLfLSge6FmqkMNlZ%2F1HWdPXKcgHyA1GMvcObQRswSVGPmFcZQcim5FM9wHaDydgqwr2T8MtfwZqpEE2mNqLPuM%2F7JZC7%2FnzFJn7CDYuk2%2FihQaDfeWfCkMPOi3Eu42LAwwMqHg18xY7fw8fGD3ppE%2FaTizwlXeMoWzeOKWfLXtN3aQgDeKBzga8bzNg1MlQH4XI%2B3Pb2pYlGvsmXanKcdnfpdjkd2QZa%2BskZl42RsJpaRgRzT20iUylI0rfMR89xvCb%2BhYZ4S%2FZSA1U0%2FX4H1p%2BgKRX4zdqq5DAqGY0b7FxA%2B3ndKb9Z8tOQ%3D%3D.html?redirect=https%3A%2F%2Fappc-studio.appcelerator.com%2F
        !STACK 0
        java.net.MalformedURLException: no protocol: AppC CLI requires appcelerator@4.2.3 or newer.
        To install the latest version: [sudo] npm install appcelerator -g 
         
        https://security-preprod.cloud.appctest.com/auth/8eb4c9fe4f987748ca18c4fd0e3f0a2862ef1482%20XYDL%2F5StdTj1xqmH15lAQao6IXIZ0dSsNHNO0pV1OZ93zYVWOmFeEZqBiJGoRL7AaZF%2BsXQVHXayDpNIUT6gsHRDoPdE8z3yXKoeZ7iafcXDS%2BgYwZcWUihsQnHac52bjXJZLQgwjn4x1Fr7qD20Z5rSNQxT%2FN%2BvsKR8jb4DAFwpKC2I8pSuH7ZXcZupqncNl%2FT2LAWSu%2FWaXZCKcihs%2F7tmMkNOSBI7RduiCalMxE%2Bie9UPwvzwRVfkIvIC1B5G0kfhYxTixWZwIC30VZvPlVFmYHqB0sCeuYpqZrYmyNOLGPMuxGyb5aRL6%2F9RQG%2FgkKKjk7QMqT5aMNbWvL%2BJtjgrj1YggYbR79mtCzR5ZHromtSjRbBER6%2Bp7u3RSTWS9g8b8lwuvLviJZwwIu056hNTjxLIYDudoJ2aA0lPaRxvB2Xh39MN8G3ltWg7h2eYCtoFEWADVrX1RXbjmPY5hX4oPfxaRGYLfLSge6FmqkMNlZ%2F1HWdPXKcgHyA1GMvcObQRswSVGPmFcZQcim5FM9wHaDydgqwr2T8MtfwZqpEE2mNqLPuM%2F7JZC7%2FnzFJn7CDYuk2%2FihQaDfeWfCkMPOi3Eu42LAwwMqHg18xY7fw8fGD3ppE%2FaTizwlXeMoWzeOKWfLXtN3aQgDeKBzga8bzNg1MlQH4XI%2B3Pb2pYlGvsmXanKcdnfpdjkd2QZa%2BskZl42RsJpaRgRzT20iUylI0rfMR89xvCb%2BhYZ4S%2FZSA1U0%2FX4H1p%2BgKRX4zdqq5DAqGY0b7FxA%2B3ndKb9Z8tOQ%3D%3D.html?redirect=https%3A%2F%2Fappc-studio.appcelerator.com%2F
        	at java.net.URL.<init>(URL.java:585)
        	at java.net.URL.<init>(URL.java:482)
        	at java.net.URL.<init>(URL.java:431)
        	at com.appcelerator.titanium.ui.dashboard.DashboardManager$1$1.run(DashboardManager.java:207)
        	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
        	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3994)
        	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3671)
        	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
        	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
        	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
        	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
        	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
        	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
        	at com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:126)
        	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:606)
        	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        

      Steps to reproduce:

      1. Create a Titanium mobile project
      2. In the mobile project, run appc ti project -o json

      Actual: The warning message appears along with the JSON data:

      MonkeyLord:monkeyDroid wluu$ appc ti project -o json
      AppC CLI requires appcelerator@4.2.3 or newer.
      To install the latest version: [sudo] npm install appcelerator -g 
       
      {
      	"deployment-targets": {
      		"android": true,
      		"ipad": true,
      		"iphone": true,
      		"mobileweb": true,
      		"windows": true
      	},
      	"sdk-version": "5.2.0.v20160209210348",
      	"id": "com.appc.droid",
      	"name": "monkeyDroid",
      	"version": "1.0",
      	"publisher": "not specified",
      	"url": "unspecified",
      	"description": "",
      	"copyright": "not specified",
      	"icon": "appicon.png",
      	"analytics": true,
      	"guid": "1e6280d1-e52b-49df-9ccc-624358910215"
      }
      

      Expected: Only JSON data should appear; no warning messages.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fmiao Feon Sua Xin Miao
                Reporter:
                wluu Wilson Luu (Inactive)
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code