zed-industries/zed · error · RpcError

UnsharedItem

UnsharedItem

Error message

UnsharedItem

What it means

While responding to a peer's open-buffer request, serialization of the buffer as an operation failed because the buffer's current state contains an item that cannot be shared (UnsharedItem), e.g. unsaved private content or unsupported operations.

Source

Thrown at crates/project/src/project.rs:5986

                });
                if is_private {
                    continue;
                }

                let buffer_id = this.update(cx, |this, cx| {
                    this.create_buffer_for_peer(&buffer, peer_id, cx).to_proto()
                });
                batcher.push(buffer_id).await;
            }
            batcher.flush().await;

            sender_task.await?;

            let _ = client
                .request(proto::FindSearchCandidatesChunk {
                    handle,
                    peer_id: Some(peer_id),
                    project_id,
                    variant: Some(proto::find_search_candidates_chunk::Variant::Done(
                        proto::FindSearchCandidatesDone {},
                    )),
                })
                .await?;
            anyhow::Ok(())
        });
        buffer_store.update(&mut cx, |this, _| {
            this.register_ongoing_project_search((peer_id, handle), task);
        });

        Ok(proto::Ack {})
    }

    async fn handle_open_buffer_by_id(
        this: Entity<Self>,
        envelope: TypedEnvelope<proto::OpenBufferById>,
        mut cx: AsyncApp,

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Save the buffer so it can be shared from disk
  2. Ensure the file is not marked private
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/project/src/project.rs:5881 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/71280526259e3086. Report an issue: GitHub.