chrisgrieser / shimmering-obsidian

Alfred Workflow with dozens of features for controlling your Obsidian vault.
https://alfred.app/workflows/chrisgrieser/shimmering-obsidian/
MIT License
817 stars 40 forks source link

[Bug]: Browse Folder Is Empty #149

Closed hwangy closed 11 months ago

hwangy commented 11 months ago

Bug Description

When searching "o Useful Tools" and I hit enter to browse the corresponding folder, "Search Obsidian Vault" briefly pops up under the main search bar, but then disappears. No results show up for notes within the Obsidian folder.

I noticed that oinfo reports: "Not all metadata not found. Please run osetup and retry. metadata.json String Length: 209662". However, I've tried running osetup multiple times, but this issue persists.

Relevant Screenshot

image

image

To Reproduce

  1. Open Alfred
  2. Search for a folder "o "
  3. Hit enter (to browse)
  4. Nothing shows up

Debugging Log

[14:59:28.988] Shimmering Obsidian[Script Filter] Processing complete
[14:59:29.018] Shimmering Obsidian[Script Filter] Passing output 'Research/Useful Tools' to Call External Trigger
[14:59:29.019] Shimmering Obsidian[External] Processing complete
[14:59:29.020] Shimmering Obsidian[External] Passing output 'Research/Useful Tools' to Arg and Vars
[14:59:29.020] Shimmering Obsidian[Arg and Vars] Processing complete
[14:59:29.021] Shimmering Obsidian[Arg and Vars] Passing output 'Research/Useful Tools' to Arg and Vars
[14:59:29.022] Shimmering Obsidian[Arg and Vars] Processing complete
[14:59:29.022] Shimmering Obsidian[Arg and Vars] Passing output 'Research/Useful Tools' to Conditional
[14:59:29.022] Shimmering Obsidian[Conditional] Processing complete
[14:59:29.023] Shimmering Obsidian[Conditional] Passing output 'Research/Useful Tools' to Call External Trigger
[14:59:29.023] Shimmering Obsidian[Script Filter] Running directly with argument ''
[14:59:29.024] Shimmering Obsidian[Script Filter] Queuing argument '(null)'
[14:59:29.254] Shimmering Obsidian[Script Filter] Script with argv '(null)' finished

Workflow Configuration

image

Version & System Information

-------------------------------
INTERNAL WORKFLOW CONFIGURATION
Vault Path: /Users/yeongwoohwang/Documents/Woo's Vault
config folder: exists
Metadata JSONs: 0/4
Not all metadata not found. Please run `osetup` and retry.
metadata.json String Length: 209662
-------------------------------
WORKSPACE DATA
'workspace' exists
'workspace.json' exists
-------------------------------
SYSTEM
macOS: 13.0
Alfred: 5.1.2
-------------------------------
INSTALLED VERSION
Obsidian: 1.4.13
This Workflow: 4.1.0
Advanced URI Plugin: 1.38.1
Metadata Extractor: 1.1.0
-------------------------------
LATEST VERSION
Obsidian: 1.4.13 (Insider: 1.4.13)
This Workflow: 4.1.0
Advanced URI Plugin: 1.38.1
Metadata Extractor: 1.1.0
-------------------------------

Last working version

3.8.1

Make sure you have done the following

chrisgrieser commented 11 months ago
  1. This is quite puzzling to me, since without any metadata, the search should already fail to begin with. Can you paste the debugging log when pasting osetup?
  2. A possible reason why nothing in that particular folder can be found is that there is either no note, or that you added the folder (or all its notes) to the excluded files in the Obsidian settings (Files and Links → Excluded Files)
  3. Could you go to the folder yourVaultPath/.obsidian/plugins/metadata-extractor and list all files in that folder?
hwangy commented 11 months ago

This is the output of the debugger when running osetup

[07:13:20.374] Shimmering Obsidian[Script Filter] Queuing argument '(null)' [07:13:20.512] Shimmering Obsidian[Script Filter] Queuing argument '(null)' [07:13:21.895] Shimmering Obsidian[Keyword] Processing complete [07:13:21.896] Shimmering Obsidian[Keyword] Passing output '' to Run Script [07:13:22.640] Shimmering Obsidian[Run Script] Processing complete [07:13:22.640] Shimmering Obsidian[Run Script] Passing output '' to Conditional [07:13:22.641] Shimmering Obsidian[Conditional] Processing complete [07:13:22.641] Shimmering Obsidian[Conditional] Passing output '' to Post Notification [07:13:22.641] Shimmering Obsidian[Post Notification] Processing complete [07:13:22.642] Shimmering Obsidian[Post Notification] Passing output '' to Play Sound

My excluded files is empty: image

I have the following files in metadata-extractor

If it's useful, I also see that in allExceptMd.json, the following lines are present, { "name": "Useful Tools", "relativePath": "Research/Useful Tools" },

hwangy commented 11 months ago

Something interesting that I've noticed; the browsing seems to fail when a folder contains no other subfolders. If I create a folder within the folder I'm searching for, then it works! If I then delete the folder, it once again fails.

chrisgrieser commented 11 months ago

It seems that the metadata is correctly created, only the oinfo command for some reason is not able to correctly identify it. Weird.

Something interesting that I've noticed; the browsing seems to fail when a folder contains no other subfolders. If I create a folder within the folder I'm searching for, then it works! If I then delete the folder, it once again fails.

That's a good find! I pushed an update which potentially fixes this issue. Could you download it and try again? https://github.com/chrisgrieser/shimmering-obsidian/releases/download/4.1.1/shimmering-obsidian.alfredworkflow

In case it fails, please share the debugging log for when it fails.

hwangy commented 11 months ago

That fixed it!! Thank you for the quick fix!

Miaoyifei-mz commented 4 months ago

Hello, when I updated to the latest version, this problem recurred.


INTERNAL WORKFLOW CONFIGURATION Vault Path: /Users/zhuangzhu/Library/Mobile Documents/iCloud~md~obsidian/Documents/Md 文档 config folder: exists Metadata JSONs: 4/4 metadata.json String Length: 746257

METADATA EXTRACTOR CONFIG {"writingFrequency":"30","writeFilesOnLaunch":true}

WORKSPACE DATA 'workspace' exists 'workspace.json' exists

SYSTEM macOS: 14.2.1 Alfred: 5.5

INSTALLED VERSION Obsidian: 1.5.12 This Workflow: 4.4.2 Advanced URI Plugin: 1.40.0 Metadata Extractor: 1.1.0

LATEST VERSION Obsidian: 1.5.12 (Insider: 1.5.12) This Workflow: 4.4.2 Advanced URI Plugin: 1.40.1 Metadata Extractor: 1.1.0

Miaoyifei-mz commented 4 months ago

@chrisgrieser

chrisgrieser commented 4 months ago

@Miaoyifei-mz please create a new bug report, since it contains information needed to investigate the issue.

Miaoyifei-mz commented 4 months ago

@chrisgrieser Thank you for your quick reply!😄️,I just found out that it might be a problem with the latest version of Alfred (5.5), and when I went back to the previous version (5.1.4), the workflow worked well without folder problems. Let's see if Alfred has the same problem after another update🤔️.