{ "id": "173041", "key": "TIMOB-26849", "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": [], "resolution": null, "resolutiondate": null, "created": "2019-02-22T10:37:31.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "engSchedule" ], "versions": [], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-10-28T18:30:34.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When using the {{appcelerator.https}} module, the app sometimes (very rarely) spits out an error about an invalid type. Here is the code used:\r\n{code:js}\r\n// Set some default options\r\nconst httpOptions = {\r\n onload: event => {\r\n \r\n },\r\n onerror: event => {\r\n \r\n },\r\n timeout: 10 * 1000\r\n};\r\n\r\n// Use security manager for HTTP pinning\r\nif (Alloy.CFG.api.baseURL.startsWith('https://')) {\r\n httpOptions.securityManager = Https.createX509CertificatePinningSecurityManager([ {\r\n url: 'https://*.example.com',\r\n serverCertificate: 'certs/example_com.der'\r\n } ]);\r\n}\r\n\r\nconst httpRequest = Ti.Network.createHTTPClient(httpOptions);\r\n{code}\r\nThe error comes from [here|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiNetworkHTTPClientProxy.m#L40] and suggests that the {{securityManager}} does not conform to the {{SecurityManagerProtocol}} or is not properly initialized at the point of it's assignment to the http-client proxy. Unfortunately the module is closed source so we cannot fix this ourselves. See the screenshot for details.", "attachment": [ { "id": "66179", "filename": "IMG_1120.PNG", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-02-22T10:29:11.000+0000", "size": 537993, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS HTTPS module: Invalid argument passed to securityManager property", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "446920", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel]\r\n I tried using following test case , but unable to reproduce the issue. Can you give me complete reproducible test app?\r\n\r\nAnd what is frequency for this issue?\r\n\r\nThanks!\r\n\r\n{code:java}\r\nvar https = require('appcelerator.https');\r\n\r\nvar win = Titanium.UI.createWindow({\r\n title: 'Pin Example',\r\n backgroundColor: 'white'\r\n});\r\n\r\nwin.open();\r\n\r\nsetInterval(function(){\r\n const httpOptions = {\r\n onload: event => {\r\n \r\n },\r\n onerror: event => {\r\n \r\n },\r\n timeout: 10 * 1000\r\n};\r\n\r\nhttpOptions.securityManager = https.createX509CertificatePinningSecurityManager([ {\r\n url: 'https://www.wellsfargo.com',\r\n serverCertificate: 'wellsfargo.cer'\r\n} ]);\r\n\r\nconst httpRequest = Ti.Network.createHTTPClient(httpOptions);\r\nTi.API.info('http request created');\r\n}, 3000);\r\n{code}\r\n", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-03-15T18:49:37.000+0000", "updated": "2019-03-15T18:49:37.000+0000" }, { "id": "446924", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The frequency is rarely every 50th build, which makes even more critical to reproduce. I think it's some kind of race condition in the delegate assignment but I'm not sure.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-03-15T19:26:36.000+0000", "updated": "2019-03-15T19:26:36.000+0000" }, { "id": "452307", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] - since we have not updated in a while, just checking to see if you still need us to address this.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-10-28T18:28:31.000+0000", "updated": "2019-10-28T18:28:31.000+0000" }, { "id": "452309", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Well, we wait for you guys to fix the issue, there isn't more to update. Please fix this. ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-10-28T18:30:34.000+0000", "updated": "2019-10-28T18:30:34.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }