---
title: "DF0013: Shared State Not Found"
description: "Shared state of \"{key}\" is not found, please provide an initial value for the first time"
canonical_url: "https://devfra.me/errors/df0013"
---
# DF0013: Shared State Not Found

> Shared state of "\{key}" is not found, please provide an initial value for the first time

## Message

> Shared state of "`{key}`" is not found, please provide an initial value for the first time

## Cause

`RpcSharedStateHost.get()` was called for a key that has no stored state yet, and no `initialValue` was passed.

## Fix

Pass `initialValue` on the first call: `ctx.rpc.sharedState.get(key, { initialValue: ... })`.

## Source

- [`packages/devframe/src/node/rpc-shared-state.ts`](https://github.com/devframes/devframe/blob/main/packages/devframe/src/node/rpc-shared-state.ts): `RpcSharedStateHost.get()` throws `DF0013` when neither an existing entry nor an `initialValue` is provided for a key.


## Sitemap

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