9 Replies Latest reply on Oct 12, 2011 6:40 AM by JoshBeall

    User reports "Error #2046", I can't replicate--possible causes?

    JoshBeall Level 1

      Hi All,

       

      We've got a Flex 4 app, built in Flash Builder, and we just had a user call in and report that when they click the "Begin" button on the app (the very first user interaction they would have after the app has finished loading), they got "Error message 2046."

       

      That's all the information I have from the user.  I've been doing searching on this and it sounds like Flash runtime error 2046 is an RSL that had an invalid signature.  Here's the official list of runtime errors:

      http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/runtimeErrors.html

       

      Now, this is the first user to report this problem, and I've never experienced this myself.  How would I troubleshoot this?  Is there a way to force my browser to try and load all the RSLs for my app?  I'm using Firebug to monitor the requests the browser makes, and I can see it requests my main SWF file, but none of the SWZ files, which I think are the RSLs?  I'm wondering if one of them is "bad" somehow, but I'm not seeing the error because I've got it cached from some other site that used the same RSL?

       

      Also, I'm confused as to why the user wouldn't have gotten this message until they clicked on a button in my app.  Aren't the RSL's loaded as part of the initial app startup?  I would have thought he would have gotten this error during the initial loading of the Flex app, not when he first attempted to click on a button in the app.

       

      I haven't changed with the compiler or RSL settings for my project from the default settings when I created the project.

       

      Thanks for any input/suggestions into what's going on here...

       

        -Josh

        • 1. Re: User reports "Error #2046", I can't replicate--possible causes?
          JoshBeall Level 1

          I should have noted--I tried completely clearing my cache in Firefox, and Firebug still doesn't show anything except my SWF file as being requested.

          • 2. Re: User reports "Error #2046", I can't replicate--possible causes?
            Darrell Loverin Level 4

            You are right that RSLs are loaded up front, before the application is displayed. Does clicking the button attempt to load an application or module that will load more RSLs?

             

            Have the user check their system clock. Having your system clock setting too far in the past or future can cause this problem.

             

             

            To remove RSLs from the Flash Player Cache you can use the Settings Manager - Global Storage Settings Panel.

             

            http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.htm l#117498

             

            Uncheck the "Store common Flash components to reduce download times." Press the "Confirm" button.

             

            This clears the cache. Now you can click the checkbox again to enable the cache.

             

             

            -Darrell

            • 3. Re: User reports "Error #2046", I can't replicate--possible causes?
              JoshBeall Level 1

              I don't know if I'll have a way to contact this user again, but I'll see if I can find their information.  Thanks for the suggestion on the system clock.

               

              Also, once I followed your instructions on how to delete the RSLs, I can see them requested in Firebug.  I noticed something interesting, however, that I'm hoping someone can help me understand better.

               

              When I change the compiler options from using RSLs to "Merge into code," the total size of my SWF is 852kb.  If I use RSLs, then my SWF is 231kb, and the following additional files are loaded from fpdownload.adobe.com:

               

              1) osmf_flex.4.0.0.13495.swz (96kb)

              2) framework_4.0.0.14159.swz (607kb)

              3) textLayout_1.0.0.595.swz (129kb)

              4) spark_4.0.0.14159.swz (311kb)

              5) sparkskins_4.0.0.14159.swz (53kb)

               

              So that's a total of 1196kb in RSLs.  Combine that with my SWF size of 231kb, and you get a total of 1427kb.  That's 575kb (or 67%) more than the 852kb if I simply didn't use RSLs.  So, it looks like if I use RSLs, and the user actually needs to load the RSLs, they will have to load 575kb more than if I simply chose the option "merge into code."

               

              So, I'm guessing that the reason is that when I merge everything into code, it only actually includes the bits that I'm using.  However, when I opt for RSLs, the app must load the entire SWZ file, even if I'm only using a single item in that SWZ file.  Is that right?

               

              As for the reasoning for using loading entire RSLs over merging into your SWF only what you need, I'm guessing it goes like this: though some users might get a slower load experience, most users will already have those RSLs loaded, so they'll only need my smaller (231kb) SWF.

               

              Are there any statistics out there that can give me an idea of just what percentage of users will need to load the RSLs, versus those that will already have them cached locally?

               

                -Josh

              • 4. Re: User reports "Error #2046", I can't replicate--possible causes?
                JoshBeall Level 1

                Darrell Loverin wrote:

                 

                You are right that RSLs are loaded up front, before the application is displayed. Does clicking the button attempt to load an application or module that will load more RSLs?

                No, that button just changes the current state of the application (which results in hiding one Spark Panel and showing another), but it doesn't load an application or module.

                 

                It sounds like there is no way that the user could have gotten this runtime error and yet been able to see the "Begin" button--because the application would not have been visible until all the RSLs were loaded, is that right?

                 

                Or, could the user's system clock being off cause this error to display after the application had loaded?

                 

                If it's impossible for this error to appear after the application has loaded and become visible, that makes me wonder if the user got the error number wrong?

                • 5. Re: User reports "Error #2046", I can't replicate--possible causes?
                  Darrell Loverin Level 4

                  When there is an error loading an RSL, the application is not loaded.

                   

                  >> Or, could the user's system clock being off cause this error to display after the application had loaded?

                  No.

                   

                  >> If it's impossible for this error to appear after the application has loaded and become visible, that makes me wonder if the user got the error number wrong?

                  Possible.

                   

                   

                  -Darrell

                  • 6. Re: User reports "Error #2046", I can't replicate--possible causes?
                    Darrell Loverin Level 4

                    >>So, I'm guessing that the reason is that when I merge everything into code, it only actually includes the bits that I'm using.  However, when I opt for RSLs, the app must load the entire SWZ file, even if I'm only using a single item in that SWZ file.  Is that right?

                     

                    Yes.

                     

                    >>*Are there any statistics out there that can give me an idea of just what percentage of users will need to load the RSLs, versus those that will already have them cached locally?

                     

                    No.

                     

                    In the upcoming Flex 4.5 release, RSLs that your application does not need will not be loaded (determined by the compiler). In Flex 4.0 you can do this manually. If your application does not use s:VideoPlayer or s:VideoDisplay then you can remove osmf_flex.4.0.0.13495.swf. You may also be able to remove sparkskins as well.

                     

                     

                    -Darrell

                    • 7. Re: User reports "Error #2046", I can't replicate--possible causes?
                      JoshBeall Level 1

                      Is my understanding of RSLs as I outlined in post #3500866 correct?  I want to make sure I understand how RSLs work.

                       

                      Edit: I see you posted a followup while I was composing this message :-)

                      • 8. Re: User reports "Error #2046", I can't replicate--possible causes?
                        hipsterical

                        in the case the problem has to do with mozilla firefox, remove from the profile folder the file secmod.db and restart the browser.

                        • 9. Re: User reports "Error #2046", I can't replicate--possible causes?
                          JoshBeall Level 1

                          I see I never posted the solution to this question.  Well, here it is.

                           

                          The problem was due to a confluence of two issues:

                           

                          1) Users who had something (e.g., security software) blocking them from downloading the RSLs from Adobe

                          2) Our configuration of IIS, which wasn't allowing the RSLs to be downloaded from us.

                           

                          What was happening was that if the user couldn't download the RSLs from Adobe, it would fall back to try and download the RSLs from our site, where we are hosting our SWF.  But the RSLs have extension SWZ, and in IIS 6+, you have to manually allow that extension--only certain file extensions are permitted by default, and .swz is not one of them.

                           

                          Once I corrected our IIS configuration so that IIS would serve .swz files, the reports went away.

                           

                          Hopefully that will help someone else out there!

                           

                            -Josh