Titanium Mobile Developer Kitchen Sink tips

Still working on some of this, but I’ve been spreading comments across the web about having some of these issues resolved, so I guess I better post it and then update the rest later!

my next problem with Titanium so far (I have not even written one line of code and I’ve already spent 4 weeks trying to get it working! well actually that is not true, I wrote a helloworld java app using the VI editor and compiled and ran it before I even installed Titanium, to test my java install…). While Titanium is running I am constantly getting the following display repeated over and over in my terminal window.


*** Unable to locate valid config! Falling back to auto-detection...
*** Unable to locate PAC! Falling back to direct...

Now, I have no idea what any of that means, and before some idiot says “did you follow the directions on the Appcelerator website on preparing for java programming?” I want to tell you exactly what I think of the “directions” and where you can stick them! After following those wonderful directions, I wouldn’t trust the developers at Appcelerator to give me directions on how to use a drinking glass! And I think I’ll leave it at that, because there are kids out there somewhere on the net that might stumble across this post one day…

**** update – I’ve figured this one out, after viewing over 80 web pages with not much more than people complaining about this issue. A PAC is an internet proxy access auto-configuration file! For some idiotic reason Titanium seems to think that every use is connecting to the internet via a proxy server (I think Internet Explorer 5 and 6 were configured this way too!). I have checked my network settings and by default Ubuntu sets up to connect directly to the internet, so no PAC was ever created. there is a big thread on the support forum for this issue, running on Mac OS X 10.4. Just scroll down about 80% of the way (or search for this term “dropbox” it only shows up twice and both times are on the same comment), and you will see they custom made an SDK that disables the network proxy check, no idea if this will work on Ubuntu. Maybe I’ll test it tomorrow, it is only 2 months old… alternately, I am researching creating a “default PAC file” that will resolve this issue! give me another day or two and I should have it added on here.

The best info on this issue so far, if you feel like a good read, else, you can copy the info below or go see where I found it.

sudo vi /etc/proxy.pac
i – starts edit mode in insert
copy and paste the following, this code basically tells your computer “there is no spoon” and get over it!


function FindProxyForURL(url, host) {

// If URL has no dots in host name, send traffic direct.
if (isPlainHostName(host))
return "DIRECT";

// If specific URL needs to bypass proxy, send traffic direct.
if (shExpMatch(url,"*domain.com*") ||
shExpMatch(url,"*vpn.domain.com*"))
return "DIRECT";

// If IP address is internal or hostname resolves to internal IP, send direct.

var resolved_ip = dnsResolve(host);

if (isInNet(resolved_ip, "10.0.0.0", "255.0.0.0") ||
isInNet(resolved_ip, "172.16.0.0", "255.240.0.0") ||
isInNet(resolved_ip, "192.168.0.0", "255.255.0.0") ||
isInNet(resolved_ip, "127.0.0.0", "255.255.255.0"))
return "DIRECT";

// If not on a internal/LAN IP address, send traffic direct.
if (!isInNet(myIpAddress(), "10.10.1.0", "255.255.255.0"))
return "DIRECT";

// All other traffic uses below proxies, in fail-over order.
return "PROXY 192.168.1.1:8080; DIRECT";

}

Now, you may want to change the IP on that last line to match your router (it will make things go faster…) as it will check that IP for a Proxy and if nothing is found it will connect directly. Now I need to figure out how to tell Titanium to use that file…


And on to the next issue I am having, during startup of Titanium I am receiving a number of errors, I’ll list a few word for word incase someone is googling the error message…


** (Titanium Developer:5705): WARNING : Error loading plugin: /usr/lib/enchant/libenchant_myspell.so: undefined symbol: enchant_get_dirs_from_param

** (Titanium Developer:5705): WARNING : Error loading plugin: /usr/lib/enchant/libenchant_ispell.so: undefined symbol: enchant_fopen

and it repeats that 8 times (at least it was 8 times when I checked it just now).

*****solution found.

  1. cd /usr/lib
  2. sudo rm libenchant.so libenchant.so.1
  3. sudo ln -s /usr/lib/libenchant.so.1.6.0 /usr/lib/libenchant.so && sudo ln -s /usr/lib/libenchant.so.1.6.0 /usr/lib/libenchant.so.1
  4. cd /opt/titanium/runtime/linux/1.0.0/
  5. sudo rm libenchant.so.1 && sudo ln -s /usr/lib/libenchant.so.1.6.0 /opt/titanium/runtime/linux/1.0.0/libenchant.so.1

that should fix your libenchant errors.


then this follows right after the libenchant issue…


(Titanium Developer:5705): DEBUG: NP_Initialize (Titanium Developer:2861): DEBUG: NP_Initialize succeeded
(Titanium Developer:5705): DEBUG: NP_Initialize (Titanium Developer:2861): DEBUG: NP_Initialize succeeded
(Titanium Developer:5705): DEBUG: NP_Initialize (Titanium Developer:2861): DEBUG: NP_Initialize succeeded
(Titanium Developer:5705): DEBUG: NP_Initialize (Titanium Developer:2861): DEBUG: NP_Initialize succeeded
** Message: console message: app://com.appcelerator.titanium.developer/js/entourage-jquery-3.0.js @36: TypeError: Result of expression 'C.getElementsByTagName' [undefined] is not a function.

I found a bug posting (click the link to see it) about this, it appears that the number after “Titanium Developer” varies and I do not get the email password error mentioned on that site. This bug is listed as new (marked Jan 6th 2011) and has no comments attached at this time. So I added my own comments to the post.


I found a new error in the trace logs while my AVD was running,
[ERROR] /opt/android-sdk/tools/apkbuilder
[TRACE] THIS TOOL IS DEPRECATED. See –help for more information.

I think it means depreciated… The only way to resolve this one would be for Appcelerator to update their code.


I found another issue while hunting the history of my terminal editor:


[Titanium.Host] [Error] Could not load module (/opt/titanium/modules/linux/python/1.0.0/libpythonmodule.so): "Error loading module (/opt/titanium/modules/linux/python/1.0.0/libpythonmodule.so): libpython2.5.so.1.0: cannot open shared object file: No such file or directory"

I did some digging, and this is most likely caused by a lack of Python2.5, I currently have python2.6. So I created a link from 2.6 to 2.5 so it could find it.

  • cd /usr/lib && sudo ln -s /usr/lib/libpython2.6.so.1.0 /usr/lib/libpython2.5.so.1.0

I have not seen that error since…

About

One thought on “Titanium Mobile Developer Kitchen Sink tips

Leave a Reply

5 visitors online now
1 guests, 4 bots, 0 members
Max visitors today: 10 at 12:16 am UTC
This month: 50 at 07-03-2021 05:35 pm UTC
This year: 237 at 03-24-2021 09:01 pm UTC
All time: 1100 at 08-08-2011 08:11 pm UTC