pashashocky / obsidian-note-gallery

A masonry note gallery for obsidian.
GNU General Public License v3.0
195 stars 7 forks source link

EmbeddedSearch is not a constructor #8

Closed gapmiss closed 12 months ago

gapmiss commented 1 year ago

Plugin is not rendering. Javascript errors regarding "EmbeddedSearch."

version: 0.0.40

I get these errors whether I build the plugin or install via community.

Here is the code block:

~~~~note-gallery
path: Atlas/Utilities/Assets
limit: 25
recursive: true
sort: desc
sortby: mtime
fontSize: 7pt
showTitle: true
~~~~

and the errors:

index.tsx:32 Uncaught (in promise) TypeError: this.plugin.EmbeddedSearch is not a constructor
    at eval (index.tsx:32:9)
    at t.onLayoutReady (app.js:1:1975503)
    at CodeBlockNoteGallery.eval (index.tsx:24:31)
    at Generator.next (<anonymous>)
    at eval (plugin:note-gallery:79:61)
    at new Promise (<anonymous>)
    at __async (plugin:note-gallery:63:10)
    at CodeBlockNoteGallery.onload (index.tsx:23:18)
    at e.load (app.js:1:1140190)
    at e.addChild (app.js:1:1140591)
eval @ index.tsx:32
t.onLayoutReady @ app.js:1
eval @ index.tsx:24
eval @ plugin:note-gallery:79
__async @ plugin:note-gallery:63
onload @ index.tsx:23
e.load @ app.js:1
e.addChild @ app.js:1
eval @ main.ts:145
wrapper @ index.js:20
addChild @ app.js:1
eval @ main.ts:89
eval @ plugin:note-gallery:79
__async @ plugin:note-gallery:63
eval @ main.ts:87
(anonymous) @ app.js:1
t.postProcess @ app.js:1
t.postProcess @ app.js:1
h @ app.js:1
e.onRender @ app.js:1
requestAnimationFrame (async)
ft @ app.js:1
e.queueRender @ app.js:1
e.set @ app.js:1
t.set @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
a @ app.js:1
Promise.then (async)
l @ app.js:1
(anonymous) @ app.js:1
v @ app.js:1
t.setMode @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
v @ app.js:1
t.setState @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
v @ app.js:1
t.setViewState @ app.js:1
t.toggleMode @ app.js:1
checkCallback @ app.js:1
Eq @ app.js:1
e.executeCommand @ app.js:1
e.onTrigger @ app.js:1
e.handleKey @ app.js:1
e.handleKey @ app.js:1
t.handleKey @ app.js:1
e.onKeyEvent @ app.js:1

Let me know if I can assist further with troubleshooting.

Thank you

pashashocky commented 1 year ago

Yeaaaah, that bit was quite annoying @gapmiss :) Thank you for the bug report - made some changes to how it gets initialized, try 0.0.43 and let me know please.

gapmiss commented 1 year ago

Thank you … still no rendering.

plugin:note-gallery:3809 Uncaught (in promise) TypeError: this.plugin.EmbeddedSearch is not a constructor
    at CodeBlockNoteGallery.eval (plugin:note-gallery:3809:9)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:note-gallery:66:24)
eval @ plugin:note-gallery:3809
fulfilled @ plugin:note-gallery:66
Promise.then (async)
step @ plugin:note-gallery:78
eval @ plugin:note-gallery:79
__async @ plugin:note-gallery:63
onload @ plugin:note-gallery:3801
e.load @ app.js:1
e.addChild @ app.js:1
eval @ plugin:note-gallery:4219
wrapper @ plugin:note-gallery:2614
addChild @ app.js:1
eval @ plugin:note-gallery:4176
fulfilled @ plugin:note-gallery:66
Promise.then (async)
step @ plugin:note-gallery:78
eval @ plugin:note-gallery:79
__async @ plugin:note-gallery:63
eval @ plugin:note-gallery:4173
(anonymous) @ app.js:1
t.postProcess @ app.js:1
t.postProcess @ app.js:1
h @ app.js:1
e.onRender @ app.js:1
requestAnimationFrame (async)
ft @ app.js:1
e.queueRender @ app.js:1
e.set @ app.js:1
t.set @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
a @ app.js:1
Promise.then (async)
l @ app.js:1
(anonymous) @ app.js:1
v @ app.js:1
t.setMode @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
v @ app.js:1
t.setState @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
v @ app.js:1
t.setViewState @ app.js:1
t.toggleMode @ app.js:1
checkCallback @ app.js:1
Eq @ app.js:1
e.executeCommand @ app.js:1
e.onTrigger @ app.js:1
e.handleKey @ app.js:1
e.handleKey @ app.js:1
t.handleKey @ app.js:1
e.onKeyEvent @ app.js:1
pashashocky commented 1 year ago

Typing from my phone - Ill give it a think, but it's likely interfering with another plugin, because of the patch.

Could you please:

Thank you!

gapmiss commented 1 year ago

Scratch that last error. After stepping away from Obsidian for a while, I saw your message and re-opened a note with a gallery and it now works just fine, with no JS errors. I have no explanation, but will continue to monitor. Thank you for the quick FIX!

pashashocky commented 1 year ago

No problem - usually you should do reload app without saving from command palette to imitate an obsidian restart. For this plugin you can also run Drop all cache and re-initialize database

Ill close this for now

gapmiss commented 1 year ago

This error showed up again. This time I installed the plugin in a NEW vault w/ NO plugins installed.

I am using the "Insider" build 1.5.0: Version 1.5.0 (Installer 1.4.13)

Uncaught (in promise) TypeError: this.plugin.EmbeddedSearch is not a constructor
    at De.eval (plugin:note-gallery:6:61854)
    at Generator.next (<anonymous>)
    at a (plugin:note-gallery:6:1229)
pashashocky commented 12 months ago

@gapmiss - thank you for testing it! I currently only have access to 1.4.16, I've tested on a new vault with just the plugin installed and can confirm that it works so far...

I don't currently have access to 1.5.0 - it's likely that the undocumented internals this plugin is currently relying on might have changed. If you're willing/able to share the 1.5.0 version - I'd be happy to make a fix/look into it...

gapmiss commented 12 months ago

@pashashocky ~ Thank you, I'd be wiling to assist in troubleshooting. I am not sure the best way to get you access to the latest and greatest. Please contact me at gapmiss+at+proton.me and we can discuss further.

pashashocky commented 12 months ago

@gapmiss I've spent today fixing this as I had other people on discord help debug. Fixed their issues as of 0.0.54 rewrite, please would you try the latest version again, if it still doesn't work, we can figure out how to debug.

gapmiss commented 12 months ago

@pashashocky ~ Excellent… Yes, plugin working as expected on both NEW vault and existing vault. Thank you!