-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to install update because of app process running (Windows) #8026
Comments
I think this may be fixed in the |
@mmaietta Do you have an idea when this PR will be included in a release? |
My apologies, I didn't realize that PR was in app-builder-lib for some reason. The PR changes are in |
@mmaietta thanks the quick reply. I tried again with FYI, I can see that the process hanging has a long name, which according to #7955 might be a problem, but since this one supposedly fixed the issue, I'm not sure if the problem is something else. To be more exact, the process hanging name has 28 characters. Tomorrow I will try renaming my application to a smaller name and try again, and reply back here with my findings. |
@mmaietta I just tested and even with a small process name (8 characters), it stills fails to kill the process and install the update. EDIT: EDIT 2:
That is probably the issue that this script is encountering and why it can't kill the process. I tested and I can successfully kill the process by running |
I have applied the "workaround" mentioned above using |
@mmaietta any input on this? |
Hmmm, we need the username filter to make sure we don't kill all apps by other users logged in on the system, right? This would be applicable for user-isolated installations ( I'm not too familiar with nsis scripting or with |
I'm not very familiar with it either, and I forgot most things I found when I did this. But as far as I remember, there are ways to filter by username, but it's not a one liner like Feel free to close this issue if you don't think this will be a problem for other users. If I have some time in a few days, I can try to get back at this and add the filter by username, then I could create a PR. |
This is not a usable solution, creates issues when auto upgrading the application as it creates a race condition between old and new instances. |
What do you mean by "creates a race condition"? Both commands terminate the old instances before applying the update. The only issue I can see is what was discussed above. |
So, if I utilize the task kill command, when I have a lot of devices out in the field, it looks as though, as the device is transitioning between the old version and the new version that there are occasions when this command is killing both the old and the new versions and then no version is running. Appears to be worse on slower machines. My guess is this has something to do with the transition between the old version and the new version. |
I see, so it still might be a problem with the filters, since it's killing based on the name, and not PID, it might kill both if they are running at the same time. If my assumption is correct, it's still all tied to the filters missing, which is possible to implement, but in my solution, I didn't. |
I'm having an issue with WIndows when trying to install the update.
The problem is that after quitting the app, there's a process "hanging" that is not closed after quitting the app, which gives the user an error when trying to update the app.
I know that this issue is not on
electron-updater
side, but I'm wondering if there's anything I can do to force electron-updater to close any running process of my application, because this process that doesn't quit is a bug under investigation in another library, and it doesn't seem like they will fix it quickly.Examples:
When I run
.quitAndInstall()
, the UI will show to the user that the application is running and he needs to close, and it won't work unless the user go to task manager and close the running process.I also tried adding isSilent and isForceRunAfter to true, but what happens is that the app closes to install in silent mode, but it doesn't open again (probably because it failed to install), but since it's on silent mode, it won't show any errors to the user.
The text was updated successfully, but these errors were encountered: