---
title: "DF8003: connectionMeta() Before Hub Instance Ready"
description: "connectionMeta() was called before initHub finished initializing."
canonical_url: "https://devfra.me/errors/df8003"
---
# DF8003: connectionMeta() Before Hub Instance Ready

> connectionMeta() was called before initHub finished initializing.

## Message

> connectionMeta() was called before initHub finished initializing.

## Cause

`initHub` is a synchronous factory that kicks off asynchronous initialization eagerly, creating the hub context, mounting every frame, and binding the WebSocket tier. `connectionMeta()` describes the WebSocket binding, which only exists once that initialization completes; calling it earlier has nothing correct to return.

## Example

```ts
import { initHub } from '@devframes/hub/initiate'

const hub = initHub({
  base: '/__devframes/',
  devframes: [git]
})
hub.connectionMeta() // ✗ throws DF8003: init is still in flight

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

## Fix

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

## Source

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


## Sitemap

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