Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.
Setup reasons test: read the visible installation status line
Bowen Xue6e268b956cfd
diff --git a/freevideo_engine/failure_details.py b/freevideo_engine/failure_details.pyindex 9f44db3..a62984c 100644--- a/freevideo_engine/failure_details.py+++ b/freevideo_engine/failure_details.py@@ -599,6 +599,19 @@ def _launcher_failure(value, *, zh=False, other_disk=False, disk_name='', can_refrom .model_guidance import DOWNLOAD_COPYreturn dict(title=DOWNLOAD_COPY['error_read'][zh], detail='', action='', kind='download-list-read')rules = (+ (r'This port is in use by another application', 'port-taken',+ ('The ComfyUI port is in use', 'ComfyUI 端口被占用'),+ ('Another program is using this port. Change the ComfyUI address in Settings, then start again.',+ '有其他程序占用了这个端口。请在设置里换一个 ComfyUI 地址,再重新启动。')),+ # Windows reserves whole port ranges (Hyper-V, WSL), so the ports after it may be unusable too.+ (r'This port and the next ones are in use or reserved by the system', 'port-taken',+ ('The ComfyUI port cannot be used', 'ComfyUI 端口无法使用'),+ ('This port and the next ones are in use or reserved by the system. Change the ComfyUI address in Settings, '+ 'then start again.', '这个端口和后面的端口都已被占用或被系统保留。请在设置里换一个 ComfyUI 地址,再重新启动。')),+ (r'The ports for LAN access are in use or reserved by the system', 'port-taken',+ ('The LAN access port cannot be used', '局域网访问的端口无法使用'),+ ('The ports for LAN access are in use or reserved by the system. Change the ComfyUI port in Settings, '+ 'then start again.', '局域网访问要用的端口已被占用或被系统保留。请在设置里换一个 ComfyUI 端口,再重新启动。')),(r'The previous video has no usable continuation data', 'continuation-missing',('This video cannot be continued', '这个视频暂时不能接续'),('Generate the previous video again, then continue it.', '请重新生成上一段视频,再接续。')),diff --git a/freevideo_engine/launcher/Main.qml b/freevideo_engine/launcher/Main.qmlindex 60d998e..f1a5bdf 100644--- a/freevideo_engine/launcher/Main.qml+++ b/freevideo_engine/launcher/Main.qml@@ -465,12 +465,13 @@ ApplicationWindow {text: t("Other disks…", "其他硬盘…"); onClicked: diskDialogOpen = true }FButton { objectName: "diskCleanupButton"; visible: s.failure.kind === "disk"; enabled: s.can_cleanup; text: t("Clean download cache", "清理缓存"); onClicked: { settingsTab = "general"; settingsOpen = true; backend.cleanupDownloads(false) } }FButton { objectName: "changeSource"; visible: s.failure.kind === "download" || s.failure.kind === "model-source"; text: t("Change source", "切换下载源"); onClicked: { settingsTab = "downloads"; settingsOpen = true } }+ FButton { objectName: "changeAddress"; visible: s.failure.kind === "port-taken"; text: t("Change address", "更改地址"); onClicked: { settingsTab = "advanced"; settingsOpen = true } }FButton { objectName: "repairCardButton"; primary: true; visible: !!s.repair_offered; text: t("Repair", "修复"); onClicked: backend.action("repair", false) }FButton { objectName: "latestLauncherLink"; visible: s.failure.kind === "older-launcher"; flat: truetext: t("Download the latest ↗", "下载最新版 ↗"); onClicked: backend.link("https://github.com/FlashML-org/FreeVideo/releases/latest") }FButton { objectName: "copyError"; visible: !diskFailure; text: t("Copy details", "复制详情"); onClicked: backend.copy(s.error) }FButton { objectName: "showError"; text: errorDetailsOpen ? t("Hide details", "收起详情") : t("Show details", "查看详情"); flat: true; onClicked: errorDetailsOpen = !errorDetailsOpen }- FButton { objectName: "reportProblem"; visible: !diskFailure; text: t("Report a problem", "提交问题"); onClicked: backend.reportProblem(s.error, s.failure.title || "") }+ FButton { objectName: "reportProblem"; visible: !diskFailure && s.failure.kind !== "port-taken"; text: t("Report a problem", "提交问题"); onClicked: backend.reportProblem(s.error, s.failure.title || "") }FButton { objectName: "exportError"; visible: !diskFailure; text: t("Export report", "导出报告"); enabled: s.report.status !== "running"; onClicked: backend.exportReport() }}ScrollView {@@ -481,6 +482,7 @@ ApplicationWindow {}FText {+ objectName: "reportStatus"visible: s.report.status !== "idle"; Layout.fillWidth: true; font.pixelSize: theme.microcolor: s.report.status === "error" ? theme.danger : theme.mutedtext: s.report.status === "running" ? t("Exporting full logs…", "正在导出完整日志…") :diff --git a/freevideo_engine/launcher_copy.py b/freevideo_engine/launcher_copy.pyindex 7267418..cc581f3 100644--- a/freevideo_engine/launcher_copy.py+++ b/freevideo_engine/launcher_copy.py@@ -188,6 +188,7 @@ LAN_ERRORS = {'This address does not belong to this computer. Enter one of its IP addresses or 0.0.0.0.': '这个地址不属于本机。请填写本机的 IP 地址或 0.0.0.0。','This port and the next ones are in use or reserved by the system. Set a different local ComfyUI address.': '这个端口和后面的端口都已被占用或被系统保留,请换一个本机 ComfyUI 地址。','The ports for LAN access are in use or reserved by the system. Choose another ComfyUI port.': '局域网访问要用的端口已被占用或被系统保留,请换一个 ComfyUI 端口。',+ 'This port is in use by another application. Set a different local ComfyUI address.': '这个端口已被其他程序占用,请换一个本机 ComfyUI 地址。','A generation is running. Change the address after it finishes.': '正在生成,完成后可修改地址。','The ComfyUI already running does not use this address. After its jobs finish, restart it with this address and connect again.': '已在运行的 ComfyUI 没有使用这个地址。请在任务完成后用这个地址重新启动 ComfyUI,再重新连接。','The ComfyUI already running is open to the network directly. After its jobs finish, restart it on 127.0.0.1, then turn on LAN access.': '已在运行的 ComfyUI 正在直接对局域网开放。请在任务完成后改用 127.0.0.1 重新启动它,再开启局域网访问。',diff --git a/freevideo_engine/launcher_session.py b/freevideo_engine/launcher_session.pyindex 7695d90..38c0f2b 100644--- a/freevideo_engine/launcher_session.py+++ b/freevideo_engine/launcher_session.py@@ -9,6 +9,7 @@ from .long_paths import io_path, resolved, plain, plain_text, plain_dataimport sysimport threadingimport time+import uuidfrom urllib.parse import parse_qsl, urlencode, urlsplit, urlunsplitfrom . import __version__@@ -45,6 +46,28 @@ ARCHIVE_FAILURES = {'in-use': ('Another program is using it, or this account does not have permission to delete it.', '正被其他程序使用,或当前账户没有删除权限。'),'failed': ('It could not be deleted.', '未能删除。'),}+# Report exports that failed for a reason the user can act on; anything else keeps its own words.+EXPORT_FAILURES = {+ 'exists': ('A file with this name already exists. Choose another name.', '已有同名文件,请换一个文件名。'),+ 'permission': ('This folder cannot be written to. Choose another folder.', '该文件夹无法写入,请换一个位置保存。'),+ 'in-use': ('The existing file is open in another program or is read-only, so it was not replaced. '+ 'Close that program, or choose another name.',+ '原文件正被其他程序打开或为只读,未被替换。请关闭该程序,或换一个文件名。'),+ 'disk': ('Not enough disk space. Free up space, then export again.', '磁盘空间不足,请释放空间后再导出。'),+}+++def export_reason(error):+ """The EXPORT_FAILURES key for an export error, or '' when its words are the only explanation."""+ import errno+ code, winerror = getattr(error, 'errno', None), getattr(error, 'winerror', None)+ if isinstance(error, FileExistsError):+ return 'exists'+ if code in (errno.ENOSPC, getattr(errno, 'EDQUOT', None)) or winerror in (39, 112):+ return 'disk'+ if isinstance(error, PermissionError) or code in (errno.EACCES, errno.EPERM, errno.EROFS):+ return 'permission'+ return ''@@ -1169,7 +1192,8 @@ class Session:raw += ('\n\n' if raw else '') + 'Image model diagnostic report:\n' + json.dumps(pack_report, ensure_ascii=False, indent=2)return redacted_launcher_error(raw, [(self.token, '<REDACTED>')] if self.token else [])- def export_report(self, output):+ def export_report(self, output, overwrite=False):+ """Write the report ZIP; overwrite replaces a file the save dialog already asked about."""if self.report['status'] == 'running':returnfrom .diagnostics import collect, Redactor@@ -1182,14 +1206,30 @@ class Session:self.report = dict(status='running', path=str(output), error='')def work():+ target = Path(output)+ # Collection never writes over a file; a confirmed replacement is built beside it and swapped in whole.+ partial = target.with_name('.%s.%s.partial' % (target.name, uuid.uuid4().hex[:8])) if overwrite else target+ replacing = Falsetry:- result = collect(root, root / 'machine.json', None, Path(output),+ result = collect(root, root / 'machine.json', None, partial,complete=True, extra_files=logs, notes=notes)+ if partial != target:+ replacing = True+ os.replace(io_path(partial), io_path(target))self.report = dict(status='complete', path=str(output), error='',collection_errors=len(result['errors']))except Exception as error:- self.report = dict(status='error', path=str(output),+ # The new file was already written beside the old one, so the folder is writable:+ # Windows refuses the swap when the old file is open elsewhere or read-only.+ reason = 'in-use' if replacing and isinstance(error, PermissionError) else export_reason(error)+ self.report = dict(status='error', path=str(output), reason=reason,error=Redactor(replacements).text(str(error)))+ finally:+ if partial != target:+ try:+ io_path(partial).unlink()+ except OSError:+ passthreading.Thread(target=work, name='freevideo-export-report', daemon=True).start()@@ -2371,7 +2411,8 @@ class Session:field_error=dict(self.field_error or {}), retry_kind=self.retry_kind(), notice=self.notice,# Qt reads a list as an array; LEVELS is a tuple.compatibility=dict(self.compatibility, levels=list(self.compatibility.get('levels') or ())),- report=dict(self.report),+ report=dict(self.report, error=self.t(*EXPORT_FAILURES[self.report['reason']])+ if self.report.get('reason') in EXPORT_FAILURES else self.report.get('error', '')),models=models, overall=overall, progress=progress, detail=detail,progress_text=file_text, remaining_seconds=remaining,# The elapsed row is only shown while working. An idle clock woulddiff --git a/freevideo_engine/modern_launcher.py b/freevideo_engine/modern_launcher.pyindex 5aef4a3..a730092 100644--- a/freevideo_engine/modern_launcher.py+++ b/freevideo_engine/modern_launcher.py@@ -286,9 +286,11 @@ def create_ui(session, *, show=True):'freevideo-diagnostics-' + time.strftime('%Y%m%dT%H%M%SZ', time.gmtime()) + '.zip','ZIP (*.zip)')if path:- if not path.lower().endswith('.zip'):+ # The dialog asked before replacing the name it returned; a name we extend was never asked about.+ confirmed = path.lower().endswith('.zip')+ if not confirmed:path += '.zip'- self.invoke(session.export_report, path)+ self.invoke(session.export_report, path, confirmed)@Slot(str)def link(self, value):diff --git a/web/generation_progress.js b/web/generation_progress.jsindex 51b7ff7..def8c13 100644--- a/web/generation_progress.js+++ b/web/generation_progress.js@@ -1,5 +1,5 @@// One whole-video estimate and the same five rows in Studio and the node view.-import { saveReport, reportIssue, showReportTip, focusReportTip } from './report_issue.js';+import { saveReport, reportIssue, showReportTip, focusReportTip, REPORT_GONE, reportFetchError } from './report_issue.js';import { issueButton } from './issue_button.js';const css = document.createElement('link');css.rel = 'stylesheet'; css.href = new URL('./generation_progress.css', import.meta.url).href;@@ -386,6 +386,7 @@ export function createDiagnosticReportControl(t, {api = null, fallback = null, tif (message.new_request === true || message.overall?.reset === true || message.reset === true && !message.phase) {problem?.remove();reportId = null; revision++; report.hidden = true; pinned = false; pinnedBlob = null;+ report.disabled = false; report.textContent = label();}if (typeof message.report_id === 'string' && /^[a-f0-9]{32}$/.test(message.report_id)) {if (reportId !== message.report_id) { problem?.remove(); revision++; pinned = false; pinnedBlob = null; report.disabled = false; report.textContent = label(); }@@ -399,7 +400,7 @@ export function createDiagnosticReportControl(t, {api = null, fallback = null, tif (pinned && pinnedBlob) return pinnedBlob;const id = reportId, path = `/freevideo/report/${id}`;const response = await (api ? api.fetchApi(path) : fetch(path));- if (!response.ok) throw new Error('Report unavailable');+ if (!response.ok) throw reportFetchError(response);const blob = await response.blob();if (pinned && reportId === id) pinnedBlob = blob;return blob;@@ -414,6 +415,7 @@ export function createDiagnosticReportControl(t, {api = null, fallback = null, tproblem?.remove();const current = revision;report.disabled = true; report.textContent = t('Preparing report…', '正在整理报告…');+ let gone = false;try {await downloadReport();if (current === revision) {@@ -421,13 +423,15 @@ export function createDiagnosticReportControl(t, {api = null, fallback = null, tif (tip && report.isConnected) showReportTip(report.parentElement, report, t, {mode: 'downloaded',submit: () => reportIssue(fetchReport, typeof version === 'function' ? version() : version, {save: false})});}- } catch {- if (current === revision) {+ } catch (error) {+ gone = Boolean(error?.gone);+ if (current === revision && gone) report.textContent = t(...REPORT_GONE);+ else if (current === revision) {report.textContent = t('Report unavailable · retry', '报告暂不可用 · 重试');problem = issueButton(t, () => ({where: ['Diagnostic report', '诊断报告'], message: report.textContent}));report.after(problem);}- } finally { if (current === revision) report.disabled = false; }+ } finally { if (current === revision) report.disabled = gone; }};return {report, updateReport, fetchReport, downloadReport, hasReport: () => reportId !== null, pin: () => { pinned = true; }};}diff --git a/web/image_generation.js b/web/image_generation.jsindex e7a18ba..94cdc3f 100644--- a/web/image_generation.js+++ b/web/image_generation.js@@ -2,7 +2,7 @@// owns its document/history; this module inserts a result through its commands.import * as commands from './image_commands.js';import {orientMatrix, rasterKinds, scaleSelection} from './image_editor_engine.js';-import {saveReport, reportIssue, showReportTip, focusReportTip} from './report_issue.js';+import {saveReport, reportIssue, showReportTip, focusReportTip, REPORT_GONE, reportFetchError} from './report_issue.js';import {issueButton} from './issue_button.js';import {about} from './request_assets.js';import {createImageLoras} from './image_lora.js';@@ -220,6 +220,7 @@ export const REPORT_LABELS = Object.freeze({description: ['Diagnostic report: hardware, settings and timings', '诊断报告:硬件、设置和耗时'],preparing: ['Preparing…', '正在整理…'],unavailable: ['Report unavailable · retry', '报告暂不可用 · 重试'],+ gone: REPORT_GONE,});// Shared by the editor and the other image entry points. Only the opaque report@@ -240,7 +241,7 @@ export function renderImageFailure(host, {error, report_id, stage, fitted, info,if (!report_id) return card;const fetchReport = async () => {const response = await fetchApi(`${IMAGE_GEN_PROTOCOL.root}/report/${encodeURIComponent(report_id)}`, {cache: 'no-store'});- if (!response.ok) throw new Error('report_unavailable');+ if (!response.ok) throw reportFetchError(response);return response.blob();};const version = () => typeof productVersion === 'function' ? productVersion() : productVersion;@@ -256,14 +257,17 @@ export function renderImageFailure(host, {error, report_id, stage, fitted, info,const restoreFocus = doc.activeElement === anchor;issue.hidden = true;anchor.disabled = true; anchor.textContent = t(...REPORT_LABELS.preparing);+ let gone = false;try {await saveReport(await fetchReport());if (card.isConnected) showReportTip(bar, anchor, t, {mode: 'downloaded',submit: () => reportIssue(fetchReport, version(), {save: false}), onHide: () => anchor.focus()});anchor.textContent = t(...REPORT_LABELS.download);- } catch { anchor.textContent = t(...REPORT_LABELS.unavailable); issue.hidden = false; }- finally {- anchor.disabled = false;+ } catch (error) {+ gone = Boolean(error?.gone);+ anchor.textContent = t(...(gone ? REPORT_LABELS.gone : REPORT_LABELS.unavailable)); issue.hidden = gone;+ } finally {+ anchor.disabled = gone;if (restoreFocus && card.isConnected && doc.activeElement === doc.body) anchor.focus({preventScroll: true});}};diff --git a/web/report_issue.js b/web/report_issue.jsindex 6e7a5f7..f4eca45 100644--- a/web/report_issue.js+++ b/web/report_issue.js@@ -6,6 +6,11 @@ const TIP_KEY = 'freevideo.report-tip';const gb = bytes => Number.isFinite(bytes) && bytes > 0 ? Math.round(bytes / 2 ** 30) : null;+// A 404 means the server no longer keeps this run's report (FreeVideo restarted, or many runs followed):+// asking again cannot bring it back, so the button says so and stays off, with nothing to report.+export const REPORT_GONE = ['Report expired', '报告已过期'];+export const reportFetchError = response => Object.assign(new Error('Report unavailable'), {gone: response?.status === 404});+// The issue form, prefilled from the redacted report. The report carries no// prompt, reference or video, so neither does the address.export function reportIssueURL(report, productVersion = null) {@@ -225,7 +230,10 @@ export function showReportTip(bar, anchor, t, {mode = 'invite', submit, onHide =if (send.disabled) return;send.disabled = true; sendText.textContent = t('Preparing…', '正在整理…');try { const address = await submit(); closeForGood(); sent(address); }- catch { send.disabled = false; sendText.textContent = t('Report unavailable · retry', '报告暂不可用 · 重试'); }+ catch (error) {+ send.disabled = Boolean(error?.gone);+ sendText.textContent = error?.gone ? t(...REPORT_GONE) : t('Report unavailable · retry', '报告暂不可用 · 重试');+ }};row.append(send);text.append(title, lead, note);diff --git a/web/result_actions.js b/web/result_actions.jsindex fdc92ef..c5e0798 100644--- a/web/result_actions.js+++ b/web/result_actions.js@@ -4,6 +4,7 @@ import { shareButton } from './share.js';import { canExtend, extendText, extendSourceProblem, extendSourceState } from './studio_extend.js';import { issueButton } from './issue_button.js';import { savedSettings, differs } from './result_reuse.js';+import { REPORT_GONE } from './report_issue.js';const css = document.createElement('link');css.rel = 'stylesheet'; css.href = new URL('./result_actions.css', import.meta.url).href; document.head.append(css);@@ -287,13 +288,17 @@ export function resultActions(record, t, {diagnostic = null, secondPass = null,if (report.disabled) return;problem?.remove();report.disabled = true; text.textContent = t('Preparing…', '正在整理…');+ let gone = false;try { await diagnostic(); text.textContent = reportLabel; }- catch {- text.textContent = t('Report unavailable · retry', '报告暂不可用 · 重试');- problem = issueButton(t, () => ({where: ['Diagnostic report', '诊断报告'], message: text.textContent}));- report.after(problem);+ catch (error) {+ gone = Boolean(error?.gone);+ text.textContent = gone ? t(...REPORT_GONE) : t('Report unavailable · retry', '报告暂不可用 · 重试');+ if (!gone) {+ problem = issueButton(t, () => ({where: ['Diagnostic report', '诊断报告'], message: text.textContent}));+ report.after(problem);+ }}- finally { report.disabled = false; }+ finally { report.disabled = gone; }};bar.append(report);}diff --git a/web/setup.js b/web/setup.jsindex 9aba385..8670141 100644--- a/web/setup.js+++ b/web/setup.js@@ -18,9 +18,36 @@ const t = (en, zh) => cn ? zh : en;const INSTALLED_HINT = {en: 'Already installed. To reinstall, click Detect & review first.', zh: '已装好。要重装,请先点“检测并预览”。'};const gib = n => Number.isFinite(n) ? (n / 2 ** 30).toFixed(1) + " GiB" : "—";const SPEED_TEST_FAILED = 'The speed test did not finish. Click "Test source speeds".';-const reportable = value => !/The installation plan changed\. Detect configuration again|MODEL_MISMATCH_REPAIR:/.test(String(value || ''));+// Setup refusals whose cause and next step are known. Repair goes where the server's sentence pointed: the launcher when it watches.+const repairStep = text => text.includes('In the FreeVideo launcher, open Settings and click Repair.')+ ? t('In the FreeVideo launcher, open Settings and click Repair.', '请在 FreeVideo 启动器的设置里点“修复”。')+ : t('Click Detect & review, then Install / repair.', '请先点“检测并预览”,再点“安装/修复”。');+const SETUP_ERRORS = [+ [/^Choose an engine installation folder$/, () => t('Choose a FreeVideo installation folder first.', '请先选择 FreeVideo 安装目录。')],+ [/^Use a dedicated FreeVideo folder, not the ComfyUI root or its parent$/,+ () => t('Choose a separate folder for FreeVideo, not the ComfyUI folder or the folder that contains it.',+ '请给 FreeVideo 单独选一个文件夹,不要用 ComfyUI 文件夹或它的上一级。')],+ [/^Finish or cancel queued ComfyUI requests before installing$/,+ () => t('Generations are running or queued. Install after they finish, or cancel them first.', '仍有生成正在进行或排队。请等待完成或先取消,再安装。')],+ [/^Finish or cancel queued ComfyUI requests before calibrating$/,+ () => t('Generations are running or queued. Run the test after they finish, or cancel them first.', '仍有生成正在进行或排队。请等待完成或先取消,再运行放置测试。')],+ [/^Wait for setup to finish$/, () => t('Installation is still running. Try again after it finishes.', '安装仍在进行,请在完成后重试。')],+ [/^Inspect this installation again before installing$/, () => t('Click Detect & review again, then Install / repair.', '请重新点“检测并预览”,再点“安装/修复”。')],+ [/^Review the plan and accept its model\/toolkit licenses first$/, () => t('Tick the agreement above to enable Install / repair.', '勾选上方的同意选项后,可点击“安装/修复”。')],+ [/^FreeVideo setup is missing\./, text => t('This folder has no finished FreeVideo installation. ', '该文件夹中没有已安装的 FreeVideo。') + repairStep(text)],+ [/^FreeVideo setup is incomplete in /, text => t('The installation in this folder is not finished. ', '该文件夹中的安装尚未完成。') + repairStep(text)+ + t(' Existing files are reused.', '已有文件会继续使用。')],+ [/^FreeVideo device configuration is missing\./, text => t('This installation has not checked the GPU yet. ', '该安装尚未检查显卡。') + repairStep(text)],+ [/^The FreeVideo installation was moved\./, text => t('This installation was moved from another folder. ', '该安装是从其他文件夹移动过来的。') + repairStep(text)],+ [/^The FreeVideo Python environment is missing\./, text => t('This installation is missing its Python environment. ', '该安装缺少 Python 环境。') + repairStep(text)],+];+const setupError = text => SETUP_ERRORS.find(([pattern]) => pattern.test(text))?.[1](text);+const reportable = value => !/The installation plan changed\. Detect configuration again|MODEL_MISMATCH_REPAIR:/.test(String(value || ''))+ && setupError(String(value || '')) === undefined;const failureText = value => {const text = String(value || ''), matches = [...text.matchAll(/MODEL_MISMATCH_REPAIR: ([^\r\n]+)/g)];+ const known = setupError(text);+ if (known !== undefined) return known;if (!matches.length && text.includes('The installation plan changed. Detect configuration again')) {const files = text.includes('A file in the installation folder changed after the review');return files@@ -407,7 +434,9 @@ export async function openSetup() {catch (error) { fail(error); }};use.onclick = async () => {- try { const result = await request("use", {root: root.value}); ready = Boolean(result.ready); state.textContent = result.ready ? t("Existing installation connected. Ready to generate.", "已连接现有安装,可以生成。") : result.detail; state.className = "fv-ready"; invalidate(); }+ try { const result = await request("use", {root: root.value}); ready = Boolean(result.ready); if (result.ready) { state.textContent = t("Existing installation connected. Ready to generate.", "已连接现有安装,可以生成。"); state.className = "fv-ready"; }+ else { fault(state, result.detail); state.className = "fv-failure"; }+ invalidate(); }catch (error) { fail(error); }};cancel.onclick = async () => { try { render(await request("cancel")); poll(); } catch (error) { fail(error); } };