{"record":{"id":"9e3e61f07fdef3a8","repo":"zed-industries/zed","slug":"screen-was-not-shared","errorCode":null,"errorMessage":"screen was not shared","messagePattern":"screen was not shared","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/call/src/call_impl/room.rs","lineNumber":1676,"sourceCode":"            let should_change_mute = !live_kit.muted_by_user;\n\n            self.set_deafened(deafened, cx);\n\n            if should_change_mute && let Some(task) = self.set_mute(deafened, cx) {\n                task.detach_and_log_err(cx);\n            }\n        }\n    }\n\n    pub fn unshare_screen(&mut self, play_sound: bool, cx: &mut Context<Self>) -> Result<()> {\n        anyhow::ensure!(!self.status.is_offline(), \"room is offline\");\n\n        let live_kit = self\n            .live_kit\n            .as_mut()\n            .context(\"live-kit was not initialized\")?;\n        match mem::take(&mut live_kit.screen_track) {\n            LocalTrack::None => anyhow::bail!(\"screen was not shared\"),\n            LocalTrack::Pending { .. } => {\n                cx.notify();\n                Ok(())\n            }\n            LocalTrack::Published {\n                track_publication, ..\n            } => {\n                {\n                    let local_participant = live_kit.room.local_participant();\n                    let sid = track_publication.sid();\n                    cx.spawn(async move |_, cx| local_participant.unpublish_track(sid, cx).await)\n                        .detach_and_log_err(cx);\n                    cx.emit(Event::LocalScreenShareStopped);\n                    cx.notify();\n                }\n\n                if play_sound {\n                    Audio::play_sound(Sound::StopScreenshare, cx);","sourceCodeStart":1658,"sourceCodeEnd":1694,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/call/src/call_impl/room.rs#L1658-L1694","documentation":"Error \"screen was not shared\" thrown in zed-industries/zed.","triggerScenarios":"Thrown at crates/call/src/call_impl/room.rs:1676 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"}