Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Problems with Installation/Running Titanium Developer App behind corporate proxy

Hello Titanium Developers,

I am encountering several problems installing and running Titanium behind a corporate proxy.

I applied this fix I found somewhere online to enable authentification in "offline" state:

// index.js, around line 930
// if offline, don't attempt
    /*if (Titanium.Network.online == false)
    {
        $('#tiui_cloud_on').css('display','none');
        $('#tiui_cloud_off').css('display','inline');
        if (typeof(fCallback) == 'function')
        {
            fCallback({offline:true});
        }
        return;
    }*/

Error log

When I try to authenticate I get these error messages in my bash shell:

[09:59:37:869] [Titanium.Network.HTTPClient] [Debug] Changing readyState from 0 to 1 for url:https://api.appcelerator.net/p/v1/sso-login
[09:59:37:869] [Titanium.Proxy] [Debug] Looking up proxy information for: https://api.appcelerator.net/p/v1/sso-login
[09:59:37:869] [Titanium.Proxy] [Debug] Checking whether https://api.appcelerator.net/p/v1/sso-login should be bypassed.
[09:59:37:869] [Titanium.Proxy] [Debug] bypass entry: scheme='' host='.local' port='0'
[09:59:37:869] [Titanium.Proxy] [Debug] bypass entry: scheme='' host='169.254/16' port='0'
[09:59:37:869] [Titanium.Proxy] [Debug] No bypass
[09:59:37:871] [Titanium.Proxy] [Debug] Got proxy from dictionary: https://<REMOVED>:8080
[09:59:37:871] [Titanium.Proxy] [Debug] Using proxy: https://<REMOVED>:8080
[09:59:37:889] [Titanium.Network.HTTPClient] [Error] Failed for URL (https://api.appcelerator.net/p/v1/sso-login): Failure when receiving data from the peer
[09:59:37:889] [Titanium.Network.HTTPClient] [Debug] Changing readyState from 1 to 4 for url:https://api.appcelerator.net/p/v1/sso-login

Prior to that I exported http_proxy and https_proxy with these commands:

export https_proxy=https://user:pass@ip:8080
export http_proxy=http://user:pass@ip:8080

In my network settings I am using a .pac configuration file with the same proxy ip and port. When I try to resolve the authentification request in Firefox / Safari - it works.

I am using Mac OS X Snow Leopard 10.6.4, with Titanium 1.2.1. I am running Titanium Developer as user w/o admin rights.

Any ideas how I could debug / solve this issue?

— asked August 13th 2010 by Robert R
  • failed
  • for
  • install
  • installation
  • problems
  • proxy
  • url
1 Comment
  • Some additional information:

    Log from Titanium Developer app:

    [12:02:56:430] [Titanium.Network.HTTPClient] [Error] Failed for URL (https://api.appcelerator.net/p/v1/app-track): Failure when receiving data from the peer
    

    But:

    curl https://api.appcelerator.net/p/v1/app-track
    {"success":false,"message":"invalid request parameters"}
    

    works…

    — commented August 13th 2010 by Robert R

6 Answers

  • Same HERE !
    Impossible to use Titanium in my corporation ! Big Issue

    I use
    Ubuntu 10.10 x64bits
    Titanium 1.2.2 for Linux 64bits

    AND :

    export https_proxy=https://user:pass@ip:8080
    export http_proxy=http://user:pass@ip:8080

    are set (without user because the proxy is without authentification)

    — answered January 25th 2011 by No Morgan
    permalink
    0 Comments
  • I have admin rights on my MBP OSX 10.6.6. I had success configuring the proxy settings in the System Preferences -> Network -> Advanced page. Perhaps you can find an admin that could do the same for you?

    — answered January 25th 2011 by Robert R Radina
    permalink
    0 Comments
  • same problem here!
    I'v already configured the proxy on sys.prefs->networks->.. Eclipse runs fine but Titanium fail.
    Impossible to use it.

    Could someone on appcelerator fix that?

    — answered February 3rd 2011 by Luciano Bustos
    permalink
    1 Comment
    • Luciano - if you have an issue, please open a question and explain it properly. See Participating in the Q&A for help with this.

      — commented February 3rd 2011 by Paul Dowsett
  • Bobby

    If you modify the source code, you may experience unexpected results and make your environment impossible to troubleshoot.

    Regarding your issue, note that shell variables are case-sensitive, and hence should be HTTP_PROXY and HTTPS_PROXY not http_proxy and https_proxy. You can test this yourself using an arbitrary variable:

    MYVAR="hello"
    echo $MYVAR
    echo $myvar
    

    [$MYVAR returns the string, whereas $myvar is empty]

    Hence, for authenticated proxies, use:

    export HTTP_PROXY: http://username:password@proxyhost:proxyport
    export HTTPS_PROXY: http://username:password@proxyhost:proxyport
    

    For unauthenticated proxies, use:

    export HTTP_PROXY: http://proxyhost:proxyport
    export HTTPS_PROXY: http://proxyhost:proxyport
    

    Obviously, you can use either the proxy server name or ip address in the proxyhost field.

    Cheers

    — answered February 3rd 2011 by Paul Dowsett
    permalink
    0 Comments
  • This is one of those little features that bug me. Shouldnt the Appcelerator team just add a simple "Work Offline" button? They just got about $10 million in funding, seems like its a 10-minute code change.

    — answered February 3rd 2011 by Josh Lewis
    permalink
    0 Comments
  • It is really long time ago that I initially wrote this question.

    My problem was simply the Titanium Developer App which failed to log in. I solved my problems this way:

    1) I don't use the Titanium Developer App anymore.

    I downloaded the mobile sdk and sdk archives at home with Titanium Developer and installed them on my mac at work. As an alternative you can download the archives (even behind a proxy) through the browser - but first you need to get to know the download location… Which is not trivial.

    Since the Titanium Developer App won't work behind my corporate proxy, I use the command-line tool instead for creating, building and launching my applications. You will find more information about the command line tool in the Module Programming Guides!

    — answered February 3rd 2011 by Robert R
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.