*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();
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.
Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
Closing as will not fix.