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

obsidian v1.7.4最新版插件无法打开 #23

Open
SwordBlade1 opened this issue Oct 21, 2024 · 3 comments
Open

obsidian v1.7.4最新版插件无法打开 #23

SwordBlade1 opened this issue Oct 21, 2024 · 3 comments

Comments

@SwordBlade1
Copy link

启动插件时立即自动关闭,已更新Obsidian最新版和插件0.26最新版。
image

@SwordBlade1 SwordBlade1 changed the title obsidian0.17最新版插件无法打开 obsidian v1.7.4最新版插件无法打开 Oct 21, 2024
@zhampu
Copy link

zhampu commented Nov 6, 2024

Having the same issue
here the log when i try to activate it:

Plugin failure: commentator TypeError: Cannot destructure property 'tooltip' of 'this.states[F]' as it is undefined. at HF.attachButtons (plugin:commentator:11:114319) at HF.setRendering (plugin:commentator:11:113282) at new HF (plugin:commentator:11:113162) at mt (plugin:commentator:11:115231) at NQ.onload (plugin:commentator:39:3906167)

`Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'detachButtons')
at NQ.onunload (plugin:commentator:39:3907741)
at e.unload (app.js:1:1230613)
at e.<anonymous> (app.js:1:2382993)
at app.js:1:237228
at Object.next (app.js:1:237333)
at app.js:1:236249
at new Promise (<anonymous>)
at v (app.js:1:235994)
at e.unloadPlugin (app.js:1:2382880)
at e.<anonymous> (app.js:1:2386249)
at app.js:1:237228
at Object.next (app.js:1:237333)
at app.js:1:236249
at new Promise (<anonymous>)
at v (app.js:1:235994)
at e.disablePlugin (app.js:1:2386123)
at e.<anonymous> (app.js:1:2386910)
at app.js:1:237228
at Object.next (app.js:1:237333)
at app.js:1:236249
at new Promise (<anonymous>)
at v (app.js:1:235994)
at e.disablePluginAndSave (app.js:1:2386756)
at t.<anonymous> (app.js:1:3080276)
at app.js:1:237228
at Object.next (app.js:1:237333)
at app.js:1:236249
at new Promise (<anonymous>)
at v (app.js:1:235994)
at t.changeCallback (app.js:1:3080086)
at t.setValue (app.js:1:1405906)
at t.<anonymous> (app.js:1:3080239)
at app.js:1:237228
at Object.next (app.js:1:237333)
at a (app.js:1:236051)`

@zhampu
Copy link

zhampu commented Nov 6, 2024

as a temporal solution I replaced this lines in the main.ts file

async onunload(){this.previewModeHeaderButton&&this.previewModeHeaderButton.detachButtons();this.editModeHeaderModeButton&&this.editModeHeaderModeButton.detachButtons();this.postProcessor&&qC.MarkdownPreviewRenderer.unregisterPostProcessor(this.postProcessor);for(let I of this.remove_monkeys)I();this.database&&this.database.unload();window.COMMENTATOR_DEBUG=void 0}

detachButtons(){if(!this.changeEvent)return;for(let I of this.plugin.app.workspace.getLeavesOfType("markdown"))this.detachButton(I);this.plugin.app.workspace.offref(this.changeEvent);this.changeEvent=null}

now I can see the comments/edits/add/ however not sure if everyrthing is working properly

@xmacex
Copy link

xmacex commented Nov 29, 2024

I too, unfortunately, fail to enable this very useful plugin. I am on Obsidian 1.7.7. It was working earlier this year.

❌▶ Plugin failure: commentator TypeError: Cannot read properties of undefined (reading 'cm')
    at HF.eval [as getvalue] (plugin:commentator:14:172)
    at HF.attachButtons (plugin:commentator:11:114298)
    at HF.setRendering (plugin:commentator:11:113282)
    at new HF (plugin:commentator:11:113162)
    at mt (plugin:commentator:11:115231)
    at NQ.onload (plugin:commentator:39:3906167)
❌▶ Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'detachButtons')
    at NQ.onunload (plugin:commentator:39:3907741)
    at e.unload (app.js:1:1230640)
    at e.<anonymous> (app.js:1:2199985)
    at app.js:1:237228
    at Object.next (app.js:1:237333)
    at app.js:1:236249
    at new Promise (<anonymous>)
    at g (app.js:1:235994)
    at e.unloadPlugin (app.js:1:2199872)
    at e.<anonymous> (app.js:1:2203241)

If there is anything I can help with for reporting, triaging, testing or something, plase let me know!

@zhampu where did you make that change? I would be interested in a workaround until this gets fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants