Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18197] iOS: 64-bit APM module throws an error

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-12-12T23:25:59.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.5.0
ComponentsiOS
Labelsqe-3.5.0
ReporterAlan Leard
AssigneeJon Alter
Created2014-12-06T19:17:58.000+0000
Updated2015-01-07T22:04:40.000+0000

Description

The new APM module compiled for 64 bit seems to be throwing the error below when built with the 3.5.Alpha:
[ERROR] :  Script Error {
[ERROR] :      column = 44;
[ERROR] :      line = 11;
[ERROR] :      nativeLocation = "-[ComAppceleratorApmModule init:] (ComAppceleratorApmModule.m:65)";
[ERROR] :      nativeReason = "expected: String, was: (null)";
[ERROR] :      sourceURL = "file:///Users/aleard/Library/Developer/CoreSimulator/Devices/228D3A95-AE1B-4B41-8F29-8C2B77EF1BC8/data/Containers/Bundle/Application/0F773D55-AA2B-4B9D-93DD-79249A0F01BB/Choreo.app/app.js";
[ERROR] :      stack = "[native code]\nglobal code@file:///Users/aleard/Library/Developer/CoreSimulator/Devices/228D3A95-AE1B-4B41-8F29-8C2B77EF1BC8/data/Containers/Bundle/Application/0F773D55-AA2B-4B9D-93DD-79249A0F01BB/Choreo.app/app.js:11:44";
[ERROR] :  }
To reproduce build an app with the 3.5.Alpha SDK and the 64-bit compiled APM module enabled with services and the following code in the alloy.js file:
// START: APM service code injection
// Require the apm module
Alloy.Globals.apm = undefined;
try {
Alloy.Globals.apm = require("com.appcelerator.apm");
}
catch (e) {
Ti.API.info("com.appcelerator.apm module is not available");
}

// Initialize the module if it is defined
Alloy.Globals.apm && Alloy.Globals.apm.init();
// END: APM code injection

Comments

  1. Ingo Muschenetz 2014-12-08

    [~aleard] Can you try module: https://github.com/appcelerator-modules/com.appcelerator.apm/releases/tag/1.1.0
  2. Marco Cota 2014-12-10

    Customer have reported this same issue with the current GA i have tested and reproduced using SDK 3.4.0 and 3.4.1 with APM module 1.0.10
  3. Marco Cota 2014-12-11

    After yesterday discussion customer and i have verified that assigning a String parameter to the init method prevents the error to happen in the latest GA, in previous versions and according to our documentation this was an optional parameter.
       Alloy.Globals.apm = undefined;
       try {
       	Alloy.Globals.apm = require("com.appcelerator.apm");
       }
       catch (e) {
       	Ti.API.info("com.appcelerator.apm module is not available");
       }
       
       // Initialize the module if it is defined
       Alloy.Globals.apm && Alloy.Globals.apm.init('com.appc.support.testAPM');
       
  4. Ingo Muschenetz 2014-12-11

    Thank you. Does this now remove this as an issue?
  5. Radamantis Torres-Lechuga 2014-12-11

    [~ingo] Indeed, I think this is a Documentation bug
  6. Eric Merriman 2014-12-12

    Hello all, After a bit of research this change to the init method was not expected. Rather than document the new behavior we are recommending that the previous behavior be restored. Moving to TIMOB for consideration for 3.5.0 SDK.
  7. Jon Alter 2014-12-12

    PR: https://github.com/appcelerator-modules/com.appcelerator.apm/pull/11 Built module available here: https://github.com/appcelerator-modules/com.appcelerator.apm/releases/tag/1.1.1
  8. Eric Wieber 2015-01-07

    Verified fixed, using: Titanium SDK 3.5.0.v20150106224118 Studio 3.4.1.201410281743 Xcode 6.1.1 On: iPad mini, iOS 8.1 iPhone 6, iOS 8.2b3 iPhone 4S Sim, iOS 8.1

JSON Source