quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

QuickAdd User Script step unusable — input accepted but Add/Browse disabled, script never runs

Open kronniq opened this issue 3 months ago • 13 comments

When adding a User Script step to a Macro, QuickAdd does not allow selecting or attaching a script.

The input field accepts text.
The Add button, which becomes visible once data in input field, is not greyed out but unresponsive.
The Browse button is permanently disabled (greyed out).
Entering a script path manually (e.g. _scripts/my_script.js) and pressing enter does not register, and the script never runs.

Steps to reproduce:

Create a script file in the vault:

    _scripts/my_script.js

    Contents:

    module.exports = async (params) => {
        return "test";
    };

Restart Obsidian.

Create a new QuickAdd Macro.

In Macro editor, try to Add Step → User Script.

Observe:
    Input box accepts text.
    Add/Browse are greyed out.
    Path entry doesn’t work.
    Macro won’t run script.

Expected behavior: QuickAdd should allow attaching a .js script via the Browse button or by typing the relative path, and run the exported function when the Macro executes.

Actual behavior: UI is disabled, path entry ignored, script never runs.

Environment:

Obsidian v1.9.10>
QuickAdd v2.1.0
OS: ubuntu 24.04
Kernel: 6.14.0-28-generic

Additional notes:

Tried both _scripts/ in vault root and .obsidian/plugins/quickadd/scripts/.
Tried minimal module.exports script.
Tried multiple restarts of Obsidian.
Same result: User Script step non-functional.

kronniq avatar Aug 23 '25 04:08 kronniq

Hi, unfortunately I can't seem to recreate this issue. Given the script, path, etc.

Could you tell me which plugins you're using as well as if there are any QuickAdd errors in the Developer Console? You can access it with Command+Shift+I or Control Shift I on Windows. For you it will probably be Control Shift i on Ubuntu.

chhoumann avatar Aug 30 '25 20:08 chhoumann

Same here:

SYSTEM INFO: Obsidian version: v1.9.12 Installer version: v1.9.12 Operating system: Windows 11 Pro 10.0.26100 Login status: not logged in Language: de Insider build toggle: off Live preview: off Base theme: dark Community theme: none Snippets enabled: 18 Restricted mode: off Plugins installed: 60 Plugins enabled: 39 1: Typing Transformer v0.4.8 2: Templater v2.14.1 3: Set View Mode per Note v1.0.3 4: Plugins Annotations v1.7.8 5: Natural Language Dates v0.6.2 6: Local REST API v3.2.0 7: Local Backup v0.2.0 8: Image Converter v1.3.15 9: Dashboard navigator v8.0.0 10: Autofit Tabs v1.0.7 11: Auto Link Title v1.5.5 12: Advanced Tables v0.22.1 13: Quiet Outline v0.4.2 14: Vault Changelog v1.1.0 15: Creases v0.7.0 16: Pinned Notes v2.0.4 17: Countdown To v1.4.1 18: Recent Files v1.7.4 19: Calendar v1.5.10 20: Linter v1.29.2 21: BRAT v1.2.0 22: Better Export PDF v1.11.0 23: Dataview v0.5.68 24: Tasks v7.21.0 25: Automatically reveal active file v1.0.3 26: Mermaid Tools v1.3.0 27: Intelligente Tag-Suche v1.1.0 28: Style Settings v1.0.9 29: Supercharged Links v0.13.5 30: Commander v0.5.4 31: Refresh Any View v3.5.4 32: Homepage v4.2.2 33: File Diff v1.1.2 34: Datacore v0.1.24 35: Notebook Navigator v1.4.3 36: Backlink Cache v2.11.7 37: Number Headings (dezimal) v2.0.0 (2025-08-30) 38: Excel to Markdown Table v0.4.0 39: QuickAdd v2.1.0

merlinuwe avatar Aug 31 '25 13:08 merlinuwe

Appreciate the debug info, @merlinuwe! Are there any errors in your developer console?

chhoumann avatar Aug 31 '25 15:08 chhoumann

Appreciate the debug info, @merlinuwe! Are there any errors in your developer console?

No, but I tried it in a clean vault without only 3 plugins installed

Image

(Number Headings (dezimal) is a plugin adapted by me; not in a repository.)

I cannot get it run (I'm a beginner with your plugin.)

I use no CSS in this "Leervault".

Image

Console shows this at the moment:

Obsidian Developer Console plugin:dataview:20478 Dataview: version 0.5.68 (requires obsidian 0.13.11) plugin:quickadd:64 QuickAdd: (LOG) No migrations to run. plugin:dataview:13006 Dataview: all 6 files have been indexed in 0.006s (6 cached, 0 skipped).

In the meantime, I found an other solution for my problem (Templater plugin). So there is no need to help me, but the others.

merlinuwe avatar Sep 01 '25 08:09 merlinuwe

Okay, thank you. I also just tried a clean vault, but unfortunately I can't reproduce the issue. The only issue I can think of here is that you're somehow placing the JavaScript files in your.obsidian directory, which will make them undetectable.

Image

If anyone has any logs or errors that they can share, I'd be happy to hear them. The steps shared in the issue body all seem to work for me, even without restarting Obsidian, and even in a completely new vault. The script is the same, and I've observed that the input box does accept text, while the add and browse buttons are not grayed out.

chhoumann avatar Sep 01 '25 15:09 chhoumann

Thanks for the quick reply @chhoumann. Attached are screen snaps of console during marco, directory structure showing _scripts in vault and of my installed community plugins (haven't figured out how to get the output that @merlinuwe produced in theirs). Let me know if I can do anything else.

kronniq avatar Sep 02 '25 14:09 kronniq

if i had a brain ...

Image Image Image

kronniq avatar Sep 02 '25 15:09 kronniq

Same here

xfxme avatar Sep 28 '25 08:09 xfxme

I have the same issue on:

  • macOS 26
  • Obsidian Version 1.9.14 (Installer 1.8.10)

It's a new vault, with hardly any plugin installed, there's only one community plugin "Auto Note Mover", and a few builtin plugins.

The browse button is just inactive, clicking it does nothing, and when I add the path manually and click add, the button also does nothing, although it does not look disabled, I prefer using a hidden folder .quickadd/scripts/, but I tried the none hidden path as well to confirm, but no difference.

Image

And no, there are no erros in the console at all, it's just as if there's no callaback assigned to the click event. Or that it's failing silently.

MMSs avatar Oct 05 '25 18:10 MMSs

Hi @MMSs, I just tested with the case you gave. It seems renaming from .quickadd/scripts/main.js to _quickadd/scripts/main.js worked. Looks like hidden folders generally are not being detected.

chhoumann avatar Oct 05 '25 19:10 chhoumann

Added a notice which will say if no scripts are found + will give instructions for what to do if that's the case. Hopefully that'll help users that encounter this issue.

But I must admit I am having a hard time recreating it. Would appreciate any help from someone that can recreate!

chhoumann avatar Oct 05 '25 19:10 chhoumann

Thank you @chhoumann. Just now I got how it works; I thought that browse will open a file browser, but it actually just looks for js files anywhere in the vault. And of course, like you said, all hidden folders/files are excluded.

MMSs avatar Oct 05 '25 20:10 MMSs

I ran into a similar issue, but ended up getting to the bottom of it. Because I created my scripts in obsidian, they weren't javascript files (scripts.js), but actually markdown files (script.js.md).

It wasn't easy to immediately spot in obsidian, so adding a warning to not use obsidian to create scripts might be helpful for beginners.

natleahh avatar Oct 06 '25 07:10 natleahh