Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7509] 1.8.1 broke some referencing functionality compared to 1.8.0 non-GA

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-02-04T14:22:06.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsregression
ReporterJunaid Younus
AssigneeMarshall Culpepper
Created2012-02-01T15:36:34.000+0000
Updated2017-03-09T23:19:51.000+0000

Description

One of our clients (Jiffy Lube) has this Android project running fine with a custom 1.8.0 version of the SDK (this is the cl build and not the GA of 1.8.0). Now we need to move this app over so that it is compatible with the latest SDK 1.8.1. I changed this from the tiapp.xml file, cleaned and rebuilt the project as well as deleted the existing app from the phone. After that I installed it onto the device and kept getting the following error:
 
Location:
[92, 19] ti:invoker.js

Message:
Uncaught error: Resources/lib/jiffylube.db

Source:
return delegate.apply(invoker._thisObj_, args);
Screenshot uploaded here: http://www.abload.de/img/wp_0007615yrc1.png I realized that this is because it's looking for the jiffylube.db file in the incorrect place. Instead of looking for it in the Resources folder, it was looking for it where the actual .js file was, inside Resources/lib. Anyways, this problem has been bypassed by adjusting the paths in code. The current problem is that it doesn't load anything that uses the database file. I mean, the 'My Garage' tab allows users to create/edit this existing 'car' objects as they desire, which is then saved into the database. However the problem is, the tab doesn't seem to be loading anything anymore, other than the background image. Another thing I noticed is that when I tap the 'use current location' button, it throws an error saying 'Uncaught reference error: ui is not defined'. I think this issue is related to the fact that if I say the following using SDK 1.8.0: Ti.include('data/schema.js'); it actually needs to be changed into: Ti.include('../data/schema.js'); for 1.8.1. What I mean is, to me, it looks like instead of when you simply reference a file, it doesn't look at the parent directory (Resources), instead it looks for the files inside the folder where the current .js file is executed. I hope this makes sense.. Here a simple example, let's say I have a file called 'schema.js' in the following directory 'Resources/data'. I also have a file called 'db.js' in the following directory 'Resources/lib'. Let's say, I'm referencing the schema.js from db.js, I would have to do the following: If I build this project with non-GA 1.8.0, I would have to reference it like this: Ti.include('data/schema.js'); However, if I build this project with 1.8.1, I need to reference it like this: Ti.include('../data/test.js'); Does that make sense what I'm trying to say? I'm not sure if that's supposed to be like that, or maybe if I'm missing something, it looks like it messed up quite a bit the way this app is working now.. Device: HTC Sensation 4G OS: Android 2.3.3 TiSDK: 1.8.1 I asked someone for help from the Android Platform team, they said to create a JIRA ticket and assign it to you. I'm not sure if this ticket is viewable by everyone, so I'm unable to upload the source code. If this ticket is private (i.e. staff members only), then I can attach it, if not, I will have to email it to you. Could you please leave a comment whether to attach the source code or to email instead? I hope you can help me out with this. If there's more info you need about something, please let me know and I will try to provide you it asap. Thank you in advance.

Comments

  1. Junaid Younus 2012-02-01

    It messed up my formatting, hope you can still manage to make sense of this. If not, let me know and I'll try my best to explain it again. Thanks again.
  2. Neeraj Gupta 2012-02-04

    This is the correct behavior and it brings both iOS and Android platforms at a priority. Earlier behavior was a bug and it has been fixed now. This behavior is well documented in APIDoc as well.
  3. Nikolai Derzhak 2012-02-06

    This issue latest notification was not sent due to JIRA mail setting. Fixed now. Please check the issue for latests changes.
  4. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source