nothing yet | jason madsen

21 May, 2009

Flex Builder has trust issues

Posted by: jason In: All

When you create a new project in Flex Builder, the IDE updates a config file buried in the preferences that marks the project’s ‘bin-debug’ folder as a trusted resource. In so doing when you run the project you are able to access local resources (i.e. a local XML file), and remote services at the same time. When you import a Flex Builder archive it is supposed to update the same config file with the ‘bin-debug’ folder of the newly imported project.

There is an apparent issue with Flex Builder (I am running FB on a Mac, but apparently it exists on Windows as well) in that when you import, move, or rename a project, it doesn’t update the config file. When the config file isn’t updated and you try to load a local resource the player will throw a “Security Error”. This isn’t a problem if you are only using local resources ( -use-network compiler flag ). But when you need to access local files and remote files or services this can be a real pain.

I had some time recently, and decided to look into the issue. In doing so I came across a couple of past articles:

This one by Mark Walters, and this one by Jesse Warden

The fix is easy enough, go add the path of your bin-debug folder to the config file. In case you skipped the links, you can find the file in the following location:

Mac:
/Users/userAccount/Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust/flexbuilder.cfg

PC:
C:\Documents and Settins\userName\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust\flexbuilder.cfg

Updating the config file isn’t too big of a deal. However, to expedite a quicker fix, I have built an AIR app called bugrd! that will add a project’s debug folder to the config file for the user. Once the app is installed you simply drag your project folder and drop it on the interface. The interface will confirm the project that you have selected. Click the ‘un-bugr’ button, and it adds your debug folder to the local trusted list in the config file.

I am assuming that this will be cleared up some time (Flash Builder 4?), until then hopefully this’ll speed up the process.

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

You can install the bugrd from the install badge above, or you can download the .air installer here

Jason

Tags:

2 Responses to "Flex Builder has trust issues"

1 | JesterXL

May 22nd, 2009 at 1:05 am

Avatar

I KNEW someone would build an AIR app that did this before me. Kudos on a much needed app!!!!

2 | forrest

July 15th, 2009 at 6:09 pm

Avatar

This is a lifesaver. Thanks so much for this. I have been beating my head against the wall for several hours today trying to figure out wtf was going on.

Comment Form


  • Bala: i figured out my problem for anyone else struggling with this: http://forums.adobe.com/message/110535#110535 You can no longer call installAppli
  • Bala: Hey jason, thanks for the suggestion. i do in deed have that in my descriptor file. I was able to narrow my problem, I think it is a scope issue, m
  • jason: @Bala, My first suggestion would be to ensure that your AIR application has the 'allowBrowserInvocation' set to true in your application descriptor

About

Jason Madsen Headshot

Jason Madsen is a Flash, Flex, ActionScript developer who teaches the Flex Framework and OOP Concepts at Full Sail University in Orlando, Florida.


aggregated by mxna