17 Replies Latest reply on Jul 14, 2010 2:17 PM by Kaleidoscope101

    FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?

    trevorbutler

      Folks,

       

      We have a working CI system which is currently using binaries from FU4.0 development snapshots.  When we last checked the releases page, we saw that 4.0 stable was out, but so were 4.1 Beta 1 and 2.  Testers within the company were requesting 4.1 Beta 2, so I thought I would see if we could move our binaries directly to that level. I was able to try out the 4.1 B2 CI functionality on my Windows XP machine, after a few attempts... (I saw weird failures at first).  I had already installed Flash Player 10, and had made the file type assocation necessary for the Ant task to be able to invoke the player.  So, I figured that I could just replace the FU binaries to upgrade.  I did that, and my testbed went from working to broken. The failures seemed to point to the local trusted file not being available. I am not sure why that would have been a problem, but I kept trying different things hoping to get something to work.  I am not sure exactly how I got it working, but I recall copying the 4.1B2 binaries into place (replacing the older 4.0 dev snapshots), deleting the flexUnit.cfg file under C:\WINNT\system32\Macromed\Flash\FlashPlayerTrust, and rebooting the machine.

       

      I thought the weird issues I had seen were a fluke.I now do not think that is true...

       

      After getting 4.1 B2 to work successfully on my WinXP desktop, I thought I would try it out on one of the production CI servers, which runs Windows Server 2008. I shutdown the system, replaced the binaries, restarted the machine, and I am seeing a similar problem.

       

      Here is what I am observing - can someone please confirm these findings and explain why this is happening and how can I fix it (the machine reboot did not work on Server 2008)?

       

      The Ant task times out waiting for the results: "The following error occurred while executing this line: :  java.util.concurrent.ExecutionException: Socket timeout waiting for flexunit  report."

       

      Apparently the local trust folder location where flexUnit.cfg is written has moved with 4.1 to a new location on the disk. It used to be here (WinXP):

          C:\WINNT\system32\Macromed\Flash\FlashPlayerTrust\

      New location (WinXP):

           C:\Documents and Settings\<user>\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust\

       

      The locations on Win Server 2008 - old:

           C:\Windows\System32\Macromed\Flash\FlashPlayerTrust\

      new:

           C:\Users\<user>\AppData\Roaming\Macromedia\Flash  Player\#Security\FlashPlayerTrust\

       

      I surmised this from the errors provided in the process log, and from watching where the flexUnit.cfg file was written to disk.  On my WinXP machine, flexUnit.cfg eventually started to get written to the new location where the new 4.1 B2 binaries expect it.  However on Win 2008, flexUnit.cfg is no longer being written to either the old or new locations!  I watched both folders while the ant process ran, and neither was updated.  Here is a snippet of the output (with FU 4.1 B2 binaries). Note the FileNotFoundException:

       

      FlexUnit player target: flash
      Validating task  attributes ...
      Generating default values ...
      Using default working dir  [C:\DJTE\sas.commons.services.nls.collation_swc\d2flxcmn23\extracted\Source\Flex]
      Using  the following settings for the test run:
      FLEX_HOME:  [C:\iFABS_DE\dev\vert-d2flxcmn23\203300.32.0.20100711202037_d2flxcmn23]
      haltonfailure:  [false]
      headless: [false]
      display: [99]
      localTrusted: [true]
      player:  [flash]
      port: [1024]
      swf:  [C:\DJTE\sas.commons.services.nls.collation_swc\d2flxcmn23\extracted\build\sas.commons.se rvices.nls.collation.tests.unit.swf]
      timeout:  [1800000ms]
      toDir:  [C:\DJTE\sas.commons.services.nls.collation_swc\d2flxcmn23\reports\xml]
      Setting  up server process ...
      Starting server ...
      OS: [Windows]
      Launching  player:
      java.io.FileNotFoundException:  C:\Users\myuser\AppData\Roaming\Macromedia\Flash  Player\#Security\FlashPlayerTrust\flexUnit.cfg (The system cannot find the path  specified)
      at java.io.FileOutputStream.open(Native  Method)
      at  java.io.FileOutputStream.(FileOutputStream.java:179)
      at java.io.FileWriter.(FileWriter.java:90)
      at org.flexunit.ant.launcher.commands.player.TrustFile.write(Unknown  Source)
      at  org.flexunit.ant.launcher.commands.player.TrustFile.add(Unknown  Source)
      at  org.flexunit.ant.launcher.commands.player.FlashPlayerCommand.launch(Unknown  Source)
      at  org.flexunit.ant.launcher.FlexUnitLauncher.runTests(Unknown  Source)
      at  org.flexunit.ant.tasks.TestRun.launchTestSuite(Unknown Source)
      at org.flexunit.ant.tasks.TestRun.run(Unknown  Source)
      at  org.flexunit.ant.tasks.FlexUnitTask.execute(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  Method)
      at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:212)
      at  groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)
      at  groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:162)
      at  groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
      at  org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
      Opening  server socket on port [1024].
      at  org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
      Waiting  for client connection ...
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at  com.sas.djte.library.FlexProcessor.runFlexTests(FlexProcessor.groovy:315)
      at com.sas.djte.library.FlexProcessor$runFlexTests.call(Unknown  Source)
      at  org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at  com.sas.djte.library.TestBuilder.smokeTest(TestBuilder.groovy:360)
      at  com.sas.djte.library.TestBuilder.this$2$smokeTest(TestBuilder.groovy)
      at  com.sas.djte.library.TestBuilder$this$2$smokeTest.callCurrent(Unknown  Source)
      at  org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java: 44)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:1 43)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:1 51)
      at  com.sas.djte.library.TestBuilder.runTest(TestBuilder.groovy:87)
      at  com.sas.djte.library.TestBuilder.this$2$runTest(TestBuilder.groovy)
      at  com.sas.djte.library.TestBuilder$this$2$runTest.callCurrent(Unknown  Source)
      at  org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java: 44)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:1 43)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:1 51)
      at  com.sas.djte.library.TestBuilder.build(TestBuilder.groovy:71)
      at com.sas.djte.library.TestBuilder$build.call(Unknown  Source)
      at  org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at Default.run(Default.groovy:5)
      at  org.codehaus.groovy.ant.Groovy.parseAndRunScript(Groovy.java:425)
      at  org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:404)
      at  org.codehaus.groovy.ant.Groovy.execute(Groovy.java:279)
      at  org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown  Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
      at  org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown  Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
      at  org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown  Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  org.apache.tools.ant.Target.execute(Target.java:357)
      at  org.apache.tools.ant.Target.performTasks(Target.java:385)
      at  org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
      at  org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
      at  org.apache.tools.ant.Project.executeTargets(Project.java:1189)
      at  org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  Method)
      at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:212)
      at  groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)
      at  groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:162)
      at  groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
      at  org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
      at  org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at  org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)
      at  embedded_script_in_C__Program_Files_DJTE_import_dot_macrodef.run(embedded_script_in_C__Pr ogram_Files_DJTE_import_dot_macrodef:18)
      at  org.codehaus.groovy.ant.Groovy.parseAndRunScript(Groovy.java:425)
      at  org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:404)
      at  org.codehaus.groovy.ant.Groovy.execute(Groovy.java:279)
      at  org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown  Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  org.apache.tools.ant.Target.execute(Target.java:357)
      at  org.apache.tools.ant.Target.performTasks(Target.java:385)
      at  org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
      at  org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:3 8)
      at  org.apache.tools.ant.Project.executeTargets(Project.java:1189)
      at  org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
      at  org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
      at  org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown  Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  Method)
      at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  net.sf.antcontrib.logic.TryCatchTask.execute(TryCatchTask.java:207)
      at  org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown  Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  Method)
      at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  net.sf.antcontrib.logic.TryCatchTask.execute(TryCatchTask.java:207)
      at  org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown  Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at  org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at  org.apache.tools.ant.Target.execute(Target.java:357)
      at  org.apache.tools.ant.Target.performTasks(Target.java:385)
      at  org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
      at  org.apache.tools.ant.Project.executeTarget(Project.java:1306)
      at  org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      at  org.apache.tools.ant.Project.executeTargets(Project.java:1189)
      at org.apache.tools.ant.Main.runBuild(Main.java:758)
      at org.apache.tools.ant.Main.startAnt(Main.java:217)
      at  org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
      at  org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
      Updated  local trust file at [C:\Users\myuser\AppData\Roaming\Macromedia\Flash  Player\#Security\FlashPlayerTrust\flexUnit.cfg], added  [C:\DJTE\sas.commons.services.nls.collation_swc\d2flxcmn23\extracted\build].
      Executing  'rundll32' with  arguments:
      'url.dll,FileProtocolHandler'
      'C:\DJTE\sas.commons.services.nls.collation_swc\d2flxcmn23\extracted\build\sas.commons.ser vices.nls.collation.tests.unit.swf'
      The  ' characters around the executable and arguments are
      not part of the  command.

       

      Stopping server ...
      End of test data reached, sending  acknowledgement to player ...
      Closing client connection ...
      Closing server  on port [1024] ...

        • 1. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
          luciano.bustos Level 1

          I faced this issue days before.

          Try to creating the folder by hand Flash Player\#Security\FlashPlayerTrust\ for the user running CI. (i'm using hudson).

          then execute the build again.

          • 2. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
            trevorbutler Level 1

            @luciano.bustos,

             

            Thanks for your suggestion to manually create the folder structure that was missing.  Doh!  I did that, and now the new 4.1 B2 binaries are working for me. So, I think your fix effectively works around the issue.

             

            But I think that FlexUnit should be creating these folders automatically, without requiring the user to do so.  I seem to recall a similar problem in the early development of FlexUnit 4.0, in which the necessary folders were not created by the code. I even submitted a patch to the developers to fix the same problem with the old local trusted location.

             

            Hopefully the developers will respond with their opinions on this shortly.

             

            Thanks,

            Trevor

            • 3. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
              mlabriola Level 4

              Looking through code and attempting some simulation now. We will get back to you as soon as we have something definitive.

               

              Thanks for taking the time to research and post. It is appreciated,

              Mike

              • 4. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                coloradomidland

                I'm having a related problem trying to use FlexUnit 4:

                 

                java.io.FileNotFoundException: C:\Windows\system32\Macromed\Flash\FlashPlayerTrust\flexUnit.cfg (The system cannot find the path specified)

                 

                Windows 7 64 bit, Flex SDK 4.0.0, running from Ant.

                 

                Jon

                • 5. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                  legrosb Level 3

                  Couple things to note from the 4.0.0 release:

                   

                  - The logic that creates the trust file to append and remove trust locations rather than keep only a single trust location in the file at a time.

                  - The task now checks to see if it can validly assemble the user's trust directory path first then, if not, uses the global trust directory.  This was done to help users on Linux running as root who don't have a home directory.  I did research on this for all platforms however, hence why the trust directory changed for Windows and Mac based on the user running the Ant task.

                   

                  I left out the code that automatically creates the trust directory during the refactor accidentally it seems.  I've added a fix for it back into my fork, so that was my mistake.  Sim just pulled my fork into the main fork yesterday, so I will ping him to see if he'll do so again today to add this fix back in.  Sorry about that guys.

                   

                  -Brian

                  • 6. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                    legrosb Level 3

                    @Jon - Per my last message on this thread, this was a feature missed during a refactor, so it should be available in the next RC.  In the mean time if you create the folder : C:\Windows\system32\Macromed\Flash\FlashPlayerTrust\ I believe the Ant task should work for you.  Let me know how it goes.

                     

                    -Brian

                    • 7. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                      coloradomidland Level 1

                      So, here's the rub: both the user-specific and the global trust directories exist on my Windows 7 64-bit system:

                       

                      C:/Users/<username>/AppData/Roaming/Macromedia/Flash Player/#Security/FlashPlayerTrust

                       

                      and

                       

                      C:/Windows/system32/Macromed/Flash/FlashPlayerTrust

                       

                      An empty flexUnit.cfg exists in the former, no flexUnit.cfg exists in the latter.

                       

                      So, I'm questioning whether the purported fix (adding the code to create the directories) will solve my problem.

                       

                      Update: strangely, the global directory "Macromed" is visible to me using Cygwin and a terminal window, but does not appear when using Windows Explorer, even when I disable the "hide system files" option in Explorer, and run it as Administrator. All components of the user-specific path are visible in Explorer, however.

                       

                      Update 2: Now THAT's interesting - in fact, the directory appearing as "system32" on my Cygwin command line actually appears as "SysWOW64" in Windows Explorer. There is indeed a "Macromed" directory under there. Is this some kind of 32-bit/64-bit confusion thing? There is also a "System32" (note the capital "S") directory in Explorer under C:/Windows. I tried creating Macromed/Flash/FlashPlayerTrust under that, but no joy: I'm still getting the FileNotFoundException.

                       

                      Jon

                      • 8. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                        legrosb Level 3

                        @Jon - Hmm, that is strange behavior.  I'll need a bit more information before I can help more:

                         

                        - A snippet of your build script showing how you're using the FlexUnit Ant task

                        - The version of the binaries you're using for FU4 (i.e. - beta2 or latest source)

                        - Whether or not you're running the Ant script from a service or stand-alone?  If from a service are you using LocalSystem or a custom user?

                        - The value of the APPDATA and SYSTEMROOT environment variables for the user running the Ant build script

                        - Output from a run of your Ant build script setting the "verbose" property of the flexunit Ant task to true.

                         

                        I don't know a whole lot about admin'ing Windows, or any OS for that matter, but if the Ant task if writing out a trust file in the user trust directory but throwing an error for the global trust directory, then that is definitely a bug on our side.  Can you confirm that deleting both directories and running the latest beta produce the same result (i.e. - two directories created, a file written to one dir, but an error occurring because it doesn't exist in another)?  I don't see anywhere in the code where this could be happening, so the info above is what I will need to continue.

                         

                        Are you running the calls to Ant and such from a cygwin terminal?  That may have something to do with it as well.  Let me know and we'll figure something out.

                         

                        -Brian

                        • 9. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                          legrosb Level 3

                          @Jon - If you're running 64-bit windows you will have a couple extra directories from my understanding, typically Program Filesx86 and SysWOW64.  Even with these directories, from what I've ready re the FP's trust approach, the APPDATA env variable and SYSTEMROOT env variable are used to find the user and global directories.  If you're running from within cygwin, these may be reported incorrectly for 64-bit systems; that's just a guess though.  Looks like we're dual posting here, so I'll keep an eye out for your findings.

                           

                          -Brian

                          • 10. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                            coloradomidland Level 1

                            @Brian - I am still using 4.0.0 release, as I mentioned before. Let me try 4.1.0 Beta2 and see if that solves anything.

                            $ echo $APPDATA
                            C:\Users\js\AppData\Roaming
                            $ echo $SYSTEMROOT
                            C:\Windows

                             

                            Jon

                            • 11. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                              legrosb Level 3

                              @jon - Sorry for the confusion, your post read Flex SDK 4.0.0 and the thread is referencing FU4.1-beta2.  Just for clarity's sake, when I say 4.1 I'm referring to the FlexUnit binaries, not the SDK. 

                               

                              I also did some checking and I'm not seeing a 64-bit stand-alone FP available for download on the Adobe site.  If you're running the 32-bit SA player, then I believe that the 32-bit folders in Windows will be used.  The Ant task references system32 and it looks like on Windows 7 and Windows Server 2008 the folder is now named System32 (capital "S" as you pointed out).  If running Ant from a Windows terminal I believe Java will respect the case-insensitive nature of the file system, but if running from a cygwin terminal case insensitivity may not be respected.  Additionally, if the FP is expecting the trust directories to be in the 32-bit folders and cygwin is mapping system32 to SysWOW64, that may be another issue.  Again just speculation however w/o all of the details I asked for previously. 

                               

                              I'm not sure upgrading from 4.0.0 to 4.1.0-beta2 will help, but it's definitely worth a try.  Good luck, let me know how it goes.

                               

                              -Brian

                              • 12. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                                coloradomidland Level 1

                                @Brian,

                                 

                                My apologies for mixing up the revision strings previously. It was a long day. :-)

                                 

                                I updated to flexunit 4.1.0-beta2, and my problems with the flexUnit.cfg file went away. Hurray!

                                 

                                Now I have another problem.

                                 

                                If I have the EITHER the CIListener or the FlexCoverListener added as listeners, my tests run to completion. If I have BOTH listeners configured, the flexunit runner hangs showing "Running tests..." and 0/100 progress. This happens whether or not I have the UIListener configured (do I need that any more? Looks like the flexunit player works regardless). This is via Ant from the command line in Cygwin.

                                 

                                Here's the flexunit ant task verbose output when it hangs:

                                 

                                [flexunit] Validating task attributes ...
                                [flexunit] Generating default values ...
                                [flexunit] Using default working dir [C:\work\ws\trunk\cpflex\build\ant]
                                [flexunit] Using the following settings for the test run:
                                [flexunit]     FLEX_HOME: [C:\Apps\flextools\flexsdk\4.0.0]
                                [flexunit]     haltonfailure: [false]
                                [flexunit]     headless: [false]
                                [flexunit]     display: [99]
                                [flexunit]     localTrusted: [true]
                                [flexunit]     player: [flash]
                                [flexunit]     port: [1024]
                                [flexunit]     swf: [C:\work\ws\trunk\cpflex\tgt\hpux\product\test\CMUnitTests.swf]
                                [flexunit]     timeout: [60000ms]
                                [flexunit]     toDir: [C:\work\ws\trunk\cpflex\tgt\hpux\product\test\report]
                                [flexunit] Setting up server process ...
                                [flexunit] Starting server ...
                                [flexunit] OS: [Windows]
                                [flexunit] Launching player:
                                [flexunit]
                                [flexunit] Opening server socket on port [1024].
                                [flexunit] Waiting for client connection ...
                                [flexunit] Executing 'rundll32' with arguments:
                                [flexunit] 'url.dll,FileProtocolHandler'
                                [flexunit] 'C:\work\ws\trunk\cpflex\tgt\hpux\product\test\CMUnitTests.swf'
                                [flexunit]
                                [flexunit] The ' characters around the executable and arguments are
                                [flexunit] not part of the command.
                                [flexunit]
                                [flexunit] Client connected.
                                [flexunit] Setting inbound buffer size to [262144] bytes.
                                [flexunit] Receiving data ...
                                [flexunit] Sending acknowledgement to player to start sending test data ...
                                [flexunit]

                                Sorry for being such a pest...

                                • 13. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                                  mlabriola Level 4

                                  Jon:

                                   

                                  I have nothing technical to offer here but did want to say we sincerely appreciate the feedback and discussion. Especially during our beta cycles we get extremely worried when we don't see issues posted on the forums.

                                   

                                  Thanks,

                                  Mike

                                  • 14. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                                    legrosb Level 3

                                    @Jon - No worries, you're not being a pest; I agree with Mike's sentiment for sure, feedback and bugs are always good to hear about.

                                     

                                    After looking over revision histories, it may be that the user trust directory is being used in 4.1 and 4.0 always used the global trust directory on Windows, so I guess there was a benefit to the upgrade (case in point ).  Not sure why the FP is hanging with the CIListener, FlexCoverListener, and UIListener all attached, but the UIListener isn't required to use the CIListener, so you can try pulling it to see if that helps.

                                     

                                    A note about the FlexCoverListener.  Connectivity between the CoverageViewer and the FlexCoverListener is sometimes flakey in its current implementation; mainly I find that sometimes the CoverageViewer application won't close.  For FlexUnit 4.2, we're trying to port the work done in FlexMojos to include integration with Cobertura, Emma, and Apparat for an alternative for code coverage to FlexCover.  As we make progress we'll be posting to the forums, FWIW.

                                     

                                    Let me know how it goes and don't hesitate to follow up with any questions.

                                     

                                    -Brian

                                    • 15. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                                      coloradomidland Level 1

                                      It appears that using the command attribute on the flexunit Ant task prevents the flexUnit.cfg file from being properly initialized. I'm not sure whether this is intended behavior, but (for example) it makes it difficult to run tests in web browser other than the one registered with Windows as the default.

                                       

                                      This is not my current problem, however. I'm still trying to narrow that down.

                                       

                                      Jon

                                      • 16. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                                        legrosb Level 3

                                        @Jon - Thanks for the feedback.  Can you give any more details about "properly initialized" with respect to the flexunit.cfg file?  Is the trust directory not being created correctly, is the file not being written to, is the file being written to but local trust isn't being obeyed, etc?  Any chance we can get those log outputs we talked about?  Seeing the output from a test run is really helpful for me to debug any issues that arise.

                                         

                                        Any help is appreciated.  Thanks.

                                         

                                        -Brian

                                        • 17. Re: FlexUnit4.1 B2 upgrade breaks CI system - flexUnit.cfg issues?
                                          Kaleidoscope101

                                          If u r talking to me  and u maybe talking about the free surveys for chips for

                                          facebook? I will do anything u need me to do. I just don't know what. What?