tonhowtf/omniget · info
nenhuma gravacao ativa
Error message
nenhuma gravacao ativa
What it means
on_hotkey handles the record hotkey by branching on current screen-record state: if the tool is paused it resumes, if running it stops, and otherwise (neither paused nor running) it errors with 'nenhuma gravacao ativa' (Portuguese: 'no active recording'). The error is emitted to the frontend via the 'tool-record' event.
Solutions
- Ignore the error as expected behavior: only treat the hotkey as 'stop' when a recording is actually active; show a no-op/notification instead.
- Check screen_record state before binding the hotkey action, or hide/disable the stop hotkey when no recording is running.
- If state is stale (user is sure they were recording), restart the recording session — the recorder process likely died.
- Localize/translate the Portuguese message if it surfaces in an English UI, and render it as a user-facing toast rather than an error.
Defensive patterns
Strategy: try-catch
Try / catch
listen('tool-record', (event) => {
const payload = event.payload;
if (payload && payload.error && payload.error.includes('nenhuma gravacao ativa')) {
showToast('No active recording'); // expected no-op, not a real failure
}
}); Prevention
- Treat this as expected flow — pressing stop with no recording is a no-op
- Disable the stop hotkey/action while no recording is active
- Synchronize recording state across windows so stale UI doesn't trigger it
- Translate the Portuguese message for non-Portuguese locales
When it happens
Trigger: Pressing the stop/toggle recording hotkey while no screen recording session is active: e.g. pressing the hotkey twice quickly (stop already processed), starting recording in another window/profile, or the recording process crashed/exited without updating the shared state so st.running is stale-false.
Common situations: User mashes the stop hotkey; desktop app restarted and hotkey state reset while the user believes recording is ongoing; a previous stop silently failed leaving state inconsistent.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- nao esta gravando
- a gravacao atual nao e um replay
- configure e inicie uma vez pela tela antes de usar o atalho
- esse PDF não tem senha
- ffmpeg encerrou na largada (permissao de Gravacao de Tela?)
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/62a13a1c52891d27.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/commands/tools/desktop.rs:107
serde_json::json!({ "phase": "idle", "error": e }),
);
}
});
}
"record" => {
let app = app.clone();
tauri::async_runtime::spawn(async move {
let st = screen_record::state();
let r = if st.running && st.replay {
screen_record::save_replay()
.await
.map(|p| serde_json::json!({ "saved": p }))
} else if st.running {
screen_record::stop()
.await
.map(|s| serde_json::to_value(s).unwrap_or_default())
} else {
Err(anyhow::anyhow!("nenhuma gravacao ativa"))
};
let _ = app.emit(
"tool-record",
r.map_err(|e| e.to_string())
.unwrap_or_else(|e| serde_json::json!({ "error": e })),
);
});
}
_ => {}
}
}
#[tauri::command]
pub fn tool_hotkeys_get() -> HashMap<String, String> {
tool_hotkeys()
}
/// Define (ou apaga, com `binding` vazio) o atalho de uma ação.View on GitHub (pinned to 8600b91f42)