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:
- Determine your application’s current publisher ID. In an installed application, this is found in the META-INF/AIR/publisherid file.
- Add a <publisherID></publisherID> element in your descriptor, and copy your publisher ID into it.
- 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.