[TIMOB-18197] iOS: 64-bit APM module throws an error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-12-12T23:25:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.5.0 |
Components | iOS |
Labels | qe-3.5.0 |
Reporter | Alan Leard |
Assignee | Jon Alter |
Created | 2014-12-06T19:17:58.000+0000 |
Updated | 2015-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
[~aleard] Can you try module: https://github.com/appcelerator-modules/com.appcelerator.apm/releases/tag/1.1.0
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
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.
Thank you. Does this now remove this as an issue?
[~ingo] Indeed, I think this is a Documentation bug
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.
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
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