BigPizzaV3/CodexPlusPlus · error
native menu localizer threw: {exception}
Error message
native menu localizer threw: {exception} What it means
Formatted error thrown by try_install_native_menu_localizer when the injected native-menu localizer script evaluates but reports that its internal localizer threw an exception ({exception} is the JS-side error text). The offending input is the Electron renderer environment the script ran in — the script itself was found and evaluated; the failure is at runtime inside the localizer, and install_native_menu_localizer surfaces the JS detail.
Source
Thrown at crates/codex-plus-core/src/native_menu.rs:197
.web_socket_debugger_url
.as_deref()
.is_some_and(|url| !url.is_empty())
})
})
.context("No Electron main-process inspector target found")?;
let websocket_url = target
.web_socket_debugger_url
.as_deref()
.context("selected inspector target has no websocket URL")?;
let script = native_menu_localizer_script()?;
let result = crate::bridge::evaluate_script_with_await_promise(websocket_url, &script, true)
.await
.context("failed to evaluate native menu localizer")?;
if let Some(exception) = result
.get("result")
.and_then(|value| value.get("exceptionDetails"))
{
bail!("native menu localizer threw: {exception}");
}
let _ = crate::diagnostic_log::append_diagnostic_log(
"native_menu.localization_installed",
json!({
"inspector_port": inspector_port,
"target_type": target.target_type,
"target_title": target.title,
"result": result
}),
);
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
#[test]View on GitHub (pinned to f2074595a2)
Solutions
- 检查 Codex App 版本是否与本地化脚本兼容
- 升级 Codex++ 以匹配更新的菜单结构
- 查看异常文本定位脚本中失败的 API 调用
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/codex-plus-core/src/native_menu.rs:197 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/7b01b52d68606817.
Report an issue: GitHub.