[TIMOB-27797] Android: Unable to see "error" event in remote images
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-07-30T19:35:30.000+0000 |
Affected Version/s | Release 8.3.0, Release 9.0.0 |
Fix Version/s | Release 9.1.0 |
Components | Android |
Labels | n/a |
Reporter | Samir Mohammed |
Assignee | Gary Mathews |
Created | 2020-03-10T15:35:20.000+0000 |
Updated | 2020-07-30T19:35:30.000+0000 |
Description
Using the test case below the "error" event in remote images is not fired unlike on iOS.
*Test Steps:*
Add the test case below in to the
Create a new Titanium application
Add the test case below in to the app.js
Run the application
*Test Case:*
Ti.UI.setBackgroundColor('#000');
var tabGroup = Ti.UI.createTabGroup();
var win1 = Ti.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
});
var img = Ti.UI.createImageView({
image:'http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg'
});
win1.add(img);
img.addEventListener('error', function(){
Ti.API.info('--------------fired error event----------');
});
tabGroup.addTab(Ti.UI.createTab({
title:'Tab 1',
window:win1
}));
tabGroup.open();
*Actual result*
Following Error is shown
[ERROR] TiDownloadManager: (pool-4-thread-1) [174,616] Failed to download from: http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg
[ERROR] TiDownloadManager: (pool-5-thread-1) [200,816] Failed to download from: http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg
[ERROR] TiDownloadManager: (pool-5-thread-1) [104,920] Failed to download from: http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg
[ERROR] TiDownloadManager: (pool-5-thread-1) [118,1038] Failed to download from: http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg
[ERROR] TiDownloadManager: (pool-5-thread-1) [105,1143] Failed to download from: http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg
[ERROR] TiDownloadManager: (pool-5-thread-1) [103,1246] Failed to download from: http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg
[ERROR] TiDownloadManager: (pool-5-thread-1) [105,1351] Failed to download from: http://files.daddyhunt.com/sites/default/files/imagecache/mangrid-212/photos/z/z/z/277606/Photo_on_2010-09-14_at_13.14_3.jpg
*Expected Result*
Following should be seen in the console
[INFO] --------------fired error event----------
master: https://github.com/appcelerator/titanium_mobile/pull/11575
FR Passed, waiting on Jenkins build.
merged to master for 9.1.0 target
Verified on: Mac OS: 10.15.4 SDK: 9.1.0.v20200727104531 Appc CLI: 8.1.0-master.7 JDK: 11.0.4 Node: 10.17.0 Studio: 6.0.0.202005141803 Device: Pixel3(v10.0) emulator