Skip to content

snapshot create shows connection error despite successful completion #3387

@vishnukool

Description

@vishnukool

Description

When running daytona snapshot create, the command shows an error about failing to connect to the server, but the snapshot is still created successfully. This is confusing UX as it's unclear if there was an actual failure.

Steps to Reproduce

daytona snapshot create bla --dockerfile ./scripts/Dockerfile.daytona

Actual Output

ERRO[0000] Failed to connect to server: Get "https://app.daytona.io/api/snapshots/469529e9-6a68-4da3-8bfd-503ca084cb18/build-logs?follow=true": context canceled 
                                                   
 Snapshot bla successfully created
                                                   
 ✓ Run 'daytona sandbox create --snapshot bla' to create a new sandbox using this snapshot

Expected Behavior

Either:

  1. No error should be shown if the snapshot was created successfully
  2. The error should be a warning or info message if the build-logs endpoint is optional

Analysis

It appears the CLI is trying to follow the build logs via GET /api/snapshots/{id}/build-logs?follow=true, but the context gets canceled. Since the snapshot creation itself succeeds, this seems like either:

  • A race condition where the log streaming connection is attempted before/after the build completes
  • The build-logs endpoint timing out or being unavailable, but not being critical to the operation

Environment

  • Daytona CLI (latest)
  • macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions