How to make Titanium (SDK) work? - titanium

After an update to Titanium SDK 3.5.0 on MacBooks with Yosemite there occur several issues on all my developer machines, which prevents me from working on current projects:
The issues
"ti info" stops due to an exception in longjohn.js (see attached below)
"ti setup" stops with another exception while spawning a childProcess
Titanium Studio doesnt find my iOS SDK, although there is at least iOS SDK 8.1 installed and work perfectly in XCode (further information provided below)
After each start of Titanium Studio there occurs an error dialog stating "An internal error occured during Computing SDK Info, java.lang.NullPointerException", which seems to be related to the Issue under #3, which i mentioned above.
Because of the points mentioned above it is not possible to build any iOS Application with titanium
The installed versions:
node: 0.12.0
npm: 2.5.1
Titanium CLI: 3.4.1.201410281727
Titanium SDK version: 3.5.0.GA
java: 1.8.0_25
OSX: 10.10.2 (Yosemite)
XCode: 6.1.1
iOS SDK: 8.1
The error messages
1. "ti info": (in terminal)
Titanium Command-Line Interface, CLI version 3.4.1, Titanium SDK version 3.5.0.GA
Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
|[ERROR] Failed to run command "info"
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185
throw e;
^
logger.log (/usr/local/lib/node_modules/titanium/lib/logger.js:72:21),target.(anonymous function) [as error] (/usr/local/lib/node_modules/titanium/node_modules/winston/lib/winston/common.js:45:21),CLI.<anonymous> (/usr/local/lib/node_modules/titanium/lib/cli.js:955:17),/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:119:25,Object.<anonymous> (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:24:16),CLI._fireHookCallback (/usr/local/lib/node_modules/titanium/lib/hook.js:269:12),/usr/local/lib/node_modules/titanium/lib/hook.js:248:10,/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:232:13,async.eachSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:130:20)
ha
2. "ti setup" (terminal)
> Where do you want to go? 1
|[ERROR] TypeError: Incorrect value of args option
at normalizeSpawnArguments (child_process.js:952:11)
at exports.spawn (child_process.js:984:38)
at run (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/node-appc/lib/subprocess.js:47:14)
at Object.detect (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/node-appc/lib/jdk.js:71:3)
at async.parallel.jdk (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/titanium-sdk/lib/android.js:71:13)
at /Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/async/lib/async.js:524:25
at /Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/async/lib/async.js:111:13
at Array.forEach (native)
at _each (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/async/lib/async.js:32:24)
at async.each (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/async/lib/async.js:110:9)
3. Titanium Studio doesnt find any iOS SDK:
I already executed:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Then i enter "Titanium Studio -> Preferences -> Studio -> Platforms -> iOS". The setting for iOS SDK Home is empty and shows "Not specified".
But iOS SDK for 8.1 is already installed:
Some important messages from the Titanium Studio Log File:
!MESSAGE An internal error occurred during: "Computing SDK Info...".
!STACK 0
java.lang.NullPointerException
at com.appcelerator.titanium.ui.portal.processor.MobileSDKConfigurationHelper.getVersionInfo(MobileSDKConfigurationHelper.java:133)
at com.appcelerator.titanium.ui.portal.processor.MobileSDKConfigurationProcessor.computeStatus(MobileSDKConfigurationProcessor.java:74)
at com.aptana.configurations.processor.AbstractConfigurationProcessor.getStatus(AbstractConfigurationProcessor.java:154)
at com.appcelerator.titanium.ui.portal.actionController.MobileSDKActionController$1.run(MobileSDKActionController.java:127)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
!MESSAGE An internal error occurred during: "Sending Analytics Ping ...".
!STACK 0
java.lang.NullPointerException
at com.aptana.usage.internal.DefaultAnalyticsEventHandler.getAnalyticsLogger(DefaultAnalyticsEventHandler.java:207)
at com.aptana.usage.internal.DefaultAnalyticsEventHandler.sendEventSync(DefaultAnalyticsEventHandler.java:241)
at com.aptana.usage.internal.DefaultAnalyticsEventHandler$1.run(DefaultAnalyticsEventHandler.java:75)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
!ENTRY com.aptana.core 4 1 2015-02-20 11:37:18.555
!MESSAGE sudo: a password is required
!ENTRY com.appcelerator.titanium.core 4 0 2015-02-20 11:38:17.801
!MESSAGE (Build 3.4.1.201410281727) [ERROR] Unable to locate the CLI executable. Please restart Studio or use Help > Check for Titanium Updates to install Titanium CLI.
(Funny side effect: asking questions like this one in appcelerators developer forum will be rejected immediatly with the message "This data was not accepted because it was flagged as spam." (i tried it out in multiple variations))
What can i do know?

Using the older version of Node (10.33) resolved the issue for me.
I used the node package manager to install "n" which allows you to switch versions (you'll need to run it as sudo):
npm install -g n
Then switch the version, also as sudo:
n 0.10.33

Funny fact: Appcelerator Titanium isn't working with Node 0.12.
To solve all these issues with one step i only needed to switch back from Node 0.12 to Node 0.10.35.

(OS Yosemite)
If anyone else is having this issue, please check permissions to the following folder:
/Users/user.folder/Library/Application Support/Titanium/mobilesdk/osx/
Make sure to apply permissions to all subfolders / files. I had a permissions issue on my machine, after re-installing titanium 2 times, downgrading node to all kinds of different versions, and following all instructions in various stacked overflow threads.

Related

Why does lscm crash with on MacOS

I just installed the RTC command line tools (v 6.0.4) on my Mac (MacOS Sierra 10.12.6) in hopes of using the lscm command to check out files from an RTC repository. But lscm login (and many of the other lscm subcommands) fails with:
Unexpected exception
java.lang.NoClassDefFoundError: com/ibm/team/process/common/advice/IProcessReport
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoginCmd.run(LoginCmd.java:83)
at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:51)
Anyone know what is going on?

IBM MobileFirst Adobe Air Error

I manage to package adobe air app on MobileFirst platform but am unable to install the .air installation file. I'm prompted with this error: Installation Error screenshot
I've tried reinstalling Adobe AIR runtime and currently on the latest version.
When I look at my Mac Console, I see the following error. Did I miss anything during packaging?
Dec 28 11:54:54 Adobe AIR Application Installer[20848]: Got an unexpected fatal error while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="Missing necessary file META-INF/AIR/application.xml" errorID=0]
Dec 28 11:55:01 Adobe AIR Application Installer[20848]: Application Installer end with exit code 7
Dec 28 11:55:01 com.apple.xpc.launchd1 (com.adobe.air.ApplicationInstaller.253928[20848]): Service exited with abnormal code: 7
You did not mention your version number of MobileFirst Platform...
However note that Adobe AIR is a deprecated environment scheduled to be removed in a future release. I would re-consider using it.
From the error you have received you'll need to open a PMR so that it could be investigated by the development team.

An internal error occurred during: “Computing SDK Info…” When Starting Titanium Studio

Since upgrading TitaniumStudio, I am getting a java error when starting the TitaniumStudio application. Full error message is:
An internal error occurred during: "Computing SDK Info...".
java.lang.NullPointerException
When I try to create a new project, I get
Unable to locate the CLI executable. Please restart Studio or use Help > Check for Titanium Updates to install Titanium CLI.
I have no idea how to bypass this error. I tried installing and reinstalling the application, installing and reinstalling CLI via command line with no luck.
I am running osx with Yosemite.
Titanium 3.4.1
Node v0.10.33
npm 1.4.28
Any suggestion on where else to look in order to solve this error?
Thanks
I had the same problem. I switched from using node 0.12 to 0.10.13. Here are the two commands:
npm install -g n
n 0.10.13
then restart titanium studio
I know I'm answering this 3 months after the question was asked, but the solution provided by #turtle above didn't work for me.
I was getting the exact same error with a brand new install of Titanium (SDK 3.5) on OS X 10.10.2 and the latest version (0.12) of Node already installed. This happened on 3 separate Macs. I compared with a 4th Mac that already had Titanium installed and found out that reverting Node from 0.12 to 0.10.13 made the error go away, solved the problem on all 3 Macs!
Do a complete reinstall of titanium studio git and noe.It will solve your problem.

Titanium [ERROR] Application Installer abnormal process termination

I am trying to run default example apps in titanium studio, but I am getting error.
I installed jdk1.6.0_45, jre1.6.0 and set the properties of Environment Variables too.
what was the problem, any suggetions?
[ERROR] Application Installer abnormal process termination. Process exit value was 1
Have you installed all required Android SDKs? If you are using latest Titanium SDK, you need to install Android SDK 2.3.3 (API 10). Check more details in Installing the Android SDK guid in Titanium documentation.
If this won't help set console log level to trace and update question with full error log.
For Windows, the 32-bit version of Java JDK is required regardless of whether Titanium is running on a 32-bit or 64-bit system.
http://docs.appcelerator.com/titanium/latest/#!/guide/Quick_Start

Facing 'Unable to locate the CLI executable' on Windows

I just installed Titanium and I'm not really familiar with this IDE. I added Android SDK to start my first application and everything looks cool until I tried to see my application in Android Emulator. I'm getting Unable to locate the CLI executable. Please restart Studio or use Help > Check for Titanium Updates to install Titanium CLI. and Check for Titanium Updates Says No Titanium updates available. and restarting the studio multiple times didn't work too. I cannot even preview my application in web browser. What am I doing wrong?
I'm using Titanium Studio, build: 3.1.0.201304151600 on Windows Server 2008 R2 Everything is up to date Node.js, Android SDKs, etc. I'm trying to create a web-based application frt Android 2.2+ and mobile web.
Farid,
There are several things you can try.
1.Type titanium in your command line and hit enter.If it gives 'not recognised as an internal or external command',it means Titanium package is not properly installed.
2.Try uninstalling just the Titanium node.js package using npm titanium uninstall command.
3.Once uninstalled,open Titanium studio.It will prompt you for installing Titanium CLI.Follow the steps and install Titanium CLI.
4.If these steps do not work,then uninstall node and install everything from the studio itself,rather than from the command line.
Sometimes installing Titanium CLI from command line fails.
EDIT:Before you try all this type node in your command prompt and see if node command is being recognised.If it is not you will have to set it to the PATH variable.
Thanks to 'Mukund Samant' with useful workarounds, I managed to fix this problem [although I faced another problem] by removing node.js and installing an older version (0.8.22) and then installing node.acs package manually by runnig this command: npm -g install acs. Now Titanium won't give me any errors or update messages on startup.
Note that I found out I have to run Titanium Studio as Administrator!