{"record":{"id":"976b0f87e696bf42","repo":"zed-industries/zed","slug":"screen-sharing-was-canceled-permission-was-denied","errorCode":null,"errorMessage":"Screen sharing was canceled, permission was denied, or the PipeWire connection failed. You can try again from the screen share button.","messagePattern":"Screen sharing was canceled, permission was denied, or the PipeWire connection failed\\. You can try again from the screen share button\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/livekit_client/src/livekit_client/linux.rs","lineNumber":191,"sourceCode":"    });\n\n    let executor = cx.background_executor().clone();\n    let video_source = video_source_rx\n        .next()\n        .with_timeout(Duration::from_secs(PIPEWIRE_TIMEOUT_S), &executor)\n        .await\n        .map_err(|_| {\n            stop_flag.store(true, Ordering::Relaxed);\n            log::error!(\"Wayland desktop capture timed out.\");\n            anyhow::anyhow!(\n                \"Screen sharing timed out waiting for the first frame. \\\n                 Check that xdg-desktop-portal and PipeWire are running, \\\n                 and that your portal backend matches your compositor.\"\n            )\n        })?\n        .ok_or_else(|| {\n            stop_flag.store(true, Ordering::Relaxed);\n            anyhow::anyhow!(\n                \"Screen sharing was canceled, permission was denied, or the PipeWire \\\n                 connection failed. You can try again from the screen share button.\"\n            )\n        })?;\n\n    let track = super::LocalVideoTrack(track::LocalVideoTrack::create_video_track(\n        \"screen share\",\n        RtcVideoSource::Native(video_source),\n    ));\n\n    Ok((track, stop_flag, capture_task, failure_rx))\n}\n","sourceCodeStart":173,"sourceCodeEnd":204,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/livekit_client/src/livekit_client/linux.rs#L173-L204","documentation":"Terminal failure of the Wayland capture setup in start_wayland_desktop_capture: the failure channel fired because the user canceled the portal dialog, denied permission, or the PipeWire connection dropped. No video source is available and sharing ends.","triggerScenarios":"Thrown at crates/livekit_client/src/livekit_client/linux.rs:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry screen sharing and accept the portal permission prompt","Restart PipeWire/xdg-desktop-portal if the connection keeps failing","Check compositor logs for PipeWire/portal errors"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}