Skip navigation
Currently Being Moderated

FlexUnit 4.1.0-8 Error 1046

Aug 10, 2011 3:32 PM

Hi,

 

I'm using Eclipse Gallieo on Mac OS 10.6.8 with the Flash Builder 4 plugin.  My project is using the Flex 4.5.0 SDK and I recently updated FlexUnit from 4.0 to 4.1.0-8.  Now when I compile I get four errors:

 

  1. 1046: Type was not found or was not a compile-time constant: [flash.events]::IEventDispatcher.
  2. 1046: Type was not found or was not a compile-time constant: [org.flexunit.async]::IAsyncTestResponder.
  3. 1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncHandlingStatement.
  4. 1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncStatement.

 

I can still run my unit tests if I tell Flash Builder to ignore the errors and everything seems okay but this is a) annoying and b) indicative of something being wrong somewhere.  So my question is: what do I need to do to resolve this?  Or what could be the cause of this?

 
Replies
  • 79Dangerman
    6 posts
    Aug 11, 2011
    Currently Being Moderated
    Aug 11, 2011 2:01 AM   in reply to McMonahan

    Hi,

     

    My college and I have the same issue.

    On his box it will compile after a clean but not on mine.

     

    We are both running Win7 64 bit, Flash builder 4.5, FlexUnit 4, and Flex SDK 4.1

     

    Any help much appreciated...

     

    Errors below:

     

    Description     Resource     Path     Location     Type

    1046: Type was not found or was not a compile-time constant: [flash.events]::IEventDispatcher.     CalcTests          Unknown      Flex Problem

    1046: Type was not found or was not a compile-time constant: [org.flexunit.async]::IAsyncTestResponder.     CalcTests          Unk nown     Flex Problem

    1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncHandlingStatement.      CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncStatement.     Cal cTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: AsyncResponseEvent.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: AsyncTestResponder.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: FlexEnvironmentBuilder.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: FlexMXVisualTestEnvironment.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: ISequenceAction.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: ISequencePend.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: ISequenceStep.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: SequenceBindingWaiter.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: SequenceCaller.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: SequenceDelay.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: SequenceEventDispatcher.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: SequenceRunner.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: SequenceSetter.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: SequenceWaiter.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: TextListener.     CalcTests          Unknown     Flex Problem

    1046: Type was not found or was not a compile-time constant: VisualTestEnvironmentBuilder.     CalcTests          Unknown     Flex Problem

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 11, 2011 7:33 AM   in reply to 79Dangerman

    I haven't seen this issue yet in my own environment, but I will try to reproduce today.

     

    Mike

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2011 8:25 AM   in reply to McMonahan

    I get the similar errors;

     

    1046: Type was not found or was not a compile-time constant: [flash.events]::IEventDispatcher.
    1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncHandlingStatement.
    1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncStatement.

     

    I am on FlexUnit 4.0 and FlexSDK 4.0 in Flash Builder 4.5 Standard.

     

    But the test seem to run.

     

    Anyone know why its doing this?

     

    Andi

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2011 1:04 AM   in reply to McMonahan

    Guys,

     

    Have you ever tried to change the swc path from version4libs to version3libs in Library Path view of FB? If you're using FB4.5+ , the default path will be version4libs.

     

    I encountered this issue days ago, yes , clean and re-run test is OK; but getting annoying if you gonna run tests many times.


    Hope this helps.

     

    Robert

     
    |
    Mark as:
  • 79Dangerman
    6 posts
    Aug 11, 2011
    Currently Being Moderated
    Aug 30, 2011 1:32 AM   in reply to R.S

     

    Thanks Robert,

     

    This seemed not to work to start with but after many cleans and builds (it seems not to always do cleans thoroughly on this project) the errors have gone away.

     

    They did occasionally disappear before, so I will post again if the problem reoccurs (currently I’m on a different project so may not be soon)

     

    My actions were as follows:

     

    Repoint relevant paths in Project -> properties -> Flex Build Path from version4libs to version3libs, on all the related projects. Clean and build about 20 times till errors go away and the build manages to produce the HTML file to launch.

    And it has now been working for about 10 cleans and builds.

     

    Dan

     
    |
    Mark as:
  • 79Dangerman
    6 posts
    Aug 11, 2011
    Currently Being Moderated
    Aug 30, 2011 1:34 AM   in reply to R.S

    Ha,

    Wouldn’t you know it, as soon as I post the errors come back.

    Anyone else with any ideas?

     

    Dan

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 30, 2011 9:20 AM   in reply to 79Dangerman

    If someone is willing to file a bug with reproducable steps, I'll have the Flash Builder team investigate.

     

    https://bugs.adobe.com/flex/

     

    -Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 30, 2011 9:53 PM   in reply to McMonahan

    Here's what I found solved it for me.  I had the exact same error today on Win7 64-bit, with the newest Flash Builder 4.5.1 and importing an existing project.

     

    I had the FlexUnit4.swc in my libs folder as well as the built in libraries in the build path so I:

    1. pulled the FlexUnit4.swc out of the libs folder, onto my desktop
    2. let Flash Builder compile it and find no errors
    3. put the swc back in and there were still no errors.

     

    Not sure if I really need it in there but I'm working in a team environment using P4. Some team members are not using the newest Flash Builder, so I keep it there.  Do you have the same scenario, where you have the swc in your libs folder?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 13, 2011 2:06 AM   in reply to McMonahan

    I was getting the following 4 errors when right-clicking a FlexUnit testcase and choosing "Execute FlexUnit Tests" using FB 4.5:

     

    1046: Type was not found or was not a compile-time constant: [flash.events]::IEventDispatcher.

    1046: Type was not found or was not a compile-time constant: [org.flexunit.async]::IAsyncTestResponder.

    1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncHandlingStatement.

    1046: Type was not found or was not a compile-time constant: [org.flexunit.internals.runners.statements]::IAsyncStatement

     

    To solve this, I made sure "Build Automatically" was ticked in "Project" options.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 15, 2011 5:22 PM   in reply to McMonahan

    Exact same problem here.

     

    Windows 7-64bit, FlashBuilder 4.5.1.

     

    I'm happy to share any pertinent information...this is really annoying.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 28, 2011 12:11 AM   in reply to McMonahan

    We resolved similar problem by removing fluint library from project dependencies. flexunit-4.1.0-8-flex_4.1.0.16076.swc seems to include fluint packages already. I guess classloader loads classes in non deterministic order and thats why failures occur randomly.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 28, 2011 12:07 PM   in reply to juhakaremo

    That seems to have fixed it for me.  I'll post if the problem crops back up.

     
    |
    Mark as:
  • 79Dangerman
    6 posts
    Aug 11, 2011
    Currently Being Moderated
    Oct 17, 2011 6:14 AM   in reply to juhakaremo

    That's seems to of solved it for me too.

    Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 19, 2011 9:24 AM   in reply to juhakaremo

    I am having the same error, 1046, for which you offered a solution in your September 27 post. It seems that Flashbuilder has decided that the type "int" will not compile for me. I am using Flashbuilder 4.6. As stated in your post, I have found flexunit-4.1.0-8-flex_4.1.0.16076.swc but I do not see a fluint library. What is this?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points