{ "id": "122163", "key": "TIMOB-15764", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-12-23T19:25:00.000+0000", "created": "2013-11-06T22:14:39.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SupportTeam" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:16:03.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": "h4. Problem Description\r\n\r\nWhen a webview is closed which was filled by using setHTML, it shows errors in the console\r\n\r\nh4. Test case\r\n{code} \r\nwebview = Ti.UI.createWebView();\r\n\tself.add(webview);\r\n\r\n\tself.showArticle = function(html) {\r\n\t\twebview.setHtml(\"

hi

\");\r\n\r\n };\r\n\r\n{code}\r\n\r\nh4. Extra info (error message) \r\n[ERROR] Couldn't determine the proper encoding. Make sure this file: LucepediAPP.app is UTF-8 encoded.\r\n[ERROR] Error loading file: /Users/ncdegroot/Library/Application Support/iPhone Simulator/6.1/Applications/F751D4EE-E3B7-4823-B3F3-F8A76ED38238/LucepediAPP.app. Message was: Error Domain=NSCocoaErrorDomain Code=257 \"The operation couldn’t be completed. (Cocoa error 257.)\" UserInfo=0xae690e0 {NSFilePath=/Users/ncdegroot/Library/Application Support/iPhone Simulator/6.1/Applications/F751D4EE-E3B7-4823-B3F3-F8A76ED38238/LucepediAPP.app, NSUnderlyingError=0xae69140 \"The operation couldn’t be completed. Permission deni\r\n", "attachment": [], "flagged": false, "summary": "IOS Webview using setHTML shows an ERROR 'Couldn't determine the proper encoding.' at closing", "creator": { "name": "ndegroot", "key": "ndegroot", "displayName": "Nico de Groot", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ndegroot", "key": "ndegroot", "displayName": "Nico de Groot", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Titanium 3.1, Macos Mavericks, using iOS 6.1 emulator", "comment": { "comments": [ { "id": "280451", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\nas additional comment, we have seen this bug with other customers' environments. \r\n\r\nBest,\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-21T01:17:59.000+0000", "updated": "2013-11-21T01:17:59.000+0000" }, { "id": "285519", "author": { "name": "ndegroot", "key": "ndegroot", "displayName": "Nico de Groot", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "The error occurs after the first close of the window (back button). After a code review and retesting I discovered the cause. Closing the window prevents reopening the webview error free because the containing window has to be created again. In my case the webview was recreated on reopening, but not the containing window. By moving {code}createWindow(){code} inside the eventlistener that opens the window, the error disappears.\r\n\r\n{code:javascript|title=wrong|borderStyle=solid}\r\nitem_container_window = Ti.UI.createWindow();\r\n...\r\nnewsview.addEventListener('itemSelected', function(e) {\r\n\titem_container_window = Ti.UI.createWindow();\r\n\titemview = new ItemView(\"news\");\r\n\titem_container_window.add(itemview);\r\n\r\n\titemview.showArticle(e.link); \r\n\twin.tab.open(item_container_window);\r\n});\r\n{code}\r\n\r\n{code:javascript|title=right|borderStyle=solid}\r\nnewsview.addEventListener('itemSelected', function(e) {\r\n\titem_container_window = Ti.UI.createWindow();\r\n\titemview = new ItemView(\"news\");\r\n\titem_container_window.add(itemview);\r\n\r\n\titemview.showArticle(e.link); \r\n\twin.tab.open(item_container_window);\r\n});\r\n{code}\r\n\r\nI think this issues can be marked as resolved, programmer error after all.\r\n", "updateAuthor": { "name": "ndegroot", "key": "ndegroot", "displayName": "Nico de Groot", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-12-21T22:22:20.000+0000", "updated": "2013-12-21T22:22:20.000+0000" }, { "id": "285667", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving as invalid based on customer feedback.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-23T19:25:00.000+0000", "updated": "2013-12-23T19:25:00.000+0000" }, { "id": "414977", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:16:03.000+0000", "updated": "2017-03-22T21:16:03.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }