pharo-project / pharo-launcher

Lets you manage your pharo images and download new ones
https://pharo-project.github.io/pharo-launcher/
MIT License
108 stars 46 forks source link

Handling of wrong Pharo version #615

Closed Gabriel-Darbord closed 1 month ago

Gabriel-Darbord commented 1 year ago

Describe the bug When an image has the wrong information inside 'pharo.version', trying to start it will fail with a message saying "Cannot detect Pharo executable in [folder]". Also, the error propagates to images created after this one, even if they have correct version information.

To Reproduce Steps to reproduce the behavior:

  1. Open the Pharo launcher
  2. Create a new image which has incorrect information in 'pharo.version', this is currently the case for Moose Suite 10 (stable) in 'official distributions'
  3. Try to start the new image
  4. Observe the error message
  5. Create a new image, for example Pharo 12.0 - 64bit (development version, latest)
  6. Try to start this new image
  7. Observe the same error

Expected behavior There could be better error handling, or more information about the error (for example that the version comes from the 'pharo.version' file). Also, the error shouldn't propagate to newer images that have correct information.

Version information:

Bajger commented 1 year ago

@Gabriel-Darbord Hi Gabriel. I see different error than you describe. There is: image

Bajger commented 1 year ago

On which OS you're trying this? and ideally, what is version of Pharo launcher you use?

Gabriel-Darbord commented 1 year ago

Hi @Bajger, I edited the issue to add version information. However, now that I'm trying to reproduce it again, I'm getting the same "Error downloading..." as in your screenshot, and I can launch subsequent new images just fine. I'm not sure what changed on my end...

I showed the behavior in question to @demarey before opening the issue.

Bajger commented 1 year ago

I think it is error in Moose template, see related ticket.

Gabriel-Darbord commented 1 year ago

Indeed, @ClotildeToullec was already made aware. The issue here is not related to this Moose template in particular, but to the handling of the error, which could be clearer (more informative message) and more robust (no propagation like I had before).

ClotildeToullec commented 1 year ago

It is fixed for the Moose 10 image.

Bajger commented 1 year ago

The issue here is not related to this Moose template in particular, but to the handling of the error, which could be clearer (more informative message) and more robust (no propagation like I had before).

@Gabriel-Darbord What is your suggestion? I think your original error message (" Cannot detect Pharo executable in [folder]") you've is not reproducible. Or You'd like some better explanation than: "Error downloading " ?

demarey commented 1 year ago

Hi @Gabriel-Darbord What you showed me was an error "executable not found" when having a bad pharo.version number. You had an empty 10-x64 folder in the vms folder. I'm not able to reproduce that. I get an error saying there is no VM available for this version:

Error downloading 'https://files.pharo.org/get-files/10/pharo-mac-stable.zip'
404 Not Found

In this case, the error message is fine. Do you have a way to reproduce the error you showed me?

Gabriel-Darbord commented 1 year ago

I'm not able to reproduce the error that I showed you, even though I don't remember updating the launcher (not sure if the computer has even been restarted since).

However, when I have an empty 10-x64 folder in the vms folder and I try to edit the configuration of any image, I get an PhLExecutableNotFoundError: image And the choice of the VM is limited to the current one: image