{ "id": "164513", "key": "TIMOB-24146", "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": "18433", "name": "https 2.0.2", "archived": false, "released": true, "releaseDate": "2017-02-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-11-14T23:31:03.000+0000", "created": "2016-11-13T23:24:23.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "https", "ios" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:49:12.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": "I'm not being able to use the latest HTTPS module in a project with SDK 6+.\r\nWhen executing the following code:\r\n\r\n{code:java}\r\nvar securityManager = https.createX509CertificatePinningSecurityManager([\r\n {\r\n url: \"https://whatever.com\",\r\n serverCertificate: \"blablabla.der\"\r\n },\r\n {\r\n url: \"https://whatever2.com\",\r\n serverCertificate: \"blablabla2.der\"\r\n }\r\n]);\r\n{code}\r\n\r\nI get the following error:\r\n\r\n{code:java}\r\n[ERROR] Script Error -[AppceleratorHttpsModule jsobject]: unrecognized selector sent to instance 0x7fa0bec0bef0\r\n{code}\r\n\r\nThis is happening with wildcard certificates.\r\nI can't provide my code because I'd be breaking a NDA.\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS - HTTPS module crashes on SDK 6.0.0+", "creator": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "subtasks": [], "reporter": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "environment": "Titanium SDK 6.0.0.RC (6.0.0.v20161101155110)\r\nAppcelerator HTTPs module - 2.0.1", "comment": { "comments": [ { "id": "400871", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Please attach or send at least the full error log to see which method breaks the process. Thx!\n", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-14T07:11:33.000+0000", "updated": "2016-11-14T07:11:33.000+0000" }, { "id": "400893", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, so this issue does only happen when using the 2.0.1 module on 6.0.0, it does not happen on 5.5.1.GA. Do it must be something with the changed require-behavior in 6.0.0. Assigned to [~cwilliams] as he worked on the migration, but I'll take a look at well.\r\n\r\n*EDIT*: It crashes in [this line|https://github.com/appcelerator/titanium_mobile/blob/6_0_X/iphone/Classes/KrollBridge.m#L828].\r\n\r\n*EDIT2*: The difference to other modules like ti.map is that it tries to interprete the module as a JS module ([this code-block|https://github.com/appcelerator/titanium_mobile/blob/6_0_X/iphone/Classes/KrollBridge.m#L811-L813] should return already).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-14T10:50:56.000+0000", "updated": "2016-11-14T11:35:39.000+0000" }, { "id": "400894", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Yep. I'll be using 5.5.1.GA in the meanwhile.\r\nThanks Hans.\r\n", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-11-14T10:52:25.000+0000", "updated": "2016-11-14T10:52:25.000+0000" }, { "id": "400898", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, fixed it. The problem was that we hardcoded the module assets that are usually generated by the compiler. Probably the initial author commited his local file back in the days. I'm still not sure how it could work in Titanium 5.5.x, but the problem was that we check if the JS module based on having module assets (= JS code = NSData) or not. So it returned a false positive and crashed when the SDK tried to evaluate the JS context ({{jsobject}} call). \r\n\r\nPR (appcelerator.https/master): https://github.com/appcelerator-modules/appcelerator.https/pull/42\r\n\r\nTest-Case:\r\n{code:javascript}\r\nvar https = require('appcelerator.https'); // This already crashed with the above error\r\n{code}\r\n\r\nAlso updated the Github release-page and will ping Patrick to update the version in our dashboard.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-14T12:12:49.000+0000", "updated": "2016-11-14T12:12:49.000+0000" }, { "id": "440065", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:12.000+0000", "updated": "2018-08-06T17:49:12.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }