{"record":{"id":"6d6db97b5a991e3b","repo":"gfx-rs/wgpu","slug":"importexternaltexture-failed","errorCode":null,"errorMessage":"importExternalTexture failed","messagePattern":"importExternalTexture failed","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu/src/backend/webgpu.rs","lineNumber":1969,"sourceCode":"    /// The browser performs the YCbCr-to-RGB conversion internally. The result is\n    /// valid only while the source is: a `VideoFrame` until it is closed, an\n    /// `HTMLVideoElement` for the current task.\n    pub(crate) fn import_external_texture(\n        &self,\n        source: &ExternalTextureSource,\n    ) -> dispatch::DispatchExternalTexture {\n        let descriptor = match source {\n            ExternalTextureSource::HtmlVideoElement(v) => {\n                webgpu_sys::GpuExternalTextureDescriptor::new(v)\n            }\n            ExternalTextureSource::VideoFrame(f) => {\n                webgpu_sys::GpuExternalTextureDescriptor::new_with_video_frame(f)\n            }\n        };\n        let inner = self\n            .inner\n            .import_external_texture(&descriptor)\n            .expect(\"importExternalTexture failed\");\n        WebExternalTexture {\n            inner,\n            ident: crate::cmp::Identifier::create(),\n        }\n        .into()\n    }\n}\n\nimpl dispatch::DeviceInterface for WebDevice {\n    fn features(&self) -> crate::Features {\n        map_wgt_features(self.inner.features())\n    }\n\n    fn limits(&self) -> crate::Limits {\n        map_wgt_limits(self.inner.limits())\n    }\n\n    fn adapter_info(&self) -> crate::AdapterInfo {","sourceCodeStart":1951,"sourceCodeEnd":1987,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu/src/backend/webgpu.rs#L1951-L1987","documentation":"Panic in the WebGPU backend's import_external_texture: the browser's GPUDevice.importExternalTexture call rejected the descriptor/source, so no external texture object could be produced from the given HTMLVideoElement/VideoFrame.","triggerScenarios":"Thrown at wgpu/src/backend/webgpu.rs:1969 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the video source is usable (playing, not closed, same-origin/CORS-clean) before importing","Re-import per-frame since external textures expire with the source"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}