---
outline: deep
---

# DF0054: connectionMeta() Before Instance Ready

## Message

> connectionMeta() was called before initDevframe("`{id}`") finished initializing.

## Cause

`initDevframe` is a synchronous factory that kicks off asynchronous initialization eagerly — running `def.setup`, binding the WebSocket tier, and mounting the routes. `connectionMeta()` describes the WebSocket binding, which only exists once that initialization completes; calling it earlier has nothing correct to return.

## Example

```ts
import { initDevframe } from 'devframe/initiate'

const devtools = initDevframe(def, { base: '/__my-tool/' })
devtools.connectionMeta() // ✗ throws DF0054 — init is still in flight

await devtools.ready
devtools.connectionMeta() // ✓ { backend: 'websocket', websocket: { … } }
```

## Fix

Await `instance.ready` (or any request through `instance.handler` — it awaits readiness internally) before reading `connectionMeta()`.

## Source

- [`packages/devframe/src/adapters/initiate.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/adapters/initiate.ts) — `initDevframe`'s `connectionMeta()` throws this while initialization is still pending.
