{ "id": "167609", "key": "TIMOB-24695", "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": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-06-28T22:03:46.000+0000", "created": "2017-05-14T11:39:19.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "imageview" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-08-17T01:48: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "when the imageView path that contains multiple '?' symbol it will not get be encoded properly on Android.\r\n\r\nSample Url: \r\n[http://scontent.xx.fbcdn.net.rsz.io/v/t1.0-9/s720x720/17795851_419371511758070_7481565181564022529_n.jpg?oh=7772aea44d2f40fdbd42285ca61d7aac&oe=59771D60?mode=crop&width=333&height=250]\r\n\r\nNotice there is 2 '?' in the url, the second one is encoded to %%3F by android as shown below:\r\n\r\n[http://scontent.xx.fbcdn.net.rsz.io/v/t1.0-9/s720x720/17795851_419371511758070_7481565181564022529_n.jpg?oh=7772aea44d2f40fdbd42285ca61d7aac&oe=59771D60%%3Fmode=crop&width=333&height=250]\r\n\r\nI tried using encodeUri but android still appends a % before the %3F symbol.\r\n\r\nSteps:\r\n1. Run sample code\r\n2. Check image in the browser to verify the URL is valid.\r\n\r\nActual: Image does not appear\r\nExpected: Image must appear\r\n\r\n{code:javascript}\r\nvar window = Titanium.UI.createWindow({\r\n });\r\n \r\nvar imageview = Ti.UI.createImageView({\r\n\timage:'http://scontent.xx.fbcdn.net.rsz.io/v/t1.0-9/s720x720/17795851_419371511758070_7481565181564022529_n.jpg?oh=7772aea44d2f40fdbd42285ca61d7aac&oe=59771D60?mode=crop&width=333&height=250'\r\n})\r\n \r\nwindow.add(imageview);\r\nwindow.open();\r\n{code}\r\n\r\nLogs:\r\n[ERROR] : TiDownloadManager: (pool-3-thread-1) [1302,1302] Exception downloading http://scontent.xx.fbcdn.net.rsz.io/v/t1.0-9/s720x720/17795851_419371511758070_7481565181564022529_n.jpg?oh=7772aea44d2f40fdbd42285ca61d7aac&oe=59771D60%%3Fmode=crop&width=333&height=250\r\n[ERROR] : TiDownloadManager: java.io.FileNotFoundException: http://scontent.xx.fbcdn.net.rsz.io/v/t1.0-9/s720x720/17795851_419371511758070_7481565181564022529_n.jpg?oh=7772aea44d2f40fdbd42285ca61d7aac&oe=59771D60%%3Fmode=crop&width=333&height=250\r\n[ERROR] : TiDownloadManager: \tat com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)\r\n[ERROR] : TiDownloadManager: \tat java.net.URL.openStream(URL.java:470)\r\n[ERROR] : TiDownloadManager: \tat org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:135)\r\n[ERROR] : TiDownloadManager: \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)\r\n[ERROR] : TiDownloadManager: \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)\r\n[ERROR] : TiDownloadManager: \tat java.lang.Thread.run(Thread.java:818)\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: ImageView.image fails when URL contains multiple question marks", "creator": { "name": "mdhuns", "key": "mdhuns", "displayName": "Dan Noa", "active": true, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "mdhuns", "key": "mdhuns", "displayName": "Dan Noa", "active": true, "timeZone": "Asia/Dubai" }, "environment": "Mac OS X: 10.11.6\r\nNode.js: 6.10.0\r\nTitanium SDK: 6.0.4.GA\r\nAndroid: 6.0\r\nDevice: Xiaomi Redmi 3X", "closedSprints": [ { "id": 917, "state": "closed", "name": "2017 Sprint 13 SDK", "startDate": "2017-06-18T16:14:35.902Z", "endDate": "2017-07-02T16:14:00.000Z", "completeDate": "2017-07-06T23:53:22.101Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "419656", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The second URL doesn't even run on normal browsers, it's throwing n 403 error. So probably it's linked to an access token or authorized content, this is no Android issue.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-15T08:04:16.000+0000", "updated": "2017-05-15T08:04:16.000+0000" }, { "id": "419660", "author": { "name": "mdhuns", "key": "mdhuns", "displayName": "Dan Noa", "active": true, "timeZone": "Asia/Dubai" }, "body": "Yes it will not run because it has wrongly been encoded on Android. Same url works perfectly on ios. If you check the sample url i posted, you will see it's a valid one and loads properly in the browser. ", "updateAuthor": { "name": "mdhuns", "key": "mdhuns", "displayName": "Dan Noa", "active": true, "timeZone": "Asia/Dubai" }, "created": "2017-05-15T08:26:00.000+0000", "updated": "2017-05-15T08:26:00.000+0000" }, { "id": "419661", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, it's clear now. So it's not the loading of the URL but the encoding of it. Waiting for support to validate it, but it looks valid for me!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-15T08:35:16.000+0000", "updated": "2017-05-15T08:35:16.000+0000" }, { "id": "419677", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I can verify the issue in Android. The image does not load and there is the error. Tested with SDK 6.0.4.GA and CLI 6.2.0. Tested in Android 6.0.2.device. Working for iOS though. Tested with 10.2 simulator. Moving to engineering. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-05-15T14:34:14.000+0000", "updated": "2017-05-15T14:34:14.000+0000" }, { "id": "420586", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "-master: {{https://github.com/appcelerator/titanium_mobile/pull/9097}}-", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-30T13:28:10.000+0000", "updated": "2017-06-01T10:22:21.000+0000" }, { "id": "423021", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9178", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-28T02:24:15.000+0000", "updated": "2017-06-28T02:24:15.000+0000" }, { "id": "423093", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-28T22:03:46.000+0000", "updated": "2017-06-28T22:03:46.000+0000" }, { "id": "426827", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.0.0.v20170816113226 & 6.2.0.v20170816173122.\r\n\r\nClosing.\r\n\r\nStudio Ver: 4.9.1.201707200100\r\nSDK Ver: 6.2.0.v20170816173122, 7.0.0.v20170816113226\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.9\r\nAppc CLI: 6.2.3\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.9.13\r\nNode Ver: 6.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Pixel --- Android 7.1.1\r\n ⇨ google Nexus 5 --- Android 6.0.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-17T01:48:03.000+0000", "updated": "2017-08-17T01:48:03.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }