flexunit4 test giving "initial content" not found

I have imported a flex-mojo from its pom file. When I try to run a test, I get this error: "Initial content not found".

Looking into the descriptor (in the target folder) that is being used to run the test, I see this in the <content> element:

  <!-- The main SWF or HTML file of the application. Required. -->

                <!-- The title of the main window. Optional. -->
                 <title>FlexUnit Test Runner</title>

However there is no _flexunit.swf file there.

I am using Maia IU-94.539 but the same error was there in 9.0.1 as well.



Please make sure that 'Make before launch' check box is set in FlexUnit run configuration



I definitely have the "Make before Launch" checkbox checked.


Ok, let's try to find where is _flexunit.swf file. When you run flexunit test in IDEA following should be performed (in case of AIR application):
- [module_name]_temp_flexunit_config.xml file generated in project root folder. This file contains <output/> tag that points to the place where _flexunit.swf file should be compiled. It should be target folder.
- compilation is performed using this configuration file, _flexunit.swf file appears. Compiler information is shown in Messages tool window (if there are no errors and no warnings this tool window is closed automatically).
- AIR application descriptor is generated to launch this _flexunit.swf file
- Tests are launched successfully.

So can you find what is wrong on this way in your case?


Alexander, thanks for your time. I am seeing slightly different behavior now so let me cover that in a bit more detail.

I imported my project pom. From the screen shot you can see that it picked the SDK correctly from the pom (compiler- Compilation seems to work but when I run a test (Crl-Shift-F10 when on a FlexUnit 4 test class), I get an error popup-- "Error running SemMainCanvasTest : : not found".

I then changed the SDK to 3.3 AIR (the same version exactly and then I get a different error in my run window:

/Users/manish/Development/Flex/3.3/bin/adl /Users/manish/Adchemy/head6/adchemy-sem/adchemy-sem-webapp/client/target/_adchemy-sem-webapp-client-air-flexunit.xml /Users/manish/Adchemy/head6/adchemy-sem/adchemy-sem-webapp/client/target
Testing started at 10:32 AM ...
invalid application descriptor: descriptor version does not match runtime version
Empty test suite.

Process finished with exit code 7

Looking at the xml file which IDEA is trying to run, I see that, the xml file has this:

<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/1.5.1">

while I suspect that the xmlns should be ".../1.5". (I'm looking at the descriptor template in this version of the AIR SDK).

I've attached a couple of screenshots.

Picture 2.png
Picture 1.png

Deafult AIR version for Flex SDK 3.3 is fixed, thanks. You may use a newer version of Flex SDK as a workaround until 9.0.2 release.

In any case, flexunit should work in case of Flexmojos SDK as well. Do you have this strange popup immediately after click/keypress or later? Is this IDEA's popup or OS' or AIR's? Can you please attach its screenshot or (better) thread dump (Event Dispatch Thread trace) when popup is visible. You may take it using http://www.adaptj.com/main/download



Sorry for the delay in responding. When I just import my pom file, I get this cryptic pop-up when trying to run the test. I've attached the stack trace from adapt-j as well as a screen shot of the pop-up and my flex facet settings.

I appreciate trying to track down the problem. I'm using flexbuilder to write/debug flex code. I can already see vastly superior code navigation and refactoring in Idea and if I could run tests and debug my AIR application, I'd be thrilled. flex builder ofcourse cannot run unit tests right now but I can debug code in it which I cannot in IDEA yet.

Picture 5.png
Picture 3.png

You have attached a thread dump of Flex compiler, not of the IDEA itself. Though I think I don't need it any more.
Can you please attach a screenshot of Flexmojos SDK settings (Project Structure | SDKs). I suspect that Path to AIR Debug Launcher or Runtime is incorrect there.


Here is the screenshot. I am  trying to point the AIR debug launcher to /Users/manish/Development/Flex/3.3/bin/adl but for some reason IDEA is not showing me anything under bin and doesn't let me choose adl.

I am not sure with the compiler (compiler- pointing to my maven repository what should I point my AIR executable/runtime to.

WHen I switch the compiler to AIR 3.3, I go back to the invalid descriptor error which you guys have fixed. Can you tell me what build I should use to pick up this fix?

Picture 8.png
Picture 6.png

You are right, adl should point to /Users/manish/Development/Flex/3.3/bin/adl. Not showing it in file chooser will be fixed in 9.0.2 release. Now you may manually type it in respective field.
AIR runtime should point to /Users/manish/Development/Flex/3.3/runtimes/air/mac

Descriptor version for AIR SDK 3.3 is definitely fixed in just announced 95.54 http://www.jetbrains.net/confluence/display/IDEADEV/Maia+EAP


Wonderful, I got Maia 95.54 and I can run my unit tests from the IDE and debug them. Thanks a lot for your help. One or two more things and I can move over completely to IDEA!


Glad to hear!
Sorry that this took so much time to find an answer.

We'd gladly resolve one or two remaining issues. Details?


Sure. I'll have some more time next week and I'm going to try and debug our AIR app using 95.54 to see if it works. Its a slightly non standard  (I think) setup-- the application loads a swf file from a web server and its the downloaded swf that I want to debug. Lst time, I got only as far being able to debug the AIR app but could n ot debug the downloaded swf. I'll see how far I get this time.

Thanks for your help.


Please sign in to leave a comment.