{"record":{"id":"bf0fb7e09b595fdf","repo":"zed-industries/zed","slug":"screen-was-already-shared","errorCode":null,"errorMessage":"screen was already shared","messagePattern":"screen was already shared","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/call/src/call_impl/room.rs","lineNumber":1485,"sourceCode":"                            cx.notify();\n                            Err(error)\n                        }\n                    }\n                }\n            })?\n        })\n    }\n\n    pub fn share_screen(\n        &mut self,\n        source: Rc<dyn ScreenCaptureSource>,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<()>> {\n        if self.status.is_offline() {\n            return Task::ready(Err(anyhow!(\"room is offline\")));\n        }\n        if self.is_sharing_screen() {\n            return Task::ready(Err(anyhow!(\"screen was already shared\")));\n        }\n\n        let (participant, publish_id) = if let Some(live_kit) = self.live_kit.as_mut() {\n            let publish_id = post_inc(&mut live_kit.next_publish_id);\n            live_kit.screen_track = LocalTrack::Pending { publish_id };\n            cx.notify();\n            (live_kit.room.local_participant(), publish_id)\n        } else {\n            return Task::ready(Err(anyhow!(\"live-kit was not initialized\")));\n        };\n\n        cx.spawn(async move |this, cx| {\n            let publication = participant.publish_screenshare_track(&*source, cx).await;\n\n            this.update(cx, |this, cx| {\n                let live_kit = this\n                    .live_kit\n                    .as_mut()","sourceCodeStart":1467,"sourceCodeEnd":1503,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/call/src/call_impl/room.rs#L1467-L1503","documentation":"Error \"screen was already shared\" thrown in zed-industries/zed.","triggerScenarios":"Thrown at crates/call/src/call_impl/room.rs:1485 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}