Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27797] Android: Unable to see "error" event in remote images

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2020-07-30T19:35:30.000+0000
Affected Version/sRelease 8.3.0, Release 9.0.0
Fix Version/sRelease 9.1.0
ComponentsAndroid
Labelsn/a
ReporterSamir Mohammed
AssigneeGary Mathews
Created2020-03-10T15:35:20.000+0000
Updated2020-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:*

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----------

Comments

  1. Gary Mathews 2020-03-26

    master: https://github.com/appcelerator/titanium_mobile/pull/11575
  2. Samir Mohammed 2020-04-24

    FR Passed, waiting on Jenkins build.
  3. Christopher Williams 2020-04-28

    merged to master for 9.1.0 target
  4. Satyam Sekhri 2020-07-30

    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

JSON Source