Dwrandaz / AutoUpdateComponent

A library for enabling automatic updates for sideloaded UWP apps
MIT License
26 stars 5 forks source link

Problem when restart app on kiosk mode #2

Open hungnq-qest opened 4 years ago

hungnq-qest commented 4 years ago

We are developing a POS application which will be setup at our stores. This app is an UWP application which run on Windows 10 IOT LTSC - Kiosk Mode and we decided to deploy using side-loading.

We have used your library to implement the application :)

On desktop mode, It works well with out any problem. After update process, the application will be restarted and the new version will be loaded. But on kiosk mode, sometimes after updated, the application can't restart:

After update process, the application try to restart but it stuck on blue windows with loading spinner.

We also try waiting for a few hours but nothing change

If we try force restart device (use power off button) then after logged on kiosk mode, the application will be loaded with new version.

We have been tested the update process for about 20 times and just 1 times this problem occurred.

If you know about this problem, please help us.

mhmd-azeez commented 4 years ago

Hi @hungnq-qest, I am happy that the library has been useful for you. I myself have not used it in kiosk mode, but sometime ago some other person had trouble with it as well. This is what they wrote me:

Email 1:

I have this integrated into an application I am working and it works probably how you would expect it would - except when I load the app in Assigned Access Mode (Kiosk Mode). When properly into Assigned Access mode, the app ends updating and then getting stuck in a crash loop.

Email 2:

It looks like my problem is solved. Apparently running the update functionality at app startup time was problematic. After an install/restart is where the app would crash in Assigned Access mode. For troubleshooting purposes I moved the update call behind a button click and found that that works just fine. So I introduced a delay in checking for the update so it does not happen immediately upon the app booting and all appears to be working well now.

I don't know if you're experiencing the same issue, but apparently introducing a little bit of delay in checking for updates solved his problem.

hungnq-qest commented 4 years ago

thanks @encrypt0r, I'll try that way to see if that solves the problem :)

mhmd-azeez commented 4 years ago

@hungnq-qest Great. Please let me know if it fixes your problem so that I can add the solution to the troubleshoots section of the read me.

hungnq-qest commented 4 years ago

We have tried, but the problem still occurred :(

mhmd-azeez commented 4 years ago

I see, I am sorry @hungnq-qest I don't know any other fixes for that

mykebates commented 4 years ago

Hey all. That was my email copy referenced above. The issue still does come up for us too. It doesn’t happen 100% of the time, though, so trying to track down the issue has proven to be nearly impossible.

When I sent that email previously it looked like we were in the clear but unfortunately not. Sorry!

mhmd-azeez commented 4 years ago

@mykebates Thank you for your input

mhmd-azeez commented 4 years ago

Related: https://docs.microsoft.com/en-us/answers/questions/25947/uwp-problem-when-restart-app-on-kiosk-mode.html

Berglund81 commented 3 years ago

@mykebates and @hungnq-qest are you still working on this or have you given up? I have experienced the exact same problem. In my case it feels like the problem disappeard if I create the Kiosk account directly under "Configure Kiosk". I.e. I add a new assigned access acount. I do not first add a user acount and give that assigned access. For some reason this makes a difference for me. No clue why! For me this works on the new kiosk account if I use the command: Packagemanager.RequestAddPackageByAppInstallerFileAsync(***); It still gets stuck after update when trying to restart if I try to use command: Packagemanager.UpdatePackageAsync(***); But if I use command Packagemanager.RequestAddPackageAsync(***) it works.

mykebates commented 3 years ago

@Berglund81 Yeah, we ended up moving away from a native app all together for a number of reasons :(