Skip navigation
Adam Adamczyk
Currently Being Moderated

Error 16828 when update from native Windows installer

Dec 19, 2010 9:08 AM

Dears,

 

I have noticed error 16828 when I tried to update AIR application.

 

Steps to reproduce (AIR 2.5.1):

 

1. Prepare AIR

2. Prepare Native windows installer (*.exe)

3. Install application from native windows installer

4. Run application updater

5. Download new application air file and start install

6. You will get 16828 error.

 

Does anybody know how to solve this problem?

I know (too late) that updating native application with build-in updater (air.update.ApplicationUpdaterUI) is not possible and I have to use NativeApplicationUpdater library.

 

Unfortunately we have many users with installed Windows native application with buggy updater class. Each time when they tried to update they will get this an error with so misleading error description.

 

thanks in advance

Adam

 
Replies
  • Chris Campbell
    8,600 posts
    May 4, 2010
    Currently Being Moderated
    Jan 13, 2011 4:29 PM   in reply to Adam Adamczyk

    Hi Adam,

    Have you gotten any help with this yet?  Error 16828 comes out to be "Cannot update application, usually because the application is running in the AIR Debug Launcher (ADL)."  So, it sounds like your app is still running.  Would it be possible to exit the app as soon as the update process is started?

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 14, 2011 12:06 AM   in reply to Adam Adamczyk

    Hello.
    I too have this problem 16828 and AIR 2.5.1

    How to solve this problem?

    Thank you in advance

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 24, 2011 9:34 AM   in reply to Adam Adamczyk

    I am also running into this problem.

     

    I found the following statement in the AS3 Reference materials. "The AIR update framework is only supported in the desktop profile. It is not supported for extended desktop applications (applications installed with a native installer), and it is not supported on the mobile profile (iPhone applications written with ActionScript 3.0). Check the Updater.isSupported property at runtime to see if the update framework is supported."

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/air /update/ApplicationUpdaterUI.html

     

    Does this mean that it is not possible to automatically update from within an air application installed from a flash compiled exe?

     

    Thanks,

    Brad

     
    |
    Mark as:
  • Chris Campbell
    8,600 posts
    May 4, 2010
    Currently Being Moderated
    Jan 24, 2011 2:14 PM   in reply to brfluchel

    Hi Brad,

    The built in AIR Updater Framework does not have support for native applications (built using native installers and the extended desktop profile.)  However, should be able to implement this functionality yourself by either using the separate NativeApplicationUpdater API built by Piotr Walczyszyn or having your app determine when an update is available, download then launch the installer using the native process api.

     

    I'd also like to recommend checking out and voting for the feature request for this issue on our ideas.adobe.com site.

     

    Thanks,

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 25, 2011 1:41 AM   in reply to brfluchel

    Hi, Brad

     

    I was able to run .exe renewal in accordance with "extendedDesktop"

    The principle of the following

     

    <Code>

     

    airFile = File.applicationStorageDirectory.resolvePath(folderUpdate + '/updateCode.exe');

     

    private function StartUpdate () : void {

         ...

                        var npsi : NativeProcessStartupInfo = new NativeProcessStartupInfo();
                        npsi.executable = airFile;
                       
                        var nativeProcess : NativeProcess = new NativeProcess();
                        nativeProcess.start(npsi);
                        Reboot.CloseApp();

         ...

    }

     

    Close Apllication function

     

    public static function CloseApp () : void {
                var mgr:ProductManager = new ProductManager("airappinstaller"); 
                NativeApplication.nativeApplication.exit(); 
    }

     

    </Code>


    Run .exe through the console and close the application. If you do not close the updates will not start because of the running application.

    Everything works, but for me the way the data is not suitable.
    Another disadvantage is that the way to run an application can only Windows.

     
    |
    Mark as:
  • Currently Being Moderated
    May 27, 2012 1:02 PM   in reply to Adam Adamczyk

    Hi Adam,

     

    Did you ever find a solution to this?

     

    I'm trying to solve the same problem.  I'd appreciate any direction you can give me.

     

    Thanks,

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    May 27, 2012 11:08 PM   in reply to Chris McLaughlin

    No, only way was installing new version from exe or air directly.

     

    Adam

     
    |
    Mark as:
  • Chris Campbell
    8,600 posts
    May 4, 2010
    Currently Being Moderated
    May 29, 2012 5:24 PM   in reply to herbat

    Assuming we're talking about updating a native installer AIR app, please see this ADC doc for more details:

     

    Updating Adobe AIR applications packaged with a native installer

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2012 8:35 AM   in reply to Chris Campbell

    Hi Chris,

     

     

     

    Thanks for the link.  I’m working in Flash Professional, and as far as I can tell the SWC developed by Piotr Walczyszyn is incompatible.  I started reading about using flex compiled SWCs in Flash and didn’t reach a conclusion one way or the other (there were varying opinions on the subject)  but it seems it might be easier to download the executable and launch the installer per Brad’s comment.  I don’t need to worry about version control as that is being handled on the server side—I’m being passed a code when an update is available.

     

     

     

    I’m curious to hear your thoughts re the SWC.

     

     

     

    Best,

     

     

     

    C.S.

     
    |
    Mark as:
  • Chris Campbell
    8,600 posts
    May 4, 2010
    Currently Being Moderated
    May 30, 2012 5:26 PM   in reply to Chris McLaughlin

    Hi C.S.,

    I hate to admit it, but I'm not very familiar with Flash Professional.  I've done all my work using Flash Builder.  I'd recommend posting over on the Flash Pro boards to see if anyone can confirm the swc issue.

     

    Chris

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2012 2:16 PM   in reply to herbat

    Hi,

     

    Using some of Voksel's code above.  I got an updater working.  For my app, I'm passed the parameter that tells the application when there is an update so I'm not doing anything with that but the rest is working.  If someone wants the sample files, I'll make them available.

     

    import flash.events.Event;

    import fl.events.ComponentEvent;
    import fl.controls.ComboBox;
    import fl.data.DataProvider;

    import flash.desktop.NativeProcess;


    var fileName:String = fileName = "AIR_updater.exe"
    var urlString:String;
    var urlReq:URLRequest;
    var urlStream:URLStream;
    var fileData:ByteArray = new ByteArray();

    /////**************************************** GET VERSION ********************************************
    /////***************************************************************** ********************************

    var appVersion:String;

    getAppVersion()

    function getAppVersion():void {
        var appXml:XML = NativeApplication.nativeApplication.applicationDescriptor;
        var ns:Namespace = appXml.namespace();
        appVersion = appXml.ns::version[0];
       version_tf.text = appVersion

    }

      
    urlString = "http://someAddress.com/SomeDirectory/AIR_updater.exe";
    path_tf.text = urlString
     

    downLoad_btn.addEventListener(MouseEvent.CLICK, downloadFile)

    function downloadFile(evt:Event):void {
    downLoad_btn.visible = false
    urlReq = new URLRequest(urlString);
    urlStream = new URLStream();
    urlStream.addEventListener(Event.COMPLETE, loaded);
    urlStream.load(urlReq);
    }


    function loaded(event:Event):void {
        urlStream.readBytes(fileData, 0, urlStream.bytesAvailable);
        writeAirFile();
    }

    function writeAirFile():void {
        var file:File = File.applicationStorageDirectory.resolvePath(fileName);
        var fileStream:FileStream = new FileStream();
        fileStream.open(file, FileMode.WRITE);
        fileStream.writeBytes(fileData, 0, fileData.length);
        fileStream.close();
        path_tf.text = "The file is written.";
    StartUpdate();
    }

    var airFile:File = File.applicationStorageDirectory.resolvePath(fileName);

    function StartUpdate () : void {
    var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
    npsi.executable = airFile;
    var nativeProcess:NativeProcess = new NativeProcess();
    nativeProcess.start(npsi);
    path_tf.text = "startingUpdate.  Closing application";
        CloseApp();
    }

     

    /////Close Apllication function


    function CloseApp () : void {
    var mgr:ProductManager = new ProductManager("airappinstaller");
    NativeApplication.nativeApplication.exit();
    }

     
    |
    Mark as:
  • Chris Campbell
    8,600 posts
    May 4, 2010
    Currently Being Moderated
    Jun 18, 2012 2:44 PM   in reply to Chris McLaughlin

    Excellent, thank you for sharing!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points