obsidian-advanced-uri icon indicating copy to clipboard operation
obsidian-advanced-uri copied to clipboard

[Bug] Append doesn't always append

Open MrSamoDude opened this issue 1 year ago • 5 comments

The append feature doesn't aways work, this occurs on both the iPhone and Mac versions of Obsidian. If I've recently opened Obsidian and the destination note, the append feature appears to work successfully. If I've not already got Obsidian open or recently visited the destination note, the append feature will successfully open Obsidian and open the respective note, but doesn't always append the required text to the end of the note. It feels like there's some kinds of timeout kicking in before the append function can complete or it's trying to append before the note has fully opened. If I launch the same URI a 2nd time the data is successfully appended.

I'm calling the URI from Apple Shortcuts. An example of the URI I'm using: obsidian://advanced-uri?vault=vault_name&filepath=Bookmarks/site_name.md&data=data&mode=append

The destination note is currently over 100 lines long if that has any impact.

Obsidian v1.5.8 Advanced URI v1.40.0 Sonoma 14.3.1 or iOS v17.3.1

Thanks

MrSamoDude avatar Mar 05 '24 20:03 MrSamoDude

mode=prepend has the same problem obsidian://advanced-uri?vault=vault_name&daily=true&data=1111&mode=prepend

  • Fails when document is not created
  • Fails when document has been created without any content
  • Execution is successful when the document has been created and has content

Obsidian v1.5.8 Advanced URI v1.40.0 Windows 10 Android 13

tch123 avatar Apr 02 '24 23:04 tch123

I am noticing that append from iOS shortcuts never works, or stopped working at some point

bcohen44 avatar Apr 08 '24 15:04 bcohen44

I could reproduce the prepend issue with an empty file, which is now fixed in the new version. But other than everything worked fine on linux, android and iOS. @bcohen44 please share the not working uri.

Vinzent03 avatar Apr 09 '24 12:04 Vinzent03

obsidian://advanced-uri?vault=Brian_Obsidian_Vault&daily=true&data=foo%20bar&mode=append When I send this on Chrome on Windows, it works fine.
on iOS, I get a "File already exists"error

bcohen44 avatar Apr 10 '24 18:04 bcohen44

In my case, the lost append when the note doesn't exist, the issue stems from race conditions created by other extensions. The primary culprit for me is Templater. Disabling its file create hook, where it will apply the template on note create, appears to have fixed my uninitialized note append for me, albeit in limited testing.

Liquidmantis avatar Apr 25 '24 12:04 Liquidmantis