Kaju self-updater talk (v.2.x)

  1. ‹ Older
  2. 2 years ago

    For I have no idea what reason Kaju stopped working today, I always use the same updater app, same files same workflow. I build one version on Xojo2018R3 I pushed the update, worked well. then today I had to push another update , so like 1 week interval, same things same steps , the app does not work anymore .

    For the first debugging it seems that the app gets downloaded on the Temp folder, then it restarts but it stop on replacing the app with the new version. If I open the app from the temp folder it works well and no errors so somehow the copy script or whatever was there stopped working .

    any idea on this ?


  3. Kem T

    5 Dec 2018 Testers, Xojo Pro, XDC Speakers, MVP Connecticut
    Edited 2 years ago

    Do you set the UpdateInitiater property to nil in the App.Destructor App.Close?


    From the Read Me:

    Important: Kaju does its magic by launching a command-line script when the UpdateInitiater gets set to Nil, which should happen when the app quits. Unfortunately, that's not always true so you should force the issue by inserting App.UpdateInitiater = Nil into your App.Close event.

  4. Hi Kem,

    Well good to know that . so far I noticed and I guess it's weird that if I have more than one alpha or beta releases will not work, once I put final release it will work so in a way it ignores the stages, but not sure, I will put the nil and see what happens.


  5. @Kem T Do you set the UpdateInitiater property to nil in the App.Destructor App.Close?


    From the Read Me:

    Well it seems that fixed the issue, I just had to manually give the fixed release and it did the job for the next ones.

    Thanks again.

  6. Beatrix W

    2 Jan 2019 Testers, Third Party Store Europe (Germany)

    I'm trying to update to the latest version of Kaju.

    What is the security token doing?

    The update file now makes a security token:

     // Add a security token
      dim rawKey as string = Crypto.GenerateRandomBytes( 8 )
      dim encodedKey as string = EncodeBase64( rawKey, 0 )
      thisVersionData.Value( Kaju.kNameSecurityToken ) = encodedKey

    But the check is kinda strange:

     if thisElement.Lookup( Kaju.kNameSecurityToken, "" ) = "" then
         raise new KajuException( KajuLocale.kMissingReason + " security token", CurrentMethodName )
      end if

    There is only a check if the security token is there. Well, the token itself is only random bytes. Does this make sense?

  7. Kem T

    2 Jan 2019 Testers, Xojo Pro, XDC Speakers, MVP Connecticut

    Yes. Although it's probably not needed, it's there to ensure the signature of otherwise identical data will be different.

  8. Beatrix W

    2 Jan 2019 Testers, Third Party Store Europe (Germany)

    Thanks for the info.

  9. last year

    Mike C

    13 Jan 2019 Testers, Xojo Pro North Carolina (USA)

    Kaju works great and thank you for making this project available to the community. It is well written, powerful, and very easy to implement into our Xojo projects.


    Thank you @Kem T and to all of the Kaju contributors.

  10. Martin T

    13 Jan 2019 Testers Germany

    @Kem T , do you plan to update the bundle to use it with the new URLConnection class (using compiler directives)?
    Great work!

  11. Kem T

    13 Jan 2019 Testers, Xojo Pro, XDC Speakers, MVP Connecticut

    Eventually, but I don't think it's a priority at this point.

  12. Kaju is working perfectly in the Mac version of my app, but I recently started working on the Windows version and it is failing. It seems that the connection is working to the server and getting/parsing the JSON file there is working, but the update window never opens. At one point I forced open the window at an early stage of processing and everything seemed to work. If I force it open later (for instance adding 'Self.Visible = True' at the end of the ChooseUpdate method then the app hangs there.

    Has anyone had similar trouble on Windows?

  13. After a day of fruitlessly experimenting (including building a new test app), I tried reverting to 2018 Build 3 (from build 4) and everything now works. I guess I'll try reinstalling Build 4 at some point to make sure the issue isn't due to corruption of the install but for now at least I can build my app.

  14. OK I'm actually not quite out of the woods. The update process works until the app is installed to Program Files. I'm guessing this is a permissions issue?

  15. Tim P

    16 Jan 2019 Testers, Xojo Pro Rochester, NY
    Edited last year

    It could be, but I know Kaju checks for permissions to write before starting the update check.

  16. Just checked and indeed it's failing the permission check. Is there a way to elevate permissions to enable overwriting the program file in Windows 10? I've been using Mac and UNIX machines for years but unfortunately I'm not much of an expert on Windows. It looks like by default Windows 10 always requires authentication to write to either of the Program Files directories. Am I the only one running into this issue?

  17. Kem T

    16 Jan 2019 Testers, Xojo Pro, XDC Speakers, MVP Connecticut

    Probably not, but no, there is no way to elevate permissions at this time.

  18. Got it. One possible (easy but unsafe) solution is to have the installer change the permissions of the install directory to allow write access. The only other solution I can think of is to have the updater download an installer instead of the application files themselves. I may give that a shot.

  19. Kem T

    17 Jan 2019 Testers, Xojo Pro, XDC Speakers, MVP Connecticut

    The second is a possibility, yes, and probably easier than elevating permissions.

  20. I have been playing around an am trying to use Kaju to update a linux app running on raspberry pi. I am having trouble figuring out what problem I am running in. I disabled the check for debugbuild to make sure I can run it with the debugger and run in the issue that if I step through updater.Execute method, all conditions are met and it shows there is an update available. But if I don't put in breakpoints and just let it run, it does not find the update. So I suspect there is a comms timeout setting somewhere which needs to be adjusted. I see a hard code "5" which seems to be the timeout, but am not confident enough to just start changing it. Would it make sense to change all hard coded numbers "5" with a constant and then tune it so it works?

    The windows version has no issues.

  21. Kem T

    5 Feb 2019 Testers, Xojo Pro, XDC Speakers, MVP Connecticut

    I guess you can try it, but that doesn't sound like it'd be the issue.

  22. Newer ›

or Sign Up to reply!