cube-js/cube · error

Does not work for standalone mode yet

Error message

Does not work for standalone mode yet

What it means

The standalone-mode TransportService implementation stubs load_stream; it is not implemented because standalone CubeSQL cannot serve load requests without an attached Cube deployment. Calling it unconditionally panics with 'Does not work for standalone mode yet'.

Solutions

  1. Run CubeSQL in the mode connected to a Cube backend (meta transport) rather than standalone
  2. Configure the transport service implementation that actually implements load_stream
  3. Do not send load/query traffic to the standalone-mode service; use it only for supported paths

Example fix

// before
# standalone run
./cubesql standalone --port 15432
// after
CUBESQL_CUBE_URL=http://cube:4000 CUBESQL_CUBE_TOKEN=<token> ./cubesql
Defensive patterns

Strategy: fallback

Validate before calling

// detect standalone mode before sending load traffic
fn is_standalone_transport(svc: &dyn TransportService) -> bool {
    svc.mode() == TransportMode::Standalone
}
if is_standalone_transport(&service) {
    return Err("load requests unsupported in standalone mode".into());
}

Prevention

When it happens

Trigger: Issuing a load/query request through the transport (e.g. via the meta transport / SQL interface) against a CubeSQL instance running in standalone mode where load_stream was never wired to a real backend.

Common situations: Running the standalone binary instead of the meta-transport-connected service; experiments with direct load paths before configuring the Cube backend; missing transport wiring at startup.

Related errors


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/34c03e04176e8ea0. Report an issue: GitHub.

Appendix: source

Thrown at rust/cubesql/cubesql/src/transport/service.rs:413

        };
        let response =
            cube_api::load_v1(&self.get_client_config_for_ctx(ctx), Some(request)).await?;

        convert_transport_response(response, schema, member_fields)
    }

    async fn load_stream(
        &self,
        _span_id: Option<Arc<SpanId>>,
        _query: TransportLoadRequestQuery,
        _sql_query: Option<SqlQuery>,
        _ctx: AuthContextRef,
        _meta_fields: LoadRequestMeta,
        _schema: SchemaRef,
        _member_fields: Vec<MemberField>,
        _throw_continue_wait: bool,
    ) -> Result<CubeStreamReceiver, CubeError> {
        panic!("Does not work for standalone mode yet");
    }

    async fn can_switch_user_for_session(
        &self,
        _ctx: AuthContextRef,
        _to_user: String,
    ) -> Result<bool, CubeError> {
        panic!("Does not work for standalone mode yet");
    }

    async fn log_load_state(
        &self,
        span_id: Option<Arc<SpanId>>,
        ctx: AuthContextRef,
        meta_fields: LoadRequestMeta,
        event: String,
        properties: serde_json::Value,
    ) -> Result<(), CubeError> {

View on GitHub (pinned to 7d981676b3)