Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26738] iOS: Using punctuation in a featureEvent name throws an error

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-01-18T22:26:32.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sRelease 8.0.0
ComponentsiOS
Labelsregression
ReporterEwan Harris
AssigneeGary Mathews
Created2019-01-16T16:37:01.000+0000
Updated2019-01-22T14:24:12.000+0000

Description

Description

*This works fine on android, and on 7.5.0* When using Ti.Analytics.featureEvent() with names like "app.view", "app:view" (and I assume other types of punctuation I'm seeing the below error.
[ERROR] Script Error {
[ERROR]     column = 28;
[ERROR]     line = 109;
[ERROR]     message = "[<__NSDictionary0 0x60000008c0f0> setValue:forUndefinedKey:]: this class is not key value coding-compliantfor the key eventName.";
[ERROR]     nativeStack = "3   Foundation 0x000000010708dde4 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292\n4   TitaniumKit0x000000010a55a59b -[APSAnalytics sendCustomEvent:withEventType:data:] + 204\n5   TitaniumKit0x000000010a55a27e -[APSAnalytics sendAppFeatureEvent:payload:] + 109\n6   pko-app    0x000000010522065c -[AnalyticsModule featureEvent:] + 908\n7   CoreFoundation  0x000000010b85e03c __invoking___ + 140\n8   CoreFoundation  0x000000010b85b4d5 -[NSInvocation invoke] + 325\n9   TitaniumKit0x000000010a54ddbd -[KrollMethod call:] + 1385\n10  TitaniumKit0x000000010a54ceff __KrollCallAsFunction_block_invoke + 30\n11  TitaniumKit0x000000010a54cd10 KrollCallAsFunction + 496\n12  JavaScriptCore 0x00000001055ef5b3 _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE4callEPNS_9ExecStateE + 515\n13  JavaScriptCore  0x0000000105b7d571 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateEPNS_11InstructionENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 385\n14  JavaScriptCore  0x00000001055bc32f llint_entry + 26803\n15  ???   0x000056bf51072545 0x0 + 95379698165061\n16  JavaScriptCore  0x00000001055bc33d llint_entry + 26817\n17  JavaScriptCore  0x00000001055bc6d0 llint_entry + 27732\n18  JavaScriptCore 0x00000001055bc33d llint_entry + 26817\n19  JavaScriptCore  0x00000001055b58fe vmEntryToJavaScript + 244";
[ERROR]     sourceURL = "file:///Users/eharris/Library/Developer/CoreSimulator/Devices/55E4CDF1-2A89-4EF1-9806-97772F4D56CD/data/Containers/Bundle/Application/B4A31F91-91D7-4A2C-818F-0B237A789E55/pko-app.app/alloy/controllers/attendee/page.js";
[ERROR]     stack = "    at [native code]\n    at Controller(/alloy/controllers/attendee/page.js:109:28)\n    at createController(/alloy.js:339:53)\n    at handleOpenWindow(/alloy/controllers/main.js:62:41)\n    at trigger(/alloy/backbone.js:163:32)\n    at clickRow(/alloy/controllers/attendee/row.js:105:33)";
[ERROR]     toJSON = "<KrollCallback: 0x6000017ee440>";
[ERROR] }

Steps to reproduce

1. Add Ti.Analytics.featureEvent('app.view') to an existing app.js

Actual

Above error gets thrown

Expected

The event name is valid so no error should be thrown

Comments

  1. Gary Mathews 2019-01-17

    master: https://github.com/appcelerator/titanium_mobile/pull/10617
  2. Josh Longton 2019-01-17

    *FR Passsed,* Adding punctiation to a featureEvent no longer throws an error {noformat} iPhone 6 (12.0) Simulator 12.1 Appc NPM: 4.2.13 Appc CLI: 7.0.9 Ti CLI: 5.1.1 Node: 8.12.0 Xcode: 10.1 NPM: 6.50 {noformat}
  3. Abir Mukherjee 2019-01-18

    [~jquick] would you please do the CR for this one? Thanks.
  4. Josh Longton 2019-01-22

    *Closing ticket.* The fix is present in SDK: {noformat} 8.0.0.v20190122040339 {noformat}

JSON Source