---
title: "DF0054: connectionMeta() Before Instance Ready"
description: "connectionMeta() was called before initDevframe(\"{id}\") finished initializing."
canonical_url: "https://devfra.me/errors/df0054"
---
# DF0054: connectionMeta() Before Instance Ready

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

## 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`, which 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.


## Sitemap

See the full [sitemap](https://devfra.me/sitemap.md) for all pages.
