SeleniumHQ / selenium-ide

Open Source record and playback test automation for the web.
https://selenium.dev/selenium-ide/
Apache License 2.0
2.73k stars 739 forks source link

bug or feature request? can't update Selenium IDE 4 alpha releases in Windows 10 without manually uninstalling previous version #1754

Open BartolomeSintes opened 5 months ago

BartolomeSintes commented 5 months ago

🐛 Bug Report

In a Windows 10 PC, if Selenium IDE 4.0.1-alpha is already installed, you can't install a later version without manually uninstalling the previous version. I the previous version is manually uninstalled, the later Selenium IDE version is installed without problems. Until this problem is solved, perhaps a note should be added the Installation section in the README.md file.

To Reproduce

Install Selenium 4.0.1-alpha.n1-windows (n1 < last release) Install Selenium 4.0.1-alpha.n2-windows (n2 > n1)

Expected behavior

The installer should uninstall the previous version.

Actual behavior

The installer hangs and shows an error window that says "Cannot close Selenium IDE. Please close the application manually and click retry to continue." (translation from Spanish) Screenshot (in Spanish, sorry) imagen

Environment

OS: Windows 10 Selenium IDE Version: 4.0.1.alpha

toddtarsi commented 5 months ago

@BartolomeSintes - Ah, thank you for reporting! Looks like my setup exe and my application have a naming conflict:

https://github.com/electron-userland/electron-builder/issues/6329

Will resolve in the next couple days. Thank you!

toddtarsi commented 5 months ago

@coinzdude - Looks like your issue isn't a code signing thing after all. I should have this resolved later this week.

BartolomeSintes commented 5 months ago

👍

toddtarsi commented 5 months ago

Okay, so unfortunately, the fix listed above wasn't it. For now, I'm considering turning off one-click for nsis based installs. I want to see if issues arise in certain configurations that aren't in others, like maybe machine level installs vs user level installs or something like that.

More long term, I'm going to look at turning on auto-updates:

https://www.electron.build/auto-update

This way installing new versions on update should basically not be much of a standard use case anyway.

BartolomeSintes commented 5 months ago

If you need help for testing the installers in Windows 10 or Windows 11, I can do it. Just let me know.

toddtarsi commented 5 months ago

@BartolomeSintes - Thank you, I should have a release with a bit of all of the things later tonight.

toddtarsi commented 5 months ago

On x.80, I switched nsis from one-click to assisted installs. This might not do much and if needed, I can switch to one-click again later. Further, the big part of this work will be enabling auto-update via electron-updater, but that will be later.

BartolomeSintes commented 5 months ago

I have try to install x.80 over a x.79 installation. The installer offers the choice of installing for one user or for every user, but none of both can update. Perhaps you could add a warning as the first step of the installation, like "Please, manually uninstall any previous version of Selenium IDE before installing this new version".

toddtarsi commented 5 months ago

I'll look into setting up electron-updater as the next feature. Ideally I can just make it where you download updates using in-app tooling rather than having to do a full re-install for updates.

toddtarsi commented 5 months ago

@BartolomeSintes - I have autoUpdater configured for windows, and I have a favor to ask. Can you go through the pain of installing the second most recent version? If you start from second most recent, does it show you that an update is available and do the work of getting you onto the latest vrsion?

BartolomeSintes commented 5 months ago

Of course, I am glad to help you, but I am sorry to say that the update has failed. Tested in Windows 10. I have uninstalled Selenium IDE and deleted the Selenium IDE folder (C:\Users\xxx\AppData\Roaming\selenium-ide). I have installed alpha 89 (just for current user, the default option). I have started Selenium IDE (by the way I miss an "About" option in the Help menu showing which version is installed) A message telling a new version is available has been shown for some seconds imagen Then a second message has been shown imagen I have click Restart (the default option) but nothing has happened. I have then click Ok and the message has closed. I have open a .side file and it worked, but I was not sure which version I was running (89, I guess). I have closed Selenium IDE. I have opened Selenium IDE and the same two messages have been shown. As the Restart option did nothing, I have clicked OK An error message has been shown (Failed uninstalling old installation files. Try again later.: 2) imagen I have closed the error message and reopened Selenium IDE. The messages telling a new version is available are shown again. Selenium IDE is then usable, but every time I have closed Selenium IDE the update has failed. By the way, as I have closed and opened Selenium IDE several times, sometimes chromedriver.exe process keeps running and Selenium can not start: imagen I have had to manually kill the chromedriver.exe process (using the Windows Task Admin) imagen

toddtarsi commented 5 months ago

Yuck, the auto updater might be bubbling an issue out now. Thanks for the heads up, I'll fully disable it in the next version. Looks like the fix here is just going to be getting code signing for the app.

BartolomeSintes commented 5 months ago

OK. Perhaps autoupdating an alpha application is not a good idea ;-) By the way I have seen that a lot of github repositories put a "pre-release" or "latest" label in each release. For instance, in the Brave browser release page https://github.com/brave/brave-browser/releases there are a lot of releases, but most are labelled "pre-realease". Some of them are labelled "latest" and only these ones are shown in the main page of the repository https://github.com/brave/brave-browser. Perhaps you could mark "dangerous" alpha versions like alpha 89 as "pre-release" and "safe" alpha versions like alpha 83 as "latest".

toddtarsi commented 5 months ago

@BartolomeSintes - I appreciate these thoughts, and I agree. It's time for my to start blessing versions with a 'beta' tag, as 'alpha' is a pretty unsafe channel. I'd be happy to mark any of these versions as such if you think they're stable. Yeah, I want to direct users somewhere other than alpha at this point.

BartolomeSintes commented 5 months ago

My use case of Selenium IDE is very limited. I manually write .side files that check some very simple PHP applications. I use Selenium IDE for playing these .side files, not for recording them, so I have only tested a small set of Selenium IDE. At this moment, I am using alpha 83 and I would say this version is usable (for my use case) and it could be marked as "latest" or "beta" (whichever name you prefer). But keep in mind that beta status will attract more users, i.e. more bug reports and feature requests ;-)

toddtarsi commented 5 months ago

That's okay, I like more bug reports and feature requests. A lot of times, users from one bug report help users from the other bug report 😆

I'm going to mark v83 as a beta release later tonight.

toddtarsi commented 5 months ago

@BartolomeSintes - Okay, I didn't end up marking v83 as a beta release yet, but the latest release is quite stable. All tests passed and I've been using it all weekend to test. If that looks good, I'll mark it with a new tag. Figuring out tags and different release processes is not my favorite thing, but I need to do it so users aren't getting a good version 1/5 times.

BartolomeSintes commented 5 months ago

A different approach could be the one the subsurface developers do. They have a release page: https://github.com/subsurface/subsurface/releases and a nightly builds page: https://github.com/subsurface/nightly-builds/releases Every time they make a commit a new version is published in the nightly builds page I agree that it is not easy to decide which nightly version is stable enough to be published as stable, but keeping separate release pages can help the users to choose the right one for them.

toddtarsi commented 5 months ago

@BartolomeSintes - I appreciate that! Later tonight, I'll peek over their github workflows.

BartolomeSintes commented 4 months ago

Are you planning to release a version soon? I mean windows installer, etc. Last one is alpha 90.

coinzdude commented 4 months ago

I'm not sure where the releases link is, or how I got here, but there is currently up to .96 here https://github.com/SeleniumHQ/selenium-ide/releases?page=

BartolomeSintes commented 4 months ago

If I open the page https://github.com/SeleniumHQ/selenium-ide/releases, the last release I see is .90 imagen

coinzdude commented 4 months ago

cool!

image

coinzdude commented 4 months ago

Are you behind a proxy? Seems like you have an old page there

toddtarsi commented 4 months ago

@coinzdude @BartolomeSintes - No it's my fault! I'm sorry, I forgot, I switched releaser libraries a while back to try and get auto-updating into windows, but it requires code signing 😮‍💨

@coinzdude - You see that because of your past as a maintainer.

@BartolomeSintes - I am so sorry, releasing right now!

toddtarsi commented 4 months ago

@BartolomeSintes - Okay I lied, I'm releasing in like 15 minutes. First I'm disabling auto-updating on all platforms because that was a bad time ☚ī¸ . But in 15, I'll cut the release. I think it's quite nice as an RC too, it's very stable and recording and many other things have been tested. I'm excited for your feedback!

toddtarsi commented 4 months ago

@BartolomeSintes - Alright, v97 is released. It's got the drawer working a bit better (selector popping out from the top will come next so you can do everything w/o drawer if you want, but we'll get there later).

BartolomeSintes commented 4 months ago

Thank you very much for the release. I'll test it. I think you are aware of it, but just for the record, installation of alpha 97 over an existing alpha 83 installation in a Windows 10 PC has failed. Manually uninstalling previous version and installing the new version keeps working OK as before. Let's hope code signing will solve this issue. By the way when the installer is started (both alpha 83 and alpha 97), Windows 10 shows a scary warning message telling that the application is unknown and there may be dragons ;-) I suppose this is related to code signing too. imagen

toddtarsi commented 4 months ago

@BartolomeSintes - I am aware here. Tbh I am basically taking every one of these issues and screaming about them in the working group until the SFC gives me code signing certificates