jlcodes99/cockpit-tools · warning
[WorkbuddyAutoCheckin] 手动测试自动签到异常:
Error message
[WorkbuddyAutoCheckin] 手动测试自动签到异常:
What it means
`handleManualTest` invokes the backend to run a manual auto-checkin test. Any rejection from that call is caught, logged with this message, and surfaced to the user via `setError` with a localized '测试执行失败' message. The `waiting` result means a test is already running and is not an exception.
Source
Thrown at src/components/codebuddy-suite/WorkbuddyAutoCheckinConfigModal.tsx:154
setError(null);
try {
const result = await runWorkbuddyAutoCheckinCycleIfNeeded(true);
setLogs(await getWorkbuddyAutoCheckinLogsAsync());
setLogsError(null);
if (result === 'retry') {
setError(
t(
'workbuddy.checkin.manualTestPartialFailure',
'部分账号签到失败,请查看记录;后台稍后会自动重试。',
),
);
} else if (result === 'waiting') {
setError(
t('workbuddy.checkin.manualTestAlreadyRunning', '自动签到任务正在执行,请稍后查看记录。'),
);
}
} catch (err) {
console.warn('[WorkbuddyAutoCheckin] 手动测试自动签到异常:', err);
const message = err instanceof Error ? err.message : String(err);
setError(
t('workbuddy.checkin.manualTestFailed', '测试执行失败:{{message}}', { message }),
);
} finally {
setManualTesting(false);
}
};
const handleClearLogs = async () => {
setError(null);
try {
await clearWorkbuddyAutoCheckinLogs();
setLogs([]);
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
setError(
t('workbuddy.checkin.clearLogsFailed', '清空签到记录失败:{{message}}', { message }),View on GitHub (pinned to 1ed8b77992)
Solutions
- Read the `message` shown in the error banner — it carries the backend's underlying failure reason.
- Re-authenticate the workbuddy account so stored credentials/cookies are fresh.
- Check network connectivity/proxy settings to the check-in target host.
- Wait for the currently running task to finish if the result was 'waiting', then retry.
Defensive patterns
Strategy: try-catch
Validate before calling
const config = await getWorkbuddyAutoCheckinConfig();
if (!config?.credentials) setError('请先配置签到账号凭据'); Type guard
function isManualTestResult(v: unknown): v is 'done' | 'waiting' | 'failed' {
return v === 'done' || v === 'waiting' || v === 'failed';
} Try / catch
try {
const result = await runManualAutoCheckin();
// handle 'waiting' separately — not an error
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
setError(t('workbuddy.checkin.manualTestFailed', '测试执行失败:{{message}}', { message }));
} finally {
setManualTesting(false);
} Prevention
- Validate credentials/config exist before starting a manual test
- Disable the manual-test button while a run is in flight to avoid duplicate-run rejections
- Always reset manualTesting in a finally block
- Surface err.message to the user rather than swallowing it
When it happens
Trigger: The manual-test backend call throws: check-in automation fails (login expired, target site unreachable), the task scheduler rejects a duplicate run, or configuration is invalid/missing credentials.
Common situations: Expired saved credentials for the workbuddy account; network/proxy blocking the check-in target; clicking manual test while a scheduled run is in flight (returns 'waiting', not an error); malformed check-in config after an update.
Related errors
- [AccountGroups] Failed to load groups: ${String(error)}
- Claude OAuth start 响应缺少关键字段
- ${updatedAccount.quota_error.message}
- Qoder OAuth 授权链接为空
- [WebDAV] Auto backup upload failed
AI-assisted analysis of jlcodes99/cockpit-tools@1ed8b77992 (2026-09-05).
Data as JSON: /api/errors/7f3778ff2a8447e8.
Report an issue: GitHub.