Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12895] iOS: Unable to load any native module with SDK 3.0.2

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-04-11T19:17:12.000+0000
Affected Version/sRelease 3.2.2
Fix Version/sRelease 3.1.0, 2013 Sprint 06 JS, 2013 Sprint 06
ComponentsiOS
Labelsalloy, module, module_module, problem, qe-testadded, regression, sdk, titanium
ReporterCarter Lathrop
AssigneeChris Barber
Created2013-02-27T19:17:29.000+0000
Updated2014-10-06T19:42:14.000+0000

Description

Issue seen in Alloy:

When using the SDK 3.0.2 the app can´t load any native modules. It shows the message: "Couldn't find module: xxxxxx". The module is in the modules folder inside the app folder. If we simply change the SDK version in the tiapp.xml to 3.0.0 it works flawlessly. I notice that the 3.0.0 SDK shows the message "Detected third-party native iOS module: xxxxx version x.x.x" in the build time but the 3.0.2 doesn't. *Steps to reproduce:* 1 - Create a new Titanium Alloy Project using SDK 3.0.2; 2 - Install a module (past it in the folder app/modules or use the assistant in the menu Titanium Studio -> Install module); 3 - Add the module to the tiapp.xml; 4 - Require the module in alloy.js using the require statement; *Expected result:* The module is loaded without problems. *Actual result:* The module fails to load and the massage "Couldn't find module: xxxxxx" is shown.

Issue seen in Titanium Mobile:

When using the SDK 3.0.2 the app can´t load any native modules. It shows the message: "Couldn't find module: xxxxxx". The module is in the modules folder inside the app folder. If we simply change the SDK version in the tiapp.xml to 3.0.0 it works flawlessly. I notice that the 3.0.0 SDK shows the message "Detected third-party native iOS module: xxxxx version x.x.x" in the build time but the 3.0.2 doesn't. *Steps to reproduce:* 1 - Create a new Titanium Classic Project using SDK 3.0.2 (not 3.0.0); 2 - Install the ti.storekit module (past it in the folder app/modules or use the assistant in the menu Titanium Studio -> Install module); 3 - Add the module to the tiapp.xml. Paste: <
modules>
<module version="1.6.2">ti.storekit</module>
</modules>
4 - Require the module in app.js using the require statement like the code bellow:

var win = Ti.UI.createWindow({ backgroundColor: 'white' });

var label = Ti.UI.createLabel({});

win.add(label);

win.open();

label.setText("Attempting to require module...");

//The error happens here when using SDK 3.0.2 GA
//If we change the SDK version to 3.0.0 it works without problems
var Storekit = require('ti.storekit');

label.setText("Success!");

*Expected result:* The module is loaded without problems. *Actual result:* The module fails to load and the massage "Couldn't find module: xxxxxx" is shown. Obs: If we change the SDK to 3.0.0 it works without problem. The problem ocur only in SDk 3.0.2

Note: Regression

In 3.0.0GA if platform is not specified, for example:
modules>
<module version="1.6.2">ti.storekit</module>
</modules>
then the module will load without issue. But the same code will break and result in script error if tried in 3.0.2GA. In 3.0.2GA, the platform must be specified:
modules>
<module version="1.6.2" platform="iphone">ti.storekit</module>
</modules>
or a script error will occur.

Attachments

FileDateSize
Trace Logs.txt2014-04-02T11:32:22.000+0000267388

Comments

  1. Carter Lathrop 2013-02-28

    related link from Q&A: http://developer.appcelerator.com/question/148693/problems-with-storekit-and-sdk-302
  2. Tony Lukasavage 2013-02-28

    Carter, the referenced Q&A question states that this is specifically NOT an Alloy app he is working on. Can you move this to TIMOB please?
  3. Carter Lathrop 2013-02-28

    Tony, one of the customers experienced the same problem in Alloy, that's why I posted here. Do you think the root cause is in Ti-Mob though? I'll create a new ticket for that platform and resolve this one for now.
  4. Carter Lathrop 2013-02-28

    Tony, for some reason I do not have permissions to close or resolve tickets in Alloy. If you can, would you mind resolving for now until we can confirm the issue is with Ti-Mob? I am almost done creating the new ticket for them. Thank you.
  5. Tony Lukasavage 2013-02-28

    If any developer has the same issue in a non-Alloy app, then by definition it is not an Alloy-specific problem. That's not to say problems can't exist with native modules in Alloy, but this does not appear to be specific to Alloy. Why don't you just move the ticket? Just go to "More Actions -> Move". That would be MUCH easier and it would encapsulate all discussion to this point which would be lost if you create a new ticket.
  6. Tony Lukasavage 2013-02-28

    I'm going to assign to ingo and move it to TIMOB. A new ticket is not necessary.
  7. Carter Lathrop 2013-02-28

    This seems to be a regression. In 3.0.0GA users are allowed to declare the modules tag without a platform specified. But in 3.0.2GA, if the platform is not specified, the app gives the script error: [ERROR] :  Script Error = Couldn't find module: ti.storekit.
  8. Carter Lathrop 2013-02-28

    related QA post: http://developer.appcelerator.com/question/148693/problems-with-storekit-and-sdk-302#comment-160952
  9. Chris Barber 2013-03-20

    I can't reproduce it. I tested this with two different modules and it worked. I believe the cause was they were using an old version of node-appc.
  10. Chris Barber 2013-03-20

    @Carter, good point. Reopened and fixed it quick. node-appc master pull request: https://github.com/appcelerator/node-appc/pull/39
  11. Carter Lathrop 2013-03-20

    @Chris, Cool so what is the final word on the fix? Have the platform declared always? Thanks for the fix.
  12. Chris Barber 2013-03-20

    @Canter, after the fix, platforms are again optional. :) The cause was a regression introduced back in Jan/Feb timeframe.
  13. Priya Agarwal 2013-07-16

    updated label Closing as fixed. Verified with: Titanium Studio:3.1.2.201307091843 Titanium SDK: 3.1.2.v20130710144553 acs:1.0.3 alloy:1.1.3 npm:1.2.14 titanium:3.1.1 titanium-code-processor:1.0.1 OS: OSX 10.8 Device:iPhone Simulator(v6.0) iphone(v5.1) Xcode: 4.5.1 Able to load native module.
  14. Priya Agarwal 2014-02-26

  15. Chris Barber 2014-04-01

    I just tested this and it works as expected. [~pagarwal] I don't believe your issue is related to this ticket. You probably just need to clean your project and build again. Also, please include the TRACE log output in the future.
  16. Shreya Chowbey 2014-04-02

    I am still facing this issue for the below given environment, Mavericks 10.9.2 Xcode: 5.1 Device: iPod Touch 3 version 7.1 Appcelerator Studio build: 3.2.3.201403271839 SDK: 3.2.3.v20140401134117 Node-ACS: 1.0.14 Alloy: 1.3.1 GA CLI: 3.2.3-alpha2 Code processor: 1.1.1-alpha As per the comment mentioned by Chris Barber I am attaching 'Trace log' file for further reference.
  17. Chris Barber 2014-04-11

    [~schowbey] Yeah, Titanium is working as expected. The problem is you are using ti.storekit 2.0.2 which is too old. That version does not work with Titanium SDK >=3.2. You need to upgrade to 3.0.0 and you'll see that it works. You can get it from here: https://github.com/appcelerator-modules/ti.storekit/raw/stable/ios/ti.storekit-iphone-3.0.0.zip. I'm resolving this as fixed again. Feel free to reopen if ti.storekit 3.0.0 does not work.
  18. Olga Romero 2014-10-06

    Tested using ti.storekit 3.0.0 Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409261245 Titanium SDK, build: 3.4.1.v20141003114920 acs@1.0.18 alloy 1.5.1 install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0 titanium-code-processor@1.1.1 Xcode6.1GM Devices: iPad mini iOS 7.0.3 iPhone 6 iOS iOS 8.1 SDK 3.1.3.GA

JSON Source