{ "id": "152909", "key": "TIMOB-19922", "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": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2016-10-18T23:27:18.000+0000", "created": "2015-11-11T23:53:23.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.1.0" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" }, { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" } ], "issuelinks": [ { "id": "49719", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "130882", "key": "TIMOB-17027", "fields": { "summary": "iOS: The webview reloads on being removed and re-add to a window", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-10-18T23:27:18.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": "*Details:* On iOS, the child WebView is not loaded when readded back to the parent window.\r\n\r\n*Note:* This is *not a regression* as this occurs with the current GA stack.\r\n\r\n*Steps to reproduce:*\r\n# Create a Titanium classic project\r\n# Replace app.js with the following code:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\n\r\nvar webview = Ti.UI.createWebView({\r\n\thtml : '',\r\n\ttop : 0,\r\n\theight : 200\r\n});\r\nwebview.addEventListener('load', function() {\r\n\talert('The webview is loaded!');\r\n});\r\n\r\nvar b = Ti.UI.createButton({\r\n\ttitle : \"remove and add webview\",\r\n\ttop : 210\r\n});\r\nb.addEventListener(\"click\", function() {\r\n\twin.remove(webview);\r\n\twin.add(webview);\r\n});\r\n\r\nvar b2 = Ti.UI.createButton({\r\n\ttitle : \"remove and release and add webview\",\r\n\ttop : 280\r\n});\r\nb2.addEventListener(\"click\", function() {\r\n\twin.remove(webview);\r\n\twebview.reload();\r\n\twin.add(webview);\r\n});\r\n\r\nwin.add(webview);\r\nwin.add(b);\r\nwin.add(b2);\r\n\r\nwin.open(); \r\n{code}\r\n# Install app to device or simulator\r\n# Once app is launched, dismiss the alert dialog\r\n# Press *remove and add webview* or *remove and release and add webview* button\r\n\r\n*Actual:* The child WebView is never loaded (see [^no_load.png]) and in the console, the following logs appear:\r\n{code}\r\n[DEBUG] : Loading: /var/mobile/Containers/Bundle/Application/80E75AAC-B055-4363-8873-7B3AB2F08B4E/monkey17027.app/app.js, Resource: app_js\r\n[DEBUG] : Loading: /var/mobile/Containers/Bundle/Application/80E75AAC-B055-4363-8873-7B3AB2F08B4E/monkey17027.app/_app_props_.json, Resource: _app_props__json\r\n[DEBUG] : Application booted in 135.113001 ms\r\n[DEBUG] : New scheme: { URL: file:///var/mobile/Containers/Bundle/Application/80E75AAC-B055-4363-8873-7B3AB2F08B4E/monkey17027.app/ }\r\n[DEBUG] : CoreAnimation: failed to allocate IOSurface\r\n[TRACE] : Uploaded tiapp metadata with Appcelerator Platform!\r\n[DEBUG] : Cannot load file: /var/mobile/Containers/Bundle/Application/80E75AAC-B055-4363-8873-7B3AB2F08B4E/monkey17027.app. Error message was: Error Domain=NSCocoaErrorDomain Code=257 \"The file ???monkey17027??? couldn???t be opened because you don???t have permission to view it.\" UserInfo={NSFilePath=/var/mobile/Containers/Bundle/Application/80E75AAC-B055-4363-8873-7B3AB2F08B4E/monkey17027.app, NSUnderlyingError=0x146dd90c0 {Error Domain=NSPOSIXErrorDomain Code=13 \"Permission denied\"}}\r\n[DEBUG] : New scheme: { URL: file:///var/mobile/Containers/Bundle/Application/80E75AAC-B055-4363-8873-7B3AB2F08B4E/monkey17027.app/ }\r\n{code}\r\n\r\n*Expected:* The child WebView should be loaded again.", "attachment": [ { "id": "57368", "filename": "no_load.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-11T23:52:30.000+0000", "size": 43601, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Child WebView is not loaded when re-added back to the parent window", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Appcelerator Studio, build: 4.4.0.201511101919\r\nAppc CLI NPM: 4.2.1\r\nAppc CLI Core: 5.0.4, 5.1.0-50\r\nSDK: 5.02.GA, 5.1.0.v20151110202023\r\nNode: v0.12.7, v4.2.2\r\nOS: El Capitan (10.11.1)\r\nXcode: 7.1.1\r\nDevices: iphone 6s (9.1), iphone 6 (8.2), iphone simulator (9.1)", "comment": { "comments": [ { "id": "399288", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~wluu] I cannot reproduce this with 5.5.1.GA and other current versions. Can you revalidate that? Thx!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-18T20:05:36.000+0000", "updated": "2016-10-18T20:05:36.000+0000" }, { "id": "399319", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Yep, cannot reproduce this issue any more on:\r\n\r\nAppc CLI NPM: 4.2.7\r\nAppc CLI Core: 5.5.1\r\nArrow: 1.8.6\r\nSDK: 5.5.1.GA\r\nNode: v4.6.0\r\nOS: Mac OS X (10.12)\r\nXcode: 8.0\r\nDevices: iphone 7 simulator (10), iphone 6s simulator (9.2)\r\n\r\nWill close ticket as cannot reproduce.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-18T23:27:10.000+0000", "updated": "2016-10-18T23:27:10.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }