Skip to content

nanoCLR crashing on MacOS for update #1729

@Ellerbach

Description

@Ellerbach

Tool

Virtual nanoCLR

Description

On macOS, nanoclr crashes immediately when running commands such as version check or instance update. The process exits with an unhandled System.UriFormatException saying the hostname could not be parsed, and points to Program.Main line 47 in nanoFramework.nanoCLR.CLI.

How to reproduce

  1. Update or install the tool globally:
    dotnet tool update -g nanoclr
  2. Run either of these commands:
    nanoclr --version
    nanoclr instance --update
  3. Observe the crash:
    Unhandled exception. System.UriFormatException: Invalid URI: The hostname could not be parsed.
    ... at System.UriBuilder..ctor(String uri)
    ... at nanoFramework.nanoCLR.CLI.Program.Main(String[] args) ... Program.cs:line 47

Expected behaviour

nanoclr should run successfully on macOS for supported commands, including:

  • nanoclr --version
  • nanoclr instance --update
  • If instance update is not supported on macOS, the CLI should fail gracefully with a clear, user-friendly message instead of an unhandled exception.

Screenshots

No response

Aditional context

OS: macOS
Shell: zsh
Reproduced on nanoclr versions 1.1.173 and 1.1.169
dotnet tool update -g nanoclr succeeds, but invoking nanoclr crashes
Likely cause is URI parsing of a filesystem path in Program.Main (line 47), which is not robust for Unix-style paths such as /Users/...

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions