chrisgrieser / shimmering-obsidian

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

[Bug]: Initial setup does not work #98

Closed Neosaurus closed 1 year ago

Neosaurus commented 1 year ago

Bug Description

Used plugin fine before update. Obsidian and Shimmering Obsidian are up to date. osetup comes up, returns the relevant vault and successfully restarts Obsidian but then the plugin doesn't function as intended and allows for setup to occur again. Debugging logs attached.

Relevant Screenshot

No response

To Reproduce

In my instance, run osetup and choose vault. Obsidian will restart and require the workflow requires setup again.

Debugging Log

[22:19:13.900] Shimmering Obsidian[Script Filter] Queuing argument '(null)'
[22:19:14.068] Shimmering Obsidian[Script Filter] Script with argv '(null)' finished
[22:19:14.073] ERROR: Shimmering Obsidian[Script Filter] Code 1: /Users/joepayne/Library/CloudStorage/GoogleDrive-joe.argyll@gmail.com/My Drive/Software/Alfred Settings/Alfred.alfredpreferences/workflows/user.workflow.5CFCDB33-348D-4DED-AB99-B085129C7E7F/scripts/o_search.js: execution error: Error: SyntaxError: JSON Parse error: Unexpected EOF (-2700)
[22:19:16.463] Shimmering Obsidian[Script Filter] Queuing argument '(null)'
[22:19:16.571] Shimmering Obsidian[Script Filter] Script with argv '(null)' finished
[22:19:16.573] Shimmering Obsidian[Script Filter] {"items":[{"title":"Joe's Vault","subtitle":"Confirm with 'return' that this is your vault.","arg":"/Users/joepayne/Documents/Joe's Vault"}]}
[22:19:19.266] Shimmering Obsidian[Script Filter] Processing complete
[22:19:19.268] Shimmering Obsidian[Script Filter] Passing output '/Users/joepayne/Documents/Joe's Vault' to Run Script
[22:19:19.421] Shimmering Obsidian[Run Script] Processing complete
[22:19:19.424] Shimmering Obsidian[Run Script] Passing output '
' to Conditional
[22:19:19.426] Shimmering Obsidian[Conditional] Processing complete
[22:19:19.426] Shimmering Obsidian[Conditional] Passing output '
' to Post Notification
[22:19:19.427] Shimmering Obsidian[Post Notification] Processing complete
[22:19:19.427] Shimmering Obsidian[Post Notification] Passing output '
' to Write Text File
[22:19:19.427] Shimmering Obsidian[Write Text File] Processing complete
[22:19:19.428] Shimmering Obsidian[Write Text File] Passing output '/Users/joepayne/Documents/Joe's Vault/.obsidian/plugins/metadata-extractor/data.json' to Run Script
[22:19:26.902] Shimmering Obsidian[Run Script] Processing complete
[22:19:26.903] Shimmering Obsidian[Run Script] Passing output '' to Run Script
[22:19:27.077] ERROR: Shimmering Obsidian[Run Script] /Users/joepayne/Library/CloudStorage/GoogleDrive-joe.argyll@gmail.com/My Drive/Software/Alfred Settings/Alfred.alfredpreferences/workflows/user.workflow.5CFCDB33-348D-4DED-AB99-B085129C7E7F/scripts/osetup-4.js: execution error: Error: Error: sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file (2)
[22:19:27.085] Shimmering Obsidian[Run Script] Processing complete
[22:19:27.086] Shimmering Obsidian[Run Script] Passing output '' to Split Arg
[22:19:27.086] Shimmering Obsidian[Split Arg] Processing complete
[22:19:27.086] Shimmering Obsidian[Split Arg] Passing output '' to Post Notification
[22:19:27.087] Shimmering Obsidian[Post Notification] Processing complete
[22:19:27.087] Shimmering Obsidian[Post Notification] Passing output '' to Play Sound

### Workflow Configuration

not got one

### Version & System Information

```Text
doesnt work

Make sure you have done the following

chrisgrieser commented 1 year ago

if oinfo does not work, I need the following information. Sorry for that; normally the command oinfo automatically retrieves all these for you, this is the first time that even the debugging command oinfo failed.

image
inchanS commented 1 year ago

hi, I am also having the same problem.

in my intance,

next, my screenshots.

  1. installed workflow SCR-20220915-iwt

  2. osetup then The following notification appears. SCR-20220915-ix5

  3. so I did Manually Refresh Metadata then The following notification appears. SCR-20220915-ixd

  4. and This is the screenshot you need. SCR-20220915-ixo

chrisgrieser commented 1 year ago

Hmm. Is the file metadata.json empty? If not, could you try to completely remove the workflow and install again? A fresh install should solve this as last resort 🤔


Also for both of you: Could you share the debugging log when you try to run oinfo? Figuring out what is even preventing that command from running could also be relevant.

inchanS commented 1 year ago

... certainly metadata.json is there. I've done fresh install a few times already. 🤔 and oinfo doesn't work...

chrisgrieser commented 1 year ago

It's not only whether the file metadata.json is there, but also whether it is empty (which suggests there is a bug with the metadata extractor plugin)

as I said: could you share the debugging log for when you try oinfo? And also the debugging log for the o search? (You can get a debugging log by pressing cmd+d in the Alfred workflow window, run the command, and then copypaste the content of that appears in the smell window)

Without a debugging log, I won't be able to tell what the issue is.

Neosaurus commented 1 year ago

I managed to run oupdate through the debugger and a clean install and now it works! Sorry for the easy problem :(

chrisgrieser commented 1 year ago

weird. Well, keep me updated if there are still issues! 🙂