Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA
Accepted Solution

Bizarre URLLoader Problem

I received an email from a user of my Smug Sync app last week reporting that it was giving him a 404 error when syncing.

He was kind enough to give me his Smug Mug login so that I can debug, and I've narrowed it down to getting a 404 error when the first photo is being downloaded.

The app is written using Adobe AIR.

The super bizarre thing is that if I go to the URL of the photo in my web browser, it loads fine, but if I do:

 

urlRequest.method = URLRequestMethod.GET;
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;	
urlLoader.addEventListener(Event.COMPLETE, getPhotoComplete);	
urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioError);
urlLoader.load(urlRequest);

 

... then getPhotoComplete is never called, and both httpStatusHandler and ioError get called due to the HTTP 404 error.

Even stranger is that httpStatusHandler is also getting called with status code 200, which doesn't make any sense to me.

I've puzzled over the problem for well over an hour, done Google searches, etc, but haven't made any progress.

Weird, and bleh.

 

The URL is:

 

http://www.djkennedy.com/Rail-Photos/Black-and-White/Image6b/642682577_9qRro-X2.jpg

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Bizarre URLLoader Problem

When I go to that address, I get address not found. (Opera browser). So the code is OK.
Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Bizarre URLLoader Problem

Weird, now it's coming back 404 for me too. So perhaps it's login/cookie related or something. hmmm.