Skip to content

Bug: Assets URL built as assets://home/... (missing slash) — resolve-assets-url fails with "Unknown assets url" #1231

Open
logseq/logseq
#13898

Description

@mschiff

Search first

  • I searched and no similar issues were found

What Happened?

When adding an asset to my graph, the following message always appears in the console:

15:05:49.694 › :electron.core/resolve-assets-url Unknown assets url assets://home/mschiff/logseq/graphs/Private/assets/6aae88ad-6f9c-4d2a-bf3d-2c3dabd85238.jpg

Note the URL is assets://home/... with only two slashes. Since resolve-assets-url strips the assets:// prefix and then requires the remaining path to start with / (see the handler in src/electron/electron/core.cljs), this URL is treated as unknown and the warning is logged. The URL should be assets:///home/mschiff/... (three slashes).

So the bug appears to be in the caller constructing the assets URL without the leading / in the path part.

Reproduce the Bug

  1. Add an asset (e.g. an image) to a graph (drag & drop into a page or via /Upload)
  2. Open the developer console
  3. Observe: :electron.core/resolve-assets-url Unknown assets url assets://home/... is logged (note: only two slashes after assets:)

Expected Behavior

The asset URL should be constructed as assets://<absolute-path> i.e. assets:///home/..., so that the protocol handler resolves it correctly and no "Unknown assets url" warning is logged.

Screenshots

No response

Files

No response

Browser, Desktop or Mobile Platform Information

Logseq 2.0.1-alpha+nightly.20260917, Linux Desktop

Additional Context

DB beta version. Message appears consistently for every asset added.

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Activity

  1. yuxi-liu-wired commented on Oct 28, 2026

    @yuxi-liu-wired

    Fixed in logseq/logseq#13898 (fix(assets): non-media assets, assets:// paths on Linux, theme before first paint, published pages icons). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.

  2. added 11 commits that reference this issue on Oct 29, 2026
    a281ed3
    865136d
    b526af6
    1bb7997
    f4ff5e5
    5d8d068
    f13d0ad
    e329c74
    e905d8b
    5721112
    7babdb8
  3. added 17 commits that reference this issue on Nov 11, 2026
    07e3365
    c37b4ae
    58a49d4
    cb639e2
    2f3306d
    966f8c3
    9a0a20c
    c987c49
    f2f7845
    cd6c281
    84ea5f0
    439ff01
    72b51ac
    b14e266
    585f4d3
    9f5d143
    7be5500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions