Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while loading the plugin. #728

Closed
munish259272 opened this issue Aug 30, 2024 · 8 comments
Closed

Error while loading the plugin. #728

munish259272 opened this issue Aug 30, 2024 · 8 comments
Labels
bug Something isn't working released

Comments

@munish259272
Copy link

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 munish259272 added the bug Something isn't working label Aug 30, 2024
@chhoumann
Copy link
Owner

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.

@baodrate
Copy link

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
Copy link

baodrate commented Oct 3, 2024

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

@mochsner
Copy link

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

@baodrate
Copy link

workaround detailed here: #746 (comment)

github-actions bot pushed a commit that referenced this issue Nov 1, 2024
## [1.11.2](1.11.1...1.11.2) (2024-11-01)

### Bug Fixes

* bug failed to load on first install due to attempting to copy a function (fix [#728](#728), [#746](#746), [#749](#749)) ([ad97d1e](ad97d1e))
Copy link

github-actions bot commented Nov 1, 2024

🎉 This issue has been resolved in version 1.11.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@chhoumann
Copy link
Owner

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.

@mochsner
Copy link

mochsner commented Dec 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

4 participants