Skip to content

The starter fails to show Icons #101

@olli-quartal

Description

@olli-quartal

In windows platform, at least with umlauts in User naem / path, the starter project fails to show icons for Nodes.

Steps to reproduce:

  • Take the sample as-is
  • Install on a Windows computer where user name contains umlauts (e.g. "ä" or probably an special characters).
    • Not sure if this is needed for the bug to appear, but assume it would have been found otherwise.
  • Build and run npm run dev
  • In Add node, search for "Example" or "Git"
  • Observe that the icon is missing
Image

Reason:

The image uses full system path, in my case /icons/CUSTOM/C:\Users\OlliPerttilä\.n8n-node-cli\.n8n\custom\node_modules\n8n-nodes-quartal-hub\dist\nodes\Example\example.svg which is URL encoded automatically by the browser as http://localhost:5678/icons/CUSTOM/C:/Users/OlliPerttil%C3%A4/.n8n-node-cli/.n8n/custom/node_modules/n8n-nodes-quartal-hub/dist/nodes/Example/example.svg. Fetching this URL fails probably because there is no URL decoding on the receiving side.

Suggestions to fix:

  • Allow external URLs (starting with "https://") for icons so we can use icons from CDN
  • Implement the fix described here: Icons are not showing in custom nodes n8n#12944 (comment)
    • This bug was closed by @Joffcom in February. Based on comments, this bug is clearly still an issue, probably not only for these circumstanses but in many cases where there is something special in the path.
    • I have not tested the solution, but it makes sense to me
  • At least URI-encode the path
    • Though generally having the full path like this in the URL is probably quite a bad idea

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