wavetermdev/waveterm · error

-3 suppressed (ERR_ABORTED)

-3 suppressed (ERR_ABORTED)

Error message

Failed to load ${e.validatedURL}: ${e.errorDescription}

What it means

When the Electron webview fails to load a URL, failLoadHandler builds 'Failed to load <url>: <errorDescription>' and surfaces it in the block UI. Chromium abort code -3 (ERR_ABORTED) is deliberately suppressed to a console warning because it usually fires on intentional navigations/reloads, not real failures.

Source

Thrown at frontend/app/view/webview/webview.tsx:1046

        };
        const newWindowHandler = (e: any) => {
            e.preventDefault();
            const newUrl = e.detail.url;
            fireAndForget(() => openLink(newUrl, true));
        };
        const startLoadingHandler = () => {
            model.setRefreshIcon("xmark-large");
            model.setIsLoading(true);
            webview.style.backgroundColor = "transparent";
        };
        const stopLoadingHandler = () => {
            model.setRefreshIcon("rotate-right");
            model.setIsLoading(false);
            setBgColor();
        };
        const failLoadHandler = (e: any) => {
            if (e.errorCode === -3) {
                console.warn("Suppressed ERR_ABORTED error", e);
            } else {
                const errorMessage = `Failed to load ${e.validatedURL}: ${e.errorDescription}`;
                console.error(errorMessage);
                setErrorText(errorMessage);
                if (onFailLoad) {
                    const curUrl = model.webviewRef.current.getURL();
                    onFailLoad(curUrl);
                }
            }
        };
        const webviewFocus = () => {
            env.electron.setWebviewFocus(webview.getWebContentsId());
            model.nodeModel.focusNode();
        };
        const webviewBlur = () => {
            env.electron.setWebviewFocus(null);
        };
        const handleDomReady = () => {

View on GitHub (pinned to a4447c1563)

Solutions

  1. Ignore -3 (ERR_ABORTED) occurrences; they are expected during navigation/reload and already suppressed
  2. For real failures, check the errorDescription (e.g. ERR_NAME_NOT_RESOLVED, ERR_CONNECTION_REFUSED) and fix network/DNS/proxy
  3. Verify the URL is reachable (curl it) and that certificates are valid
  4. Use the onFailLoad callback path (getURL, retry/back navigation) to recover the block

Example fix

// before
const errorMessage = `Failed to load ${e.validatedURL}: ${e.errorDescription}`;
console.error(errorMessage);
// after
const errorMessage = `Failed to load ${e.validatedURL}: ${e.errorDescription}`;
console.error(errorMessage);
setErrorText(errorMessage);
if (onFailLoad) onFailLoad(e.validatedURL, e.errorDescription); // offer retry button
Defensive patterns

Strategy: try-catch

Validate before calling

// before loading, check reachability where possible
const ok = await fetch(url, { method: 'HEAD' }).then(r => r.ok).catch(() => false);
if (!ok) console.warn('URL may be unreachable:', url);

Type guard

function isRealLoadFailure(e: { errorCode: number }): boolean {
    return e.errorCode !== -3; // -3 = ERR_ABORTED, expected on navigation/reload
}

Try / catch

const failLoadHandler = (e: any) => {
    if (e.errorCode === -3) {
        console.warn('Suppressed ERR_ABORTED error', e);
        return;
    }
    const errorMessage = `Failed to load ${e.validatedURL}: ${e.errorDescription}`;
    console.error(errorMessage);
    setErrorText(errorMessage);
    onFailLoad?.();
};

Prevention

When it happens

Trigger: The webview's did-fail-load event fires with errorCode !== -3: DNS failure, connection refused, TLS error, or a load aborted by the app itself (errorCode -3, logged only).

Common situations: Loading a URL while offline; a server that is down or rejecting connections; an invalid/self-signed certificate; a user-triggered navigation cancelling an in-flight load (suppressed -3 case).

Related errors


AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01). Data as JSON: /api/errors/4da478deac277d47. Report an issue: GitHub.