Solved: incompatible plugin jTab #397
Replies: 6 comments 2 replies
-
Thank you for your kind feedback! ❤️ Also, thank you for the very well detailed problem report! 😎 @dokmanc has the same problem, too: #351 (And I never actually got to inspect the problem much, so I still do not have any solutions).
I'm not certain about this problem, but I guess it's not actually causing these bugs. It might be just some unrelated other issue with jTab? But I'm not 100 % sure this doesn't cause the actual problem.
I installed the jTab plugin now and was able to reproduce the I also happened to have a shell command executing via events which outputs text to statusbar, and it has the following error: I tried to glance through the source code of the jTab plugin quickly, but didn't have enough time to find out anything suspicious. Also, the problem could be in one of the libraries the plugin is using. I'm suspecting that something tampers with global The jTab plugin also has this issue mentioning another plugin that suffers from this problem: davfive/obsidian-jtab#10 I thought I'd open up an issue in the jTab plugin's repository myself, too, but I don't have much time now, and also as I think there's already valuable information in this discussion, I'll invite the jTab plugin's author to this discussion. Hello, @davfive ! 🙂 Do you have some opinions on how to go forward with this incompatibility problem? 🙂 I don't have much time to inspect the jTab plugin's source code myself, but if there's anything I can do on my plugin's side, please let me know. 👍 |
Beta Was this translation helpful? Give feedback.
-
Thanks for pulling me into the conversation. I've added an issue to my
board. I haven't been using Obsidian for a while, but that's no excuse to
not continue to support the community when my plugin is breaking people.
Sorry 'bout that.
I've pulled the contents of your email into an issue and will try to get
some cycles to look at it this weekend.
davfive/obsidian-jtab#15
David
…On Thu, Feb 29, 2024 at 10:15 AM Jarkko Linnanvirta < ***@***.***> wrote:
First of all, thank you for your great plugin, i love it!
Thank you for your kind feedback! ❤️ Also, thank you for the very well
detailed problem report! 😎
@dokmanc <https://github.com/dokmanc> has the same problem, too: #351
<#351> (And
I never actually got to inspect the problem much, so I still do not have
any solutions).
Error in Obsidian console: Step 4:
- app.js:1 Error: Plugin "obsidian-jtab" is not passing Component in
renderMarkdown. This is needed to avoid memory leaks when embedded contents
register global event handlers.
at t.render (app.js:1:1276278)
at t.renderMarkdown (app.js:1:1276059)
at Il.display (plugin:obsidian-jtab:249:2362)
at t.openTab (app.js:1:2741344)
at HTMLDivElement. (app.js:1:2739783)
I'm not certain about this problem, but I *guess* it's not actually
causing these bugs. It might be just some unrelated other issue with jTab?
But I'm not 100 % sure this doesn't cause the actual problem.
Step 5:
- plugin:obsidian-shellcommands:15606 Uncaught TypeError:
tab_content.removeClass is not a function
at button.onclick (plugin:obsidian-shellcommands:15606:29)
at createTabs (plugin:obsidian-shellcommands:15648:32)
at SC_MainSettingsTab.display (plugin:obsidian-shellcommands:16620:30)
at t.openTab (app.js:1:2741344)
at HTMLDivElement. (app.js:1:2739783)
I installed the jTab plugin now and was able to reproduce the tab_content.removeClass
is not a function error.
I also happened to have a shell command executing via events which outputs
text to statusbar, and it has the following error:
kuva.png (view on web)
<https://github.com/Taitava/obsidian-shellcommands/assets/13002142/c8d9f9f5-06f1-458e-9cac-015363dac15b>
I suspect that this is also caused by some incompatibility with jTab, as
disabling jTab and restarting Obsidian prevented this problem from
happening.
I tried to glance through the source code of the jTab plugin quickly, but
didn't have enough time to find out anything suspicious. Also, the problem
could be in one of the libraries the plugin is using. I'm suspecting that
something tampers with global HTMLElement and String objects, as those
seem to be missing methods that should normally be available. This is just
my guessing, as I didn't go far with my inspections.
The jTab plugin also has this issue mentioning another plugin that suffers
from this problem: davfive/obsidian-jtab#10
<davfive/obsidian-jtab#10>
I thought I'd open up an issue in the jTab plugin's repository myself,
too, but I don't have much time now, and also as I think there's already
valuable information in this discussion, I'll invite the jTab plugin's
author to this discussion. Hello, @davfive <https://github.com/davfive> !
🙂 Do you have some opinions on how to go forward with this incompatibility
problem? 🙂 I don't have much time to inspect the jTab plugin's source code
myself, but if there's anything I can do on my plugin's side, please let me
know. 👍
—
Reply to this email directly, view it on GitHub
<#397 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGAYW5VIPITGMGR6BXOI4LYV5X2LAVCNFSM6AAAAABDUVYPDGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DMMZUGMZTG>
.
You are receiving this because you were mentioned.Message ID:
<Taitava/obsidian-shellcommands/repo-discussions/397/comments/8634333@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Spend some time looking into it tonight - no solution yet.
I'll see if I can get some cycles tomorrow night. However, I have work
calls in the evening also. My brain has started churning on the problem, so
you don't have to worry about me forgetting about it. My annoying brain
won't let me until the problem is solve (or drink enough whiskey)
Anyway, here's my updated from the comment
<davfive/obsidian-jtab#15 (comment)>
to keep you in the loop:
No root cause determined yet
I have isolated where
I tried not loading jtab.tardate.js and raphael ... and shell-command
started working again. Now I just have to figure out what specifically is
causing the problem so here's my research so far ...
I have ruled out
1.
"Error: Plugin "obsidian-jtab" is not passing Component in
renderMarkdown"
I am aware of this error, and the reason (I knowingly released it that
way)
That error is caused because I wanted to have my help content in the
settings page so I render markdown on the settings page. However, Obsidian
complains when you render outside of a component (and I don't have one to
pass because I am in settings). I always meant to get back to it to see if
there was a way to auto-trigger the cleanup - I do detect when someone
leaves the settings page because that's when I save the changes.
2.
jtab.tardate.js (original library) using jQuery (loading globally)
I refacted the original tardate code to remove the jQuery (in case it
was stomping on someone elses version). No joy.
3.
jtab.tardate.js (original library) playing tricks with window.onload
I normalized jtab.tardate.js's use of window.onload. No luck
4.
wrapping jtab.tardate.js properly with the module pattern (anonymous
function + limited exports)
I was hopeful, but this didn't work 😦
Next things to try (not today, I do have to get enough sleep tonight to be
present for work tomorrow)
1. Have jtab.tardate.js stop importing raphael.
2. Wrap raphael in an anonymous function (I've actually done this a
little bit, but I don't think it was fully successful.
3. Look through raphael code to see if they are doing anything weird.
4. Sleep on it and see if I have any better ideas tomorrow.
…On Sun, Mar 3, 2024 at 9:52 AM Jarkko Linnanvirta ***@***.***> wrote:
Thank you @davfive <https://github.com/davfive> for your message and for
looking into this 🙂. I subscribed to the issue you created in your repo. 👍
I haven't been using Obsidian for a while, but that's no excuse to
not continue to support the community when my plugin is breaking people.
Sorry 'bout that.
That happens, bugs can't be avoided. 🙂
—
Reply to this email directly, view it on GitHub
<#397 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGAYWZRXSBOHBOBQQPWE2LYWNPMTAVCNFSM6AAAAABDUVYPDGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DMNJYHE4TA>
.
You are receiving this because you were mentioned.Message ID:
<Taitava/obsidian-shellcommands/repo-discussions/397/comments/8658990@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Eureka! I found the root cause. The jTab library was extending Array
with `Array.prototype.max_chars
= ...`. I will put a fix in today.
David
…On Sun, Mar 3, 2024 at 11:32 PM David ***@***.***> wrote:
Spend some time looking into it tonight - no solution yet.
I'll see if I can get some cycles tomorrow night. However, I have work
calls in the evening also. My brain has started churning on the problem, so
you don't have to worry about me forgetting about it. My annoying brain
won't let me until the problem is solve (or drink enough whiskey)
Anyway, here's my updated from the comment
<davfive/obsidian-jtab#15 (comment)>
to keep you in the loop:
No root cause determined yet
I have isolated where
I tried not loading jtab.tardate.js and raphael ... and shell-command
started working again. Now I just have to figure out what specifically is
causing the problem so here's my research so far ...
I have ruled out
1.
"Error: Plugin "obsidian-jtab" is not passing Component in
renderMarkdown"
I am aware of this error, and the reason (I knowingly released it that
way)
That error is caused because I wanted to have my help content in the
settings page so I render markdown on the settings page. However, Obsidian
complains when you render outside of a component (and I don't have one to
pass because I am in settings). I always meant to get back to it to see if
there was a way to auto-trigger the cleanup - I do detect when someone
leaves the settings page because that's when I save the changes.
2.
jtab.tardate.js (original library) using jQuery (loading globally)
I refacted the original tardate code to remove the jQuery (in case it
was stomping on someone elses version). No joy.
3.
jtab.tardate.js (original library) playing tricks with window.onload
I normalized jtab.tardate.js's use of window.onload. No luck
4.
wrapping jtab.tardate.js properly with the module pattern (anonymous
function + limited exports)
I was hopeful, but this didn't work 😦
Next things to try (not today, I do have to get enough sleep tonight to be
present for work tomorrow)
1. Have jtab.tardate.js stop importing raphael.
2. Wrap raphael in an anonymous function (I've actually done this a
little bit, but I don't think it was fully successful.
3. Look through raphael code to see if they are doing anything weird.
4. Sleep on it and see if I have any better ideas tomorrow.
On Sun, Mar 3, 2024 at 9:52 AM Jarkko Linnanvirta <
***@***.***> wrote:
> Thank you @davfive <https://github.com/davfive> for your message and for
> looking into this 🙂. I subscribed to the issue you created in your repo. 👍
>
> I haven't been using Obsidian for a while, but that's no excuse to
> not continue to support the community when my plugin is breaking people.
> Sorry 'bout that.
>
> That happens, bugs can't be avoided. 🙂
>
> —
> Reply to this email directly, view it on GitHub
> <#397 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAGAYWZRXSBOHBOBQQPWE2LYWNPMTAVCNFSM6AAAAABDUVYPDGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DMNJYHE4TA>
> .
> You are receiving this because you were mentioned.Message ID:
> <Taitava/obsidian-shellcommands/repo-discussions/397/comments/8658990@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
This is fixed and released in v1.2.3 available now. Thanks for the push to
figure it out. Much appreciated.
David
P.S., I also fixed the other issue you mentioned with the possible memory
leak and the plugin (because Obsidian team didn't like "Obsidian jTab") has
been renamed to "jTab Guitar Codeblocks" - pending merging my pull request.
…On Sun, Mar 10, 2024 at 12:52 PM David ***@***.***> wrote:
Eureka! I found the root cause. The jTab library was extending Array with `Array.prototype.max_chars
= ...`. I will put a fix in today.
David
On Sun, Mar 3, 2024 at 11:32 PM David ***@***.***> wrote:
> Spend some time looking into it tonight - no solution yet.
>
> I'll see if I can get some cycles tomorrow night. However, I have work
> calls in the evening also. My brain has started churning on the problem, so
> you don't have to worry about me forgetting about it. My annoying brain
> won't let me until the problem is solve (or drink enough whiskey)
>
> Anyway, here's my updated from the comment
> <davfive/obsidian-jtab#15 (comment)>
> to keep you in the loop:
>
> No root cause determined yet
> I have isolated where
>
> I tried not loading jtab.tardate.js and raphael ... and shell-command
> started working again. Now I just have to figure out what specifically is
> causing the problem so here's my research so far ...
> I have ruled out
>
> 1.
>
> "Error: Plugin "obsidian-jtab" is not passing Component in
> renderMarkdown"
>
> I am aware of this error, and the reason (I knowingly released it
> that way)
> That error is caused because I wanted to have my help content in the
> settings page so I render markdown on the settings page. However, Obsidian
> complains when you render outside of a component (and I don't have one to
> pass because I am in settings). I always meant to get back to it to see if
> there was a way to auto-trigger the cleanup - I do detect when someone
> leaves the settings page because that's when I save the changes.
>
> 2.
>
> jtab.tardate.js (original library) using jQuery (loading globally)
>
> I refacted the original tardate code to remove the jQuery (in case it
> was stomping on someone elses version). No joy.
>
> 3.
>
> jtab.tardate.js (original library) playing tricks with window.onload
>
> I normalized jtab.tardate.js's use of window.onload. No luck
>
> 4.
>
> wrapping jtab.tardate.js properly with the module pattern (anonymous
> function + limited exports)
>
> I was hopeful, but this didn't work 😦
>
>
> Next things to try (not today, I do have to get enough sleep tonight to
> be present for work tomorrow)
>
> 1. Have jtab.tardate.js stop importing raphael.
> 2. Wrap raphael in an anonymous function (I've actually done this a
> little bit, but I don't think it was fully successful.
> 3. Look through raphael code to see if they are doing anything weird.
> 4. Sleep on it and see if I have any better ideas tomorrow.
>
>
> On Sun, Mar 3, 2024 at 9:52 AM Jarkko Linnanvirta <
> ***@***.***> wrote:
>
>> Thank you @davfive <https://github.com/davfive> for your message and
>> for looking into this 🙂. I subscribed to the issue you created in your
>> repo. 👍
>>
>> I haven't been using Obsidian for a while, but that's no excuse to
>> not continue to support the community when my plugin is breaking people.
>> Sorry 'bout that.
>>
>> That happens, bugs can't be avoided. 🙂
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#397 (reply in thread)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AAGAYWZRXSBOHBOBQQPWE2LYWNPMTAVCNFSM6AAAAABDUVYPDGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DMNJYHE4TA>
>> .
>> You are receiving this because you were mentioned.Message ID:
>> <Taitava/obsidian-shellcommands/repo-discussions/397/comments/8658990@
>> github.com>
>>
>
|
Beta Was this translation helpful? Give feedback.
-
Thank you very much, that's great! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, thank you for your great plugin, i love it!
About the problem:
I have installed and activated the plugin "Obsidian jTab" (for guitar sheet music stuff). When I try to click on a tab in the settings of "Shell commands" (for example "Preactions", no view opens and an error appears in the debug view. I'm not sure which code is causing the error, but I wanted to let you know and hope you have an idea.
Technical Environment:
OS: macOS Ventura, Version 13.6.4
Obsidian: Version 1.5.3 (Installer 1.4.16)
Shell Commands: Version 0.21.0
Obsidian jTab: Version 1.2.2 https://github.com/davfive/obsidian-jtab
Steps to cause the error:
Error in Obsidian console:
Step 4:
at t.render (app.js:1:1276278)
at t.renderMarkdown (app.js:1:1276059)
at Il.display (plugin:obsidian-jtab:249:2362)
at t.openTab (app.js:1:2741344)
at HTMLDivElement. (app.js:1:2739783)
Step 5:
at button.onclick (plugin:obsidian-shellcommands:15606:29)
at createTabs (plugin:obsidian-shellcommands:15648:32)
at SC_MainSettingsTab.display (plugin:obsidian-shellcommands:16620:30)
at t.openTab (app.js:1:2741344)
at HTMLDivElement. (app.js:1:2739783)
Step 6:
at button.onclick (plugin:obsidian-shellcommands:15606:29)
at SC_MainSettingsTab.rememberLastPosition (plugin:obsidian-shellcommands:17106:60)
at eval (plugin:obsidian-shellcommands:16666:18)
If I swap the order of the plugin activation (first "jTab" then "Shell Commands") the error in step 4 does not occur.
I would be happy if there is a solution here, feel free to contact me if you need more information or if I can help with debugging.
Best regards
David
Beta Was this translation helpful? Give feedback.
All reactions