Skip to content

[BUG] Create new instance from template with empty (default) name does nothing #295

@timegrinder

Description

@timegrinder

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Creating a new instance from a template without populating the name field appears to work but breaks silently in the background, continuing to show 'Creating instance. This might take a while...' even if there is no existing instance with that template name.

Expected Behavior

One of:

  • The prefilled default name to actually be checked / passed to the instance creator if not in use
  • A warning / error regarding manual entry in the field being required
  • Similar other fix as you see fit

And possibly:

  • The exception to be passed back to the GUI and handled to show the user that there was at least an error

Steps To Reproduce

  1. Create a template from an instance
  2. Rename the template OR delete the original instance
  3. Create a new instance from the template without populating the name field (leaving the prefilled example name)
  4. (a) See Creating instance. This might take a while... appear in GUI with no end
  5. (b) wslmanager log file produces error:
<asynchronous suspension>
#1      Templates.useTemplate (package:wsl2distromanager/api/templates.dart:48)
<asynchronous suspension>
#2      _TemplatePageState.build.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:wsl2distromanager/screens/template_screen.dart:142)
<asynchronous suspension>

Environment

- Windows Version: Windows 11 Pro 10.0.26200
- WSL Distro Manager Version: v1.10.0
- WSL Version: 2.6.3.0
- Source: GitHub releases

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions