Adobe AIR – common auto-update issues when upgrading your app to AIR 2.0

Earlier this week, I was updating an AIR app originally built on AIR 1.1 to AIR 2.0.   I changed my namespace to 2.0 (so I could take advantage of some new AIR 2.0 specific APIs), built my .airi file, signed it and tried to install it.  I expected it to prompt me to upgrade my existing version but instead, I got the following error:

Sorry, an error has occurred. The application could not be installed because an application with that name already exists at the selected installation location. Try installing to a different location.”

This also breaks auto-update.  You’ll get the following error:

This application cannot be installed because this installer has been mis-configured.  Please contact the application author for assistance.

After doing a bit of research, I discovered that a change was made starting with AIR 1.5.3 with how publisher IDs are generated.  When you switch from a namespace prior to 1.5.3 to 1.5.3 or later, the assigned publisher ID will be different unless you override.

The solution is simple and documented here.

Here’s the quick version of what you need to do:

  1. Determine your application’s current publisher ID. In an installed application, this is found in the META-INF/AIR/publisherid file.
  2. Add a <publisherID></publisherID> element in your descriptor, and copy your publisher ID into it.
  3. Update your application’s namespace to 1.5.3, 2.0 or whatever

Now when I try to install, it recognizes it as a newer version and gives me the dialog and upgrade experience I expected.

~ by Greg on June 18, 2010.

15 Responses to “Adobe AIR – common auto-update issues when upgrading your app to AIR 2.0”

  1. Thanks for the summary but now I get this runtime error “Error: EncryptedLocalStore may not use publisher IDs passed in from ADL” when trying to access the EncryptedLocalStore. Adding the publisherID to the run/debg configration does not work since it seems not supported for 1.5.3 and later.

  2. Thanks for the post. I’m running into the same issues upgrading our app to 2.0.

    I’m looking for the meta-inf dir or where to find my publisherID so I can try this fix. I use the IDE to publish the app.

    Do you know where I might find the pubID?

    • There are two ways to get the publisherID that I know of:
      1) Go to where your application is installed and find the META-INF folder and in there you will see a file called publisherid that contains the ID. On MacOS, you’ll find it in /Applications/
      2) Another way to get it is programmatically in your app by printing NativeApplication.nativeApplication.publisherID


      • Thanks.

        1. I dont see the META-INF dir. Is it perhaps hidden?
        2. Tried this (outside of adl)… it does not print it out. Is it possible it would be blank?

  3. On a Mac right click the app and select show package contents.
    I found the bug/solution I ran into here:

  4. […] publisherID works differently so you have to add the publisherID to the XML descriptor like also described here. If you are not using EncryptedLocalStore you might be fine by now but otherwise you get this error […]

  5. […] See the original post […]

  6. Thank you. That really helped 🙂

  7. Nice, fixed my problem…

  8. Thank you!!, you save my day.

  9. BTW, Do you know how to tell where the new Runtime 2.0 is?.

    The client machines doesn’t have internet access to update the Runtime when my new AIR 2.0 version app appears, so it would be very usefull if I can publish the new Runtime where they can find it (LAN Area). Ïf so the Runtime update will be made with no user action as well the app does.

    Thank you again.

  10. Yep….but the clients doesn’t have internet access. You’re right I, and just I, can find the AIR runtime in but no my users.

    So, How do I tell AIR Runtime 1.5 that the new AIR Runtime 2.0 is not at but at my own url http://ServerIp/Air2.0?

    Anyone know?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: