Skip to content

server start downloads 307 MB JAR before checking Java version #258

Description

@nthmost-orkes

Summary

agentspan server start downloads the server JAR before it validates that a compatible Java is available. If Java is missing or too old, the user waits through a multi-minute download only to be told the install can't proceed.

Repro

# fresh install dir, no valid Java 21 on PATH/JAVA_HOME
agentspan server start

Output:

Downloading server JAR...
  URL: https://agentspan.s3.us-east-2.amazonaws.com/agentspan-server-latest.jar
Downloading  [██████████████████████████████]  100%  307.1 MB/307.1 MB
Download complete!
Error: Java 17.0.19 detected but Java 21+ is required.
  Install Java 21+: https://adoptium.net/
  Run 'agentspan doctor' for full diagnostics.

The Java check already exists (it ran after download). It just needs to run first.

Suggested fix

Reorder server start:

  1. Resolve & validate Java (using the same scanner as agentspan doctor).
  2. If Java fails, print the same error message and exit — before touching the network.
  3. Only then proceed to JAR download.

Environment

  • macOS 15 (Darwin 25.5.0, arm64)
  • agentspan CLI 0.1.10

User impact

A first-time user with Java 17 (or none) and a slow connection waits 1–10 minutes for a download that's guaranteed to be unusable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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