Skip to content

Instantly share code, notes, and snippets.

@MotiurRahman
Last active April 29, 2016 11:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MotiurRahman/10104348 to your computer and use it in GitHub Desktop.
Save MotiurRahman/10104348 to your computer and use it in GitHub Desktop.
How to solve when Titanium Studio: "login server returned an error" when logging in
Trouble Logging in
1.Try the login command below on the command line:
"curl -v -d "un=XXXX&pw=YYYY" https://api.appcelerator.net/p/v1/sso-login"
(replacing XXXX and YYYY with your username or email and password.
2.If the above command returns success, try to run Studio from the command line and then log in.
Check the generated exception log on the command line.
From Mac: open a terminal and run "<install_dir>/TitaniumStudio.app/Contents/MacOS/TitaniumStudio"
(by default, the installation directory is "/Applications/Titanium Studio")
From Windows: open a command prompt and run "<install_dir>\TitaniumStudio.exe -consoleLog"
(by default, the installation directory is "C:\Users\<username>\AppData\Local\Titanium Studio")
From Linux: open a terminal and run "<install_dir>/TitaniumStudio"
If the exception generated is javax.net.ssl.SSLHandshakeException or SSLPeerUnverifiedException,
it means that the required certificate is not added to Java's certificates store. You could use
the following command to download and import the necessary certificate:
"openssl s_client -showcerts -connect api.appcelerator.net:443 </dev/null 2>/dev/null|openssl x509 -outform PEM >mycertfile.pem"
"sudo keytool -import -keystore /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/cacerts -alias my_cert -file mycertfile.pem"
The first command downloads the server certificate, and the second command imports it to system Java's cacerts store.
Note: For Windows, there will be no "sudo". Also for Linux, the Java cacerts path will be different.
One common place is /etc/ssl/certs/java/cacerts.
@bartlettpsj
Copy link

I have tried this and unfortunately Titanium still cannot logon. I suspect Appcelerator are trying to block us using Titanium and force us down the paid product? The first command only returns *.appcelerator.com and titanium is trying to connect to api.appcelerator.net:

Server certificate
subject=/OU=Domain Control Validated/CN=*.appcelerator.com
issuer=/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2

@luisestudioalfa
Copy link

Have you found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment