siyuan-note/siyuan · error

response.msg

Error message

response.msg

What it means

In outputImage's Android branch, the uploadImageBlob kernel call returned a response whose code is not 0; the response's msg field is the error detail. The exported image blob could not be uploaded, so the subsequent PNG copy is skipped.

Source

Thrown at app/src/protyle/export/util.ts:199

                let copied: boolean;
                if (isInAndroid()) {
                    const response = await uploadImageBlob(blob);
                    copied = response.code === 0;
                    if (copied) {
                        copyPNGByLink(response.data.file);
                    }
                } else {
                    copied = await writePNGBlob(blob);
                }
                hideMessage(msgId);
                if (!copied) {
                    return;
                }
                showMessage(window.siyuan.languages.copied);
            } else {
                const response = await uploadImageBlob(blob);
                if (response.code !== 0) {
                    throw new Error(response.msg);
                }
                await saveExportFile(response.data.file, msgId);
            }
            exportDialog.destroy();
        } catch (e) {
            hideMessage(msgId);
            console.error("Export image error:", e);
            showMessage(e instanceof Error ? e.message : window.siyuan.languages.exportFileSaveFailed, 7000, "error");
        } finally {
            outputting = false;
            if (document.body.contains(exportDialog.element)) {
                containerElement.style.height = oldHeight;
                contentElement.style.overflow = oldOverflow;
                setActionDisabled(false);
            }
        }
    };

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Inspect response.msg for the kernel-side upload error
  2. Verify assets directory writability and network/proxy settings
  3. Retry the export; fall back to saving the image manually
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at app/src/protyle/export/util.ts:199 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11). Data as JSON: /api/errors/b7bb2904531e1ecf. Report an issue: GitHub.