--- title: 'DF0007: AsyncLocalStorage Not Set' description: 'AsyncLocalStorage is not set, it likely to be an internal bug of the Devframe foundation' --- ## Message > AsyncLocalStorage is not set, it likely to be an internal bug of the Devframe foundation ## Cause `getCurrentRpcSession()` was called outside the RPC dispatch context. Usually indicates the RPC server hasn't been composed with the context transport binding (`createContextRpcServer`) or the caller is running before the async context is established. ## Fix Only call `getCurrentRpcSession()` from RPC handlers executed by the server. Report as a bug if you hit this inside a handler. ## Source - [`packages/devframe/src/node/host-functions.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/node/host-functions.ts): `getCurrentRpcSession()` throws `DF0007` when called outside the RPC dispatch async context.