quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

Error while loading the plugin.

Open munish259272 opened this issue 1 year ago • 4 comments

Describe the bug I am not facing any issue but in the developer console it shows like this below the loading information for quick add.

is this something to be concerned about or can be ignored.

Uncaught (in promise) DOMException: Failed to execute 'structuredClone' on 'Window': W=>b(d=>({...d,...W})) could not be cloned. at structuredCloneInternal (app://obsidian.md/lib/pdfjs/pdf.min.js:22:149521) at structuredCloneInternal (app://obsidian.md/lib/pdfjs/pdf.min.js:22:150684) at structuredClone (app://obsidian.md/lib/pdfjs/pdf.min.js:22:153395) at i5 (plugin:quickadd:55:5868) at async GI.onload (plugin:quickadd:73:7765)

munish259272 avatar Aug 30 '24 08:08 munish259272

QuickAdd tries to back up settings while it updates after new releases. This uses the structuredClone function you see. However, it seems some other plugin or functionality is interfering by overwriting it. If you have any PDF tools, or maybe it's Obsidians own, they are trying to import a library called "pdf.js". This is the tool that is creating the error.

Basically, this means there may be errors when the plugin updates its settings when a new version is out. It's not due to QuickAdd, but some other plugin using pdf.js.

chhoumann avatar Aug 30 '24 08:08 chhoumann

fwiw, I can reproduce this error with an empty vault, no community plugins other than quickadd, and all core plugins disabled (Obsidian v1.7.1)

baodrate avatar Sep 18 '24 11:09 baodrate

update: reverted to v1.6.7 (latest stable) and can reproduce

SYSTEM INFO:
	Obsidian version: v1.6.7
	Installer version: v1.6.7
	Operating system: Darwin Kernel Version 24.0.0: Mon Aug 12 21:29:00 PDT 2024; root:xnu-11215.1.10~5/RELEASE_ARM64_T6000 24.0.0
	Login status: logged in
	Catalyst license: supporter
	Insider build toggle: on
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 1
	Plugins enabled: 1
		1: QuickAdd v1.11.1

Note that this causes the migrations to be disrupted; only the first one completes before the uncaught exception occurs. See:

image

Although migrate() happens at the end of onload so other functionality is not impactd.

In v1.6.7 this error is silent. On >=v1.7.1 it results in an error notification:

image

baodrate avatar Oct 03 '24 10:10 baodrate

Was very much looking forward to trying this plug-in after watching some videos, but running into the same issue. Was hopeful to find this, but are there any workarounds? For me it occurs when I try to toggle QuickAdd as enabled, not when running an action.

image QuickAdd: 1.11.1 Obsidian: 1.7.4 OS: Ubuntu 20.04

mochsner avatar Oct 18 '24 13:10 mochsner

workaround detailed here: https://github.com/chhoumann/quickadd/issues/746#issuecomment-2437651398

baodrate avatar Oct 25 '24 12:10 baodrate

:tada: This issue has been resolved in version 1.11.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Nov 01 '24 21:11 github-actions[bot]

Hey, I'm sorry for taking so long about getting this fixed! It should hopefully be resolved now. I hope you enjoy QuickAdd, and please let me know if there are any further issues. All the best, Christian.

chhoumann avatar Nov 01 '24 21:11 chhoumann

Confirmed all fixed... and yes, definitely enjoying it, thank you for your hard work @chhoumann !

mochsner avatar Dec 04 '24 17:12 mochsner