{ "id": "131559", "key": "TIMOB-17136", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-13T20:20:05.000+0000", "created": "2014-06-10T20:56:06.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-3.3.0", "regression" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-07-24T20:53:49.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h5. Problem description\r\nUsing the latest TiSDK 3.3.X, Sync Server client is presenting issues when trying to login or sync.\r\nUsing TiSDK 3.2.3.GA works as expected, so is a regression.\r\n\r\nh5. Steps to reproduce\r\nGrab Sample code here: https://github.com/appcelerator/titanium_mobile_tests_internal/tree/master/SyncServer/Sample_CombinedDev2013\r\nModule available in repo: https://github.com/appcelerator-modules/appcelerator.syncserver.client\r\n\r\nNote: the updated sample code comes from the BasicSync sample code included in the module example folder with the following modifications: \r\nIn app.js, change credentials to:\r\n\t\t{code}\r\n\t\tvar credentials = {\r\n\t\t\"user\": \"admin@eagentmobile2013.onmicrosoft.com\",\r\n\t \"password\": \"Combined1\"\r\n\t\t};\t\r\n\t\t{code}\r\nIn syncConfig.js, the following code is used:\r\n\t\t{code}\r\n\t\t{\r\n\t\"connectors\": {\r\n\t\t\"msDynamicsCrm1.0\": {\r\n\t\t\t\"apis\": {\r\n\t\t\t\t\"login\": \"/api/1.0/msDynamicsCrm1.0/login\",\r\n\t\t\t\t\"logout\": \"/api/1.0/msDynamicsCrm1.0/logout\",\r\n\t\t\t\t\"verifysession\": \"/api/1.0/msDynamicsCrm1.0/verifysession\",\r\n\t\t\t\t\"update-details\": \"/api/1.0/msDynamicsCrm1.0/update-details\",\r\n\t\t\t\t\"get-details\": \"/api/1.0/msDynamicsCrm1.0/get-details\"\r\n\t\t\t},\r\n\t\t\t\"appId\": \"combined-dev-2013\",\r\n\t\t\t\"serverAddress\": \"http://e80189ea2413d9bb303c7095fc2bde12af543e0f.dev.ace.appcelerator.com\",\r\n\t\t\t\"databaseName\": \"DBTEST\",\r\n\t\t\t\"retryAttempts\": 1,\r\n\t\t\t\"autoResume\": true,\r\n\t\t\t\"models\": [{\r\n\t\t\t\t\"modelName\": \"contact\",\r\n\t\t\t\t\"idAttribute\": \"contactid\",\r\n\t\t\t\t\"syncOptions\": {\r\n\t\t\t\t\t\"queryName\": \"PowerName\",\r\n\t\t\t\t\t\"queryParameters\": {\r\n\t\t\t\t\t\t\"statecode\": 0\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}]\r\n\t\t}\r\n\t}\r\n}\r\n\t\t{code}\r\n\r\nh6. iOS\r\n1. Build and run on device or simulator\r\n\r\n2. Click on Login\r\nResult: Application Error screen is displayed with \"Invalid type passed to function at appcelerator.syncserver.client\" error message. See \"screenshot_iOS.png\" attached and attached log \"log_iOS_login.txt\".\r\nLooking at the logs it seems that the login process is actually performed successfully. However, an Application Error is shown.\r\n\r\n3. Click on Sync\r\nResult: Application Error screen is displayed with \"Invalid type passed to function at appcelerator.syncserver.client\" error message. See \"screenshot_iOS.png\" attached and attached log \"log_iOS_sync.txt\".\r\nLooking at the logs it seems that the login and sync processes are actually performed successfully. However, an Application Error is shown.\r\n\r\n\r\nh6. Android\r\n5. Build/run on device or on simulator\r\n\r\n6. Click on Login\r\nResult: no error is displayed on screen. However, the logs are displaying a failure authenticating. See attached \"log_Android_login.txt\"\r\nIn particular:\r\n{code}\r\nI/TiAPI ( 1489): Login Progress: {\r\nI/TiAPI ( 1489): \"errorCode\": -15001,\r\nI/TiAPI ( 1489): \"message\": \"Unexpected token \\u001f\",\r\nI/TiAPI ( 1489): \"method\": \"sendRequest\",\r\nI/TiAPI ( 1489): \"state\": \"loginFailed\"\r\nI/TiAPI ( 1489): }\r\n{code}\r\n\r\n7. Click on Sync\r\nResult: no error is displayed on screen. However, the logs are displaying a failure authenticating and syncing. See attached \"log_Android_sync.txt\"\r\nIn particular:\r\n{code}\r\nD/skia ( 1489): --- SkImageDecoder::Factory returned null\r\nW/System.err( 1489): java.lang.NullPointerException\r\nW/System.err( 1489): \tat ti.modules.titanium.network.TiHTTPClient.getResponseHeader(TiHTTPClient.java:772)\r\nW/System.err( 1489): \tat ti.modules.titanium.network.HTTPClientProxy.getResponseHeader(HTTPClientProxy.java:93)\r\nW/System.err( 1489): \tat org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)\r\nW/System.err( 1489): \tat org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69)\r\nW/System.err( 1489): \tat org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1121)\r\nW/System.err( 1489): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\nW/System.err( 1489): \tat android.os.Looper.loop(Looper.java:137)\r\nW/System.err( 1489): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\r\nE/V8Exception( 1489): Exception occurred at appcelerator.syncserver.client:16: Uncaught Error: Java Exception occurred\r\nI/TiAPI ( 1489): Sync Progress: {\r\nI/TiAPI ( 1489): \"errorCode\": -15001,\r\nI/TiAPI ( 1489): \"message\": \"Unexpected token \\u001f\",\r\nI/TiAPI ( 1489): \"method\": \"sendRequest\",\r\nI/TiAPI ( 1489): \"state\": \"loginFailed\"\r\nI/TiAPI ( 1489): }\r\nD/TiAPI ( 1489): : {\"errorCode\":-15001,\"message\":\"Unexpected token \\u001f\",\"method\":\"sendRequest\",\"state\":\"loginFailed\"}\r\nI/TiAPI ( 1489): Sync Progress: {\r\nI/TiAPI ( 1489): \"errorCode\": -15001,\r\nI/TiAPI ( 1489): \"message\": \"Unexpected token \\u001f\",\r\nI/TiAPI ( 1489): \"method\": \"sendRequest\",\r\nI/TiAPI ( 1489): \"state\": \"syncFailed\"\r\nI/TiAPI ( 1489): }\r\n{code}\r\n", "attachment": [ { "id": "49884", "filename": "authentication_error.txt", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-07-18T21:13:06.000+0000", "size": 6663, "mimeType": "text/plain" }, { "id": "48815", "filename": "log_Android_login.txt", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-10T20:56:06.000+0000", "size": 2016, "mimeType": "text/plain" }, { "id": "48816", "filename": "log_Android_sync.txt", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-10T20:56:06.000+0000", "size": 3895, "mimeType": "text/plain" }, { "id": "48817", "filename": "log_iOS_login.txt", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-10T20:56:06.000+0000", "size": 3388, "mimeType": "text/plain" }, { "id": "48818", "filename": "log_iOS_sync.txt", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-10T20:56:06.000+0000", "size": 6088, "mimeType": "text/plain" }, { "id": "48819", "filename": "screenshot_iOS.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-10T20:56:06.000+0000", "size": 53154, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Passing null value to the callback on HTTPClient causes exception to be thrown on iOS ", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDk 3.3.0.v2014060918491\r\nAppcelerator Studio 3.3.0.201406061445\r\nAppcelerator SyncServer Client module version 1.4.0\r\nCLI 3.3.0-rc\r\nAlloy 1.4.0-rc\r\nACS 1.0.14\t", "closedSprints": [ { "id": 121, "state": "closed", "name": "2014 Sprint 12 SDK", "startDate": "2014-06-09T21:51:17.043Z", "endDate": "2014-06-21T00:00:00.000Z", "completeDate": "2014-06-23T16:52:29.621Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "308421", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is most likely a regression introduced with 3.3.0 SDK as just switching the Titanium SDK in tiapp.xml from 3.3.0 to 3.2.3 made the entire flow work.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-11T05:05:40.000+0000", "updated": "2014-06-11T05:05:40.000+0000" }, { "id": "308434", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~penrique], can you please take a look?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-11T09:53:10.000+0000", "updated": "2014-06-11T09:53:10.000+0000" }, { "id": "308496", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fix for iOS issue : https://github.com/appcelerator/titanium_mobile/pull/5791", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-11T18:01:25.000+0000", "updated": "2014-06-11T18:01:25.000+0000" }, { "id": "308572", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-12T00:04:15.000+0000", "updated": "2014-06-12T00:19:10.000+0000" }, { "id": "308952", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_3_X : https://github.com/appcelerator/titanium_mobile/pull/5798", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-13T19:42:38.000+0000", "updated": "2014-06-13T19:42:38.000+0000" }, { "id": "314884", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "After running the above sample app with the sync server module on both iOS and Android, I *do not* see the \"Invalid type\" error for iOS and I *do not* see the NullPointerException on Android. \r\n\r\n*However*, after using different credentials to authenticate (from this ticket and from Jon), I still get authentication failure from the server (see authentication_error.txt).\r\n\r\nTested on:\r\n\r\nAppcelerator Studio, build: 3.3.0.201407111535\r\nSDK build: 3.3.0.GA\r\nCLI: 3.3.0\r\nAlloy: 1.4.0\r\nXcode: 5.1.1\r\nDevices: Nexus 5 (4.4), iphone 5 (7.1)\r\n", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-07-18T21:10:54.000+0000", "updated": "2014-07-18T21:13:22.000+0000" }, { "id": "314940", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~wluu] I see your update here but no change to the ticket status. Since you did not reopen this ticket, did you open another ticket to track your reported issue?", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-19T09:23:13.000+0000", "updated": "2014-07-19T09:23:13.000+0000" }, { "id": "315683", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed now. After getting the correct credentials and server url from Radamantis, I was able to verify that the \"Invalid type\" error for iOS does not appear and the NullPointerException does not appear on Android after properly authenticating.\r\n\r\nTested on: \r\n\r\nAppcelerator Studio, build: 3.3.0.201407111535\r\nSDK build: 3.3.0.GA\r\nCLI: 3.3.0\r\nAlloy: 1.4.0\r\nXcode: 5.1.1\r\nDevices: Nexus 5 (4.4), iphone 5 (7.1.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-07-24T20:53:36.000+0000", "updated": "2014-07-24T20:53:36.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }