17 Replies Latest reply: May 12, 2014 1:59 AM by raghav kulshrestha RSS

    FlexUnit 4.1.0-8 Error 1046

    McMonahan

      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?

        • 1. Re: FlexUnit 4.1.0-8 Error 1046
          79Dangerman

          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          Unknown     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.     CalcTests          Unkn own     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

          • 2. Re: FlexUnit 4.1.0-8 Error 1046
            Michael Labriola Community Member

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

             

            Mike

            • 3. Re: FlexUnit 4.1.0-8 Error 1046
              andi_

              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

              • 4. Re: FlexUnit 4.1.0-8 Error 1046
                McMonahan Community Member

                To follow up, I'm still experiencing this issue but only intermittently.  I've noticed that when I get the errors my FlexUnit application does not actually compile correctly so it cannot be run.  By cleaning my project I'm typically able to get everything to compile with no errors and then the tests seems to run fine.

                 

                My typical workflow right now is to build my project.  If I don't get the errors mentioned in the OP I run my tests.  If I get the errors I clean my project and the errors go away and I run my tests.

                • 5. Re: FlexUnit 4.1.0-8 Error 1046
                  R.S

                  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

                  • 6. Re: FlexUnit 4.1.0-8 Error 1046
                    McMonahan Community Member

                    Any way to do this in Flash Builder 4?  I not on 4.5.

                    • 7. Re: FlexUnit 4.1.0-8 Error 1046
                      79Dangerman Community Member

                       

                      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

                      • 8. Re: FlexUnit 4.1.0-8 Error 1046
                        79Dangerman Community Member

                        Ha,

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

                        Anyone else with any ideas?

                         

                        Dan

                        • 9. Re: FlexUnit 4.1.0-8 Error 1046
                          adrock Adobe Employee

                          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

                          • 10. Re: FlexUnit 4.1.0-8 Error 1046
                            TheFlexGuy Community Member

                            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?

                            • 11. Re: FlexUnit 4.1.0-8 Error 1046
                              Frog_Tantrum

                              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.

                              • 12. Re: FlexUnit 4.1.0-8 Error 1046
                                tehxike1 Community Member

                                Exact same problem here.

                                 

                                Windows 7-64bit, FlashBuilder 4.5.1.

                                 

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

                                • 13. Re: FlexUnit 4.1.0-8 Error 1046
                                  juhakaremo

                                  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.

                                  • 14. Re: FlexUnit 4.1.0-8 Error 1046
                                    tehxike1 Community Member

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

                                    • 15. Re: FlexUnit 4.1.0-8 Error 1046
                                      79Dangerman Community Member

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

                                      Thanks.

                                      • 16. Re: FlexUnit 4.1.0-8 Error 1046
                                        DrDTP

                                        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?

                                        • 17. Re: FlexUnit 4.1.0-8 Error 1046
                                          raghav kulshrestha

                                          Hi

                                             i have also face this issue

                                           

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

                                           

                                          tell me how i resolve it

                                           

                                          regards

                                          Raghav