delashum / obsidian-checklist-plugin

MIT License
390 stars 42 forks source link

Loaded but Failed to Enable v2.0.1 #110

Closed davebhc71 closed 2 years ago

davebhc71 commented 2 years ago

Loaded but Failed to Enable v2.0.1 On iPad. Obsidian Mobile v1.05

Used previous versions without issues. Closed Obsidian, restarted. Same error. Uninstalled plugin. Closed Obsidian, restarted Obsidian, reinstalled plugin, same error when trying to enable. Nothing else has changed on system. Bummer!

JamesHWade commented 2 years ago

I am seeing the same thing. Desktop is still working as expected.

NavinChen commented 2 years ago

me too…… mobile version not work

delashum commented 2 years ago

😔 i'll try to look this weekend.

NavinChen commented 2 years ago

😔 i'll try to look this weekend.

Thanks for your hard work

JamesHWade commented 2 years ago

Yes, thank you for your great work on this plugin!

Broodje-met-Beleg commented 2 years ago

I have the same problem. Looking forward to using it on the iPad as well.

stonesphinx commented 2 years ago

Confirming error 'Failed to load plugin obsidian-checklist-plugin' whenever I try to enable it. Android Galaxy S20 Obsidian 1.0.5.

Tried reinstalling Checklist, restarting obsidian, etc. Tried rolling back to 2.0.0. Nothing.

Great plugin - I hope you can get it working again!

takato3000 commented 2 years ago

It seems that "Include Files" become glob pattern. for example (Periodic Notes)/**/* includes all files in Periodic Notes directory.(It works for me.)

stonesphinx commented 2 years ago

Got access to the Console! Here's what's coming up.

app.js:formatted:62669 Plugin failure: obsidian-checklist-plugin TypeError: Cannot read properties of undefined (reading 'sep')
    at anonymous (eval at <anonymous> (app.js:formatted:62557), <anonymous>:12496:33)
    at t.<anonymous> (app.js:formatted:62558)
    at app.js:formatted:5760
    at Object.next (app.js:formatted:5773)
    at s (app.js:formatted:5658)
(anonymous) @ app.js:formatted:62669
(anonymous) @ app.js:formatted:5760
(anonymous) @ app.js:formatted:5773
a @ app.js:formatted:5665
Promise.then (async)
l @ app.js:formatted:5676
(anonymous) @ app.js:formatted:5678
o @ app.js:formatted:5655
t.enablePlugin @ app.js:formatted:62644
(anonymous) @ app.js:formatted:62710
(anonymous) @ app.js:formatted:5760
(anonymous) @ app.js:formatted:5773
(anonymous) @ app.js:formatted:5678
o @ app.js:formatted:5655
t.enablePluginAndSave @ app.js:formatted:62706
(anonymous) @ app.js:formatted:79347
(anonymous) @ app.js:formatted:5760
(anonymous) @ app.js:formatted:5773
(anonymous) @ app.js:formatted:5678
o @ app.js:formatted:5655
(anonymous) @ app.js:formatted:79343
t.setValue @ app.js:formatted:41960
t.onClick @ app.js:formatted:41970

Let me know if there's any other info I can give.

delashum commented 2 years ago

Yes, v2 came with some breaking changes, one of them being that include files is not glob style pattern matching. Did that resolve this issue for you somehow @takato3000

@stonesphinx thanks! is sep a tag you use? Unfortunately since it's minified those logs don't give too much info besides that.

UPDATE: I can still reproduce this on my iPhone but when using on my desktop with mobileEmulation(true) it works fine, so having a hard time finding the root cause here.

stonesphinx commented 2 years ago

Nope, not sure what sep could be. The only tag I used in Checklist is #ingredients

Anything else I can do to give you more information?

OllieA commented 2 years ago

Updated to 2.0.2 hoping it would fix this issue as well as the formatting one. Unfortunately still getting “failed to load plugin” when try to enable checklist on both iPhone and iPad.

delashum commented 2 years ago

2.0.2 fixed a different problem, which is why this isn't closed yet. Need to try and get access to the error logs on mobile to see what's going on

takato3000 commented 2 years ago

@delashum After I upgraded to 2.0.2, it became loading icon again. At this time, when I use **/*, it's still always loading. But (somedirectory)/**/* pattern still works on my friend's computer.(2.0.2)

That's strange.

[appended on 2022/1/10 11:48 GMT+8]: when I checked a task from the preview page, it works again.

stonesphinx commented 2 years ago

Update: The Failed to load plugin obsidian-checklist-plugin persists after the 2.0.2 upgrade. I tried a few more things: reinstalling Obsidian on my phone, installing the plugin on a different vault (thinking perhaps there was a plugin or vault-specific conflict), etc. I continue to get the same error.

An interesting note is that (If I remember correctly) the plugin was working for several days post 2.0.x upgrade, and then stopped.

The only thing that worked is rolling back the plugin to 1.2.3, which allows it to load on mobile again.

(This whole time 2.0.x has functioned normally on both windows 11 PCs where my vault is synced.)

davebhc71 commented 2 years ago

8 days ago Dev posted - “Need to try and get access to the error logs on mobile to see what's going on“

Any progress?

AndrewNatoli commented 2 years ago

Hey @stonesphinx - Are you able to share which method you used for getting access to the console and if that was on iOS? I tried out Liam Cain's snippet (tossing monkeyPatchConsole(this) into the beginning of onLoad) but it's not generating an output file for me on mobile; just desktop if I take that platform restriction line off.

AndrewNatoli commented 2 years ago

I may have found where sep comes from. In the minified JS (npm run build), .sep is used in something to deal with filesystem paths and comes from the CommonJS resolver.

I tried updating the rollup CommonJS plugin.... it changed the output code but didn't fix the problem on mobile. Tried upgrading rollup and all node modules to their latest versions-- still have the error. Can't get console access so I'm not sure if the error changed, but the .sep reference still exists. I checked out Obsidian Dataview which also uses rollup but runs successfully on mobile-- the minified output doesn't contain the same .sep code.

So it might be something with the rollup config...

Update: I've gotten as far as I can for now it seems.

Liam pointed out a way to log the console even when the plugin is failing. The current error with the app is:

[error] Plugin failure: obsidian-checklist-plugin TypeError: undefined is not an object (evaluating 'path__default["default"].sep')

I initially tried figuring out how to get that section of code out of the main.js bundle. I was referencing other plugins like Graph Analysis and Calendar View; they both use the commonjs rollup plugin but neither have that chunk of code added to their bundles. Tried upgrading rollup plugins, no success.

I installed rollup-plugin-ignore and added this following to the plugins section of the rollup config:

ignore(['path', 'url'], { commonjsBugFix: true }),

This got past the sep issue (url probably wasn't necessary) but now I'm getting:

[error] Plugin failure: obsidian-checklist-plugin ReferenceError: Can't find variable: process

I tried adding process to the ignore list -- no luck. I also tried adding rollup-plugin-replace then adding to the plugin list....

replace({
      'process.env.NODE_ENV': JSON.stringify('production'),
}),

Just to have process defined as an object and have a view nested properties..... but no luck. Still getting the process is undefined issue.

stonesphinx commented 2 years ago

@AndrewNatoli I followed these directions to get access to the mobile console on my windows PC. My android phone was plugged in via USB to make this work.

Glad to see you're making progress - if you want to commit your latest changes (which is throwing the the latest error), I can see if it gives the same error on mine.

dammitcoetzee commented 2 years ago

Any word on this? would love to use this on mobile again.

NomarCub commented 2 years ago

I've had to switch to the Dataview plugin unfortunately. It has the functionality that I wanted out of this plugin, and is actively maintained. However they are planning major changes to the task view there (which already went live a few weeks ago but got rolled back).

dmkravets commented 2 years ago

I'm just checking in to see if the mobile version will get updated so it will load? 🙏🏼 thanks

elorup commented 2 years ago

thanks for your work. I also wait until I can use the plugin on my Android tablet

flankstaek commented 2 years ago

Please download the latest update and try again.

stonesphinx commented 2 years ago

I updated the plugin to 2.2.3 and it appears to be working on mobile!

dammitcoetzee commented 2 years ago

it works! thanks so much!