Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14659] MobileWeb: Using HTTPClient to download certain images causes an untrappable error in some browsers

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T18:43:15.000+0000
Affected Version/sRelease 3.1.1, Release 3.2.0
Fix Version/sn/a
ComponentsMobileWeb
LabelsMobileWeb, httpclient
ReporterMorten F. Thomsen
AssigneeChris Barber
Created2013-07-10T06:33:18.000+0000
Updated2018-04-04T23:20:35.000+0000

Description

*Problem* When using HTTPClient to download an imagefile, I get a strange apparaently untrappable error in the Javascript console for SOME image files , and I can't see why some work and others don't. *Browsers* Chrome 27.0.1453.116 - copy.png works, panelC.png causes error Firefox 22.0 - both images work, no error Safari 6.0.5 (8536.30.1) - Both images causes error *Steps to reproduce* 1. Create New Mobile Project, select Classic->Default Project as Project template 2. Use the code below in app.js 3. Create Resources/comics and copy the two files attached into it 4. Run code (with imgfile variable set to 'comics/panelC.png') and review Javascript console - it should look like attached screenshot more or less 5. Run code (with imgfile variable set to 'comics/copy.png') and review Javascript console - it doesn't throw the error with this file. Incidentally, it's not the createImageView that is causing this - If it is removed, the error still occurs. *Test case*
var oxi = {};

var win = Ti.UI.createWindow();

var view = Ti.UI.createView({
	opacity : 1,
	backgroundColor : 'white'
});
win.add(view);
win.open();
var imgfile = 'comics/panelC.png';
var imgLoader = Ti.Network.createHTTPClient({
	onload : function(e) {
		Ti.API.info('image loaded');
		win.add(Ti.UI.createImageView({
			image : imgfile
		}));
	},
	onerror : function(e) {
		Ti.API.info('some error occured');
	}
});

imgLoader.open("GET", imgfile);
imgLoader.send();

Attachments

FileDateSize
copy.png2013-07-10T06:33:18.000+000017021
panelC.png2013-07-10T06:33:18.000+00007597
screenshot_chrome.png2013-07-10T06:33:18.000+000048799
screenshot_safari.png2013-07-10T06:33:18.000+000049570

Comments

  1. Daniel Sefton 2013-07-25

    Tested and confirmed on listed browsers with Ti SDK 3.1.1 GA and 3.2 CI. However, we don't officially support desktop browsers - only mobile. I will move it to TiMob anyway for our engineering team to decide. Thanks.
  2. Lee Morris 2017-06-26

    Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
  3. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source