debugging flex -  Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

Posted on 2008-06-19
Last Modified: 2013-11-11
newbie to flex/flash

wondering how to properly debug flex applications. when i run my flex app, i get the following error message

Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

i realize this must relate to a resource url, but how am i do determine what line in the code threw this error?
i tried running the app in debug mode, and got the

"Where is the Flash debugger host running?"

message, localhost didnt work.

can someone point me to some resource about learning how to debug flex apps and perhaps help with this issue?
Question by:chrismarx
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
LVL 13

Expert Comment

ID: 21834523
Start with searching for "new URLRequest" in the source and inspect URLs of the resources being loaded. You also can set a breakpoint in the first function that is executed (typically triggered by creationComplete or init event in the Application tag) and step through the app (F6) until you see it throw the exception.

Author Comment

ID: 21856533
 i've got the debugger/developer version of flash installed, and now i no longer see the message about where the flash debugger is. interestingly, i also no longer see my error message, but I haven't changed anything in the app. however, i put a simple trace statement in the init() function in the main.mxml page and i dont even see that in the console. i am running the app by pressing the debug button. what am i missing?
LVL 13

Expert Comment

ID: 21856672
Can you post the relevant parts of the code so your situation can be further clarified? init() is called by the creationComplete event right?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 21856804
im using the cairngorn framework if that makes any difference. it would appear that the init method is being wired up in the application mxml
	frameRate="14" xmlns:windows="*">
		import com.adobe.cairngorm.control.CairngormEventDispatcher;
		import flash.utils.Timer;
		import mx.binding.utils.ChangeWatcher;
		import mx.core.Container;
		import mx.managers.PopUpManager;
private function init() : void {
			//model.debug_win = PopUpManager.createPopUp(this, DebugWindow, false) as DebugWindow;
			model.initModel.initVO.workStreamID = Application.application.parameters.workStreamID;
			model.initModel.initVO.workStreamID = "WS100076";
			// create and dispatch init event
			var event : GetInitEvent = new GetInitEvent();
			currentState = "level0";		

Open in new window


Author Comment

ID: 21857055
 i put in breakpoints in the init() function, and nothing ever happened (execution didnt stop at those points)-
LVL 13

Expert Comment

ID: 21857853
There's absolutely no reason that initialize method is not fired - try an"hello"); - I've had similar issues with the debugger before....

Author Comment

ID: 21858310
and im actually quite sure that the inti method is fired, i mean, the application is loading and working as expected. using results in compilation error. thanks so much for helping with this-
LVL 13

Expert Comment

ID: 21858506
You'd have to import mx.controls.Alert; to use the Alert box ;)

There is another issue that seems to rear it's ugly head on occasion with Flex Builder - the resources sometimes do not get copied to the bin and bin-debug directories. Try manually copying over your resources to those locations and see if that fixes it.

Author Comment

ID: 21858558
yeah, that worked i can see the alert, checking the bin thing now-

Author Comment

ID: 21858672
do i need to enable to console or something to see the messages? the bin folder has the images and styles folder, along with the main.swf, main-debug.swf, etc.,

i dont have any other flash debugging tools installed. on the console tab is says (on the header section)
<terminated> main[Flex Application] file:/C:/workspace/flex/bin/main-debug.html

LVL 13

Accepted Solution

bglodde earned 500 total points
ID: 21859242
Using Firefox 3? If so, take a look at this

If so - switch your debugging browser to something else and see if you get trace again. Last time mine did this, I switched it out to Safari (on XP) and things came back to life.

To change the browser, go to Window > Preferences and type in "browser". Then add and/or switch.

Author Closing Comment

ID: 31469020
thank you!!
yes, i am using firefox 3, when im using a product for some time, i would know to check for these kinds of things, but being new to flex, i couldnt imagine that was the problem. thank you!!
LVL 13

Expert Comment

ID: 21859472
Glad we could solve it - happy Flexing

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question