EncryptedLocalStore general internal error

So I’m developing an AIR app, and experimenting with the EncryptedLocalStore features of AIR. I got to a point where I thought my code was solid, but I wanted to erase all the mistakes I’d created in my keychain. So, I went into Keychain Access, and deleted the keychain file that looked like it was associated with my app (wish I had the keychain file name, but it’s gone). When I restarted my app, and it went to write to the keychain, I get this error:

1
2
3
Error: general internal error
at flash.data::EncryptedLocalStore$/processErrorCode()
at flash.data::EncryptedLocalStore$/setItem()

Even more strange, it only threw this error with the app launched via Flex Builder. If I took the AIR file and installed and launched the application, there was no error.

I tried everything I could think of to start over, from recreating my project to reinstalling Flex Builder. Luckily, NoboG on the Adobe support forums pointed me in the right direction. All I had to do was delete the related files in ~/Library/Application Support/Adobe/AIR/ELS/

Now Flex Builder works again on my laptop, and I’m well pleased.

Comments

About my blog

I got a nice little troll comment from “bob” a bit ago. “bob” is under the impression that because I’m picked up by a particular aggregator, that I should never post about anything other than that aggregator’s subject.

Just to clarify to “bob” and anyone else, this is my personal blog, with a tech focus. Technology means I cover everything from Gadgets to web services to Flex and ColdFusion development. Personal means that I (seldomly) cover something that’s non-tech related.

“bob”, I have a couple suggestions. If you really think that I’m specifically posting things in order to take up valuable space in your reader, don’t flatter yourself. I’m going to bet there are readers or plugins for readers that let you filter out specific blogs so you can filter mine out and stop pestering me. Or, if you think that technology posts shouldn’t be on a technology blog, feel free to complain to the aggregator in question. If anything, you should have complained about the Red Roof Inn posts.

I welcome everyone to offer constructive criticism on my posts, but flat-out complaining about the content on my blog won’t be tolerated. And next time, “bob”, leave your real email address so I can address you directly instead of wasting everyone else’s time with a post like this.

Comments

Gmail IMAP going down?

I’ve just had two of my Gmail accounts start returning the “IMAP is not availablef or your account” error. Both are Google Apps accounts.

Anyone else having this problem?

Comments

Watch your site degrade in different versions of IE

For anyone who might not know, Microsoft provides VirtualPC virtual machines for free, so you can test against multiple versions of IE on different versions of Windows (XP or Vista).

Download the virtual machines here

They VM’s are pre-activated, and expire every few months, but then they release new VM’s.

Now, you can see first-hand what a crappy browser IE is, regardless of version. 🙂

Comments

Shan’s Simple Examples: Start to Finish, using Ant with Flex for the first time

Disclaimer: This post is not about best practices or anything of that sort. This is just a recount of my first attempt at using Ant with an open-source Flex library project.

Here are the steps I went through (well, minus the steps that did nothing) to get my first Ant build script up & running;

Installing Ant

There were a few steps to get a Flex Builder standalone install up to speed to do stuff with Ant. Eclipse users might or might not need to do these steps.

  • Install Ant (Thanks, Judah!)
    1. In Flex Builder, go to Help > Software Updates > Find and Install
    2. Search for new features to install
    3. Select “The Eclipse Project Updates”
    4. Select The Eclipse Project Updates > Eclipse 3.3.2 > Eclipse Java Development Tools…
    5. Finish the installation process, including restarting Flex Builder
  • Install SVNAnt (Thanks, Phill!)
    1. Download the SVNAnt binary from http://subclipse.tigris.org/svnant.html
    2. Unzip the download, place all the .jar files in /lib/ in your Ant Install directory, which for Flex Builder is Flex Builder 3/plugins/org.apache.ant_${version_number}/lib/
  • Add needed libraries for FTP features
    1. Download the Apache Commons Net and Jakarta-ORO binaries
    2. Unzip both downloads, place all the .jar files in /lib/ in your Ant Install directory (same as above)
  • Finish configuring Ant
    1. Go to Window > Preferences > Ant > Runtime
    2. Click the Ant Home… button
    3. Choose your Ant Install directory (Flex Builder 3/plugins/org.apache.ant_${version_number}/). Be sure to NOT select the lib directory

Your Build Script

So you’ve got everything configured, now what? Let’s start with a build script. Explainations are in the comments. Keep in mind that these directory paths are for OS X, so Windows users will need to switch operating systems or use Windows paths. Probably easier to switch your OS.

  1. Create a build.xml in your project. Populate it with your build code (see my code exmaple below)
  2. Add the Ant view by going to Window > Other Views > Ant
  3. In the new Ant tab, right click and select Add Buildfiles. Select your build.xml file.
  4. Now, whenever you want to make a push, just hit the run button in the Ant tab.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<project name="MyProject" default="svn.live" basedir=".">
    <!-- set the taskdef's -->
    <taskdef resource="svntask.properties"/>
    <taskdef resource="flexTasks.tasks"/>
   
    <!-- set some properties -->
    <property name="TEMP_DIR" value="/tmp/MyProject_Temp/"/>
    <property name="FLEX_HOME" value="/Applications/Adobe Flex Builder 3/sdks/3.0.0/"/>
    <property name="APP_ROOT" value="~/Documents/Flex Builder 3/MyProject/"/>
   
    <target name="svn.live">
        <!-- clear out the temp dir -->
        <delete dir="${TEMP_DIR}"/>
       
        <!-- let's get the latest build from SVN to a temp directory -->
        <svn>
            <export srcUrl="http://svn.mysite.com/MyProject/trunk/" destPath="${TEMP_DIR}MyProject/"/>
        </svn>
        <echo>SVN Export Complete</echo>
       
        <!-- build the ASDocs from the source -->
        <exec executable="${FLEX_HOME}/bin/asdoc" failonerror="true">
            <arg line="-source-path ${TEMP_DIR}MyProject/"/>
            <arg line="-doc-sources ${TEMP_DIR}MyProject/"/>
            <arg line="-exclude-classes com.adobe.serialization.json.JSON com.adobe.serialization.json.JSONDecoder com.adobe.serialization.json.JSONEncoder com.adobe.serialization.json.JSONParseError com.adobe.serialization.json.JSONToken com.adobe.serialization.json.JSONTokenizer com.adobe.serialization.json.JSONTokenType"/>
            <arg line="-main-title 'My Big Project Docs'"/>
            <arg line="-output ${TEMP_DIR}MyProject/docs/"/>
        </exec>
        <echo>Docs Created</echo>
       
        <!-- build the latest swc from the source -->
        <exec executable="${FLEX_HOME}/bin/compc" failonerror="true">
            <arg line="-source-path ${TEMP_DIR}MyProject/"/>
            <arg line="-include-sources ${TEMP_DIR}MyProject/"/>
            <arg line="-output ${TEMP_DIR}MyProject/bin/MyProject.swc"/>
        </exec>
        <echo>SWC Built</echo>
       
        <!-- create zip files to upload -->
        <mkdir dir="${TEMP_DIR}zip/"/>
        <exec executable="zip" dir="${TEMP_DIR}">
            <arg line="-r ${TEMP_DIR}zip/MyProject.zip MyProject/"/>
        </exec>
        <echo>Source Zip Created</echo>
        <exec executable="zip" dir="${TEMP_DIR}MyProject/bin/">
            <arg line="${TEMP_DIR}/zip/MyProject.swc.zip MyProject.swc"/>
        </exec>
        <echo>SWC Zip Created</echo>
       
        <!-- upload files -->
        <ftp server="ftp.mysite.com"
            userid="username"
            password="password"
            passive="true"
            remotedir="path/to/upload"
        >
            <fileset dir="${TEMP_DIR}zip/"/>
        </ftp>
        <echo>Zip Files Uploaded</echo>
        <ftp server="ftp.mysite.com"
            userid="username"
            password="password"
            passive="true"
            remotedir="path/to/upload/docs"
        >
            <fileset dir="${TEMP_DIR}MyProject/docs/"/>
        </ftp>
        <echo>Zip Files Uploaded</echo>
    </target>
</project>

I’m not going to cover asdoc/compc/mxmlc command line options here, there’s plenty of great docs out there.
You can also read more about the svn task, exec task and ftp task at their respective documentation pages.

Now that you’ve got a start to finish example, go forth and Ant!

Comments