8 Replies Latest reply on Jun 14, 2010 11:19 AM by skagels

    Digest mismatch at runtime when building from ant script

    skagels

      I'm trying to link all the libraries that my Flex project references as RSLs. When I do this via Flex Builder everything seems to work.  When I try to do this via an ant build script using the mxmlc task the build succeeds (everything compiles) but at runtime I get Flex Error #1001: Digest mismatch with RSL for datavisualization.swc.  Not sure why I'm getting this especially since I specify datavisualization.swf in the rsl-url not a swz file. Both processes yield the same set of swf, swc, and swz files in the deployment folder.  I can't figure out what's different between the two build processes after comparing .actionScriptProperties with the ant script.  Can anyone help shed some light on this or help me figure out how to trouble shoot this? Thanks.

       

      My mxmlx task:

       

      <mxmlc
                  file="${flex.main.file}"
                  output="${flex.output.swf}"
                  actionscript-file-encoding="UTF-8"
                  keep-generated-actionscript="false"
                  static-link-runtime-shared-libraries="false"
                  locale="en_US"
                  maxmemory="256m">
                 
                  <source-path path-element="${PROJECT_FRAMEWORKS}"/>
                            
                  <external-library-path dir="${PROJECT_FRAMEWORKS}/libs/player" includes="playerglobal.swc"/>

       

                  <runtime-shared-library-path path-element="${PROJECT_FRAMEWORKS}/libs/framework.swc"> 

                      <url rsl-url="framework_${FLEX_BUILD}.swf"             
                      <url rsl-url="framework_${FLEX_BUILD}.swz"/>               
                  </runtime-shared-library-path>
                 
                  <runtime-shared-library-path path-element="${PROJECT_FRAMEWORKS}/libs/rpc.swc">
                      <url rsl-url="rpc_${FLEX_BUILD}.swf"/>
                      <url rsl-url="rpc_${FLEX_BUILD}.swz"/>               
                  </runtime-shared-library-path>
                             
                  <runtime-shared-library-path
                      path-element="${PROJECT_FRAMEWORKS}/libs/automation.swc">
                      <url rsl-url="automation.swf"/>
                  </runtime-shared-library-path>
                             
                  <runtime-shared-library-path
                      path-element="${PROJECT_FRAMEWORKS}/libs/automation_agent.swc">
                      <url rsl-url="automation_agent.swf"/>
                  </runtime-shared-library-path>
                 
                  <runtime-shared-library-path
                      path-element="${PROJECT_FRAMEWORKS}/libs/automation_dmv.swc">
                      <url rsl-url="automation_dmv.swf"/>
                  </runtime-shared-library-path>
                 
                  <runtime-shared-library-path
                      path-element="${PROJECT_FRAMEWORKS}/libs/automation_flashflexkit.swc">
                      <url rsl-url="automation_flashflexkit.swf"/>
                  </runtime-shared-library-path>
                 
                  <runtime-shared-library-path
                      path-element="${PROJECT_FRAMEWORKS}/libs/datavisualization.swc">
                      <url rsl-url="datavisualization.swf"/>
                  </runtime-shared-library-path>          
                 
                  <runtime-shared-library-path
                      path-element="${PROJECT_FRAMEWORKS}/libs/flex.swc">
                      <url rsl-url="flex.swf"/>
                  </runtime-shared-library-path>

       

                  <runtime-shared-library-path
                      path-element="${PROJECT_FRAMEWORKS}/libs/qtp.swc">
                      <url rsl-url="qtp.swf"/>
                  </runtime-shared-library-path>
                 
                  <runtime-shared-library-path
                      path-element="${PROJECT_FRAMEWORKS}/libs/utilities.swc">
                      <url rsl-url="utilities.swf"/>
                  </runtime-shared-library-path>           
                             
                  <compiler.library-path dir="${PROJECT_FRAMEWORKS}/locale" append="true">
                      <include name="{locale}" />
                  </compiler.library-path>
                 
                  ...
                 
                  <default-size width="500" height="600" />           
              </mxmlc>

        • 1. Re: Digest mismatch at runtime when building from ant script
          Darrell Loverin Level 4

          Try compiling from FB and your ant task with -keep. Search the generated directory for "cdRsls" in _SystemManager-generated.as files. This will show you the RSLs that are being loaded. You can verify that your RSLs are being loaded from where you think they are (probably most common problem) and the digests match the digests in the swcs you are compiling with. Each swc has a digest element located in its catalog.xml. Also look in the flash log file for error messages.

           

           

          -Darrell

          1 person found this helpful
          • 2. Re: Digest mismatch at runtime when building from ant script
            skagels Level 1

            Thanks Darrell... The first problem I notice when comparing the SystemManager.as files is that the failover url's are

            not getting set for my RSLs when compiling via the ant script.  Here is what I am doing in the script:

             

                        <runtime-shared-library-path path-element="${PROJECT_FRAMEWORKS}/libs/framework.swc">
                            <url rsl-url="framework_${FLEX_BUILD}.swz"/>
                            <url rsl-url="framework_${FLEX_BUILD}.swf"/>
                        </runtime-shared-library-path>

             

            It seems lile the second url node is ignored.  What is the correct way to set the failover url?

            • 3. Re: Digest mismatch at runtime when building from ant script
              Darrell Loverin Level 4

              I think you are hitting this bug: http://bugs.adobe.com/jira/browse/SDK-25363

               

               

              -Darrell

              1 person found this helpful
              • 4. Re: Digest mismatch at runtime when building from ant script
                skagels Level 1

                Hi Darrell,

                 

                When I load flex tasks from the SDK-25363 jar and run the build script I get the following error:

                 

                [mxmlc] command line: Error: configuration variable 'runtime-shared-library-path' requires a value for 'rsl-url'
                [mxmlc] Use 'mxmlc -help' for information about using the command line.

                 

                I'm using Flex SDK version 3.0.0.477.  Maybe that's part of the problem? Each of my r-s-l-p elements have a nested <url rsl-url="..."/>.  Is the jar sufficient or would I need to upgrade to more recent version of Flex before applying the jar?

                • 5. Re: Digest mismatch at runtime when building from ant script
                  Darrell Loverin Level 4

                  It looks like the jar is for Flex 3.5 so I would upgrade to that version.

                   

                   

                  -Darrell

                  • 6. Re: Digest mismatch at runtime when building from ant script
                    skagels Level 1

                    Hi Darrell,

                     

                    After upgrading to Flex SDK 3.5a and using the ant task patch jar I get the following error when running the ant script:

                     

                    [mxmlc] Loading configuration file C:\workspaces\dashboard\com.metatomix.releng\tools\flex_sdk_3.5a\frameworks\flex-config.x ml
                    [mxmlc] command line: Error: configuration variable 'runtime-shared-library-path' requires a value for 'rsl-url'
                    [mxmlc] Use 'mxmlc -help' for information about using the command line.

                     


                    Excerpt from my any script:

                     

                           <mxmlc
                                file="${flex.main.file}"
                                output="${flex.output.swf}"
                                actionscript-file-encoding="UTF-8"
                                keep-generated-actionscript="true"
                                static-link-runtime-shared-libraries="false"
                                locale="${flex.build.locale}"
                                maxmemory="256m">
                               
                                <source-path path-element="${PROJECT_FRAMEWORKS}"/>
                               
                                <external-library-path dir="${flex.player.lib.dir}" includes="playerglobal.swc"/>

                     

                                <runtime-shared-library-path path-element="${PROJECT_FRAMEWORKS}/libs/framework.swc" >
                                    <url rsl-url="framework_${FLEX_BUILD}.swz" />               
                                </runtime-shared-library-path>           
                       
                                <default-size width="500" height="600" />           
                            </mxmlc>

                    • 7. Re: Digest mismatch at runtime when building from ant script
                      Darrell Loverin Level 4

                      I didn't write the patch but I just took a quick look at it. I think the element "url" was renamed to "rsl-url" and new elements were added such as "failover-url". You can try to match this new syntax but I don't think this patch will be accepted due to the rename.

                       

                       

                      -Darrell

                      • 8. Re: Digest mismatch at runtime when building from ant script
                        skagels Level 1

                        Thanks Darrell.  I guess the ant tasks are still broken then. I tried changing the URL tag to RSL-URL but that did not work either.  I could just execute the mxmlc directly from an ant exec task, right?  This seems like the best approach until the ant tasks are properly fixed.  Thanks for all your help.

                         

                        -Scott