manuerwin / joplin-plugin-attache

Mass replacement of resources such as resized image files.
GNU General Public License v3.0
11 stars 0 forks source link

Plugin not working #19

Closed jvolker closed 10 months ago

jvolker commented 10 months ago

Hi,

Thanks for creating this.

Unfortunately, it doesn't seem to work for me though. When clicking Tools > Attaché nothing is happening. It seems to be silently failing. In the console, there is this error, though:

Uncaught (in promise) Error: ENOENT: no such file or directory, scandir
    at Object.readdirSync (node:fs:1452:3)
    at Object.readdirSync (node:electron/js2c/asar_bundle:2:10980)
    at Object.<anonymous> (/Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:11603)
    at Generator.next (<anonymous>)
    at /Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:11243
    at new Promise (<anonymous>)
    at r (/Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:10988)
    at Object.y [as deleteResources] (/Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:11559)
    at Object.<anonymous> (/Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:45805)
    at Generator.next (<anonymous>) 

It would be helpful to have some screenshots of the UI in the README to understand what to expect.

There is also this error which seems to be related to Attaché, but it was thrown at a different time, not when clicking the menu item:

Uncaught (in promise) Error: ENOENT: no such file or directory, scandir
    at Object.readdirSync (node:fs:1452:3)
    at Object.readdirSync (node:electron/js2c/asar_bundle:2:10980)
    at Object.<anonymous> (/Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:11603)
    at Generator.next (<anonymous>)
    at /Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:11243
    at new Promise (<anonymous>)
    at r (/Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:10988)
    at Object.y [as deleteResources] (/Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:11559)
    at Object.<anonymous> (/Users/myuser/.config/joplin-desktop/tmp/plugin_io.github.manuerwin.attache.js:1:45805)
    at Generator.next (<anonymous>)

macOS 12.7.2

Joplin 2.13.9

Attaché: 1.2.0 Combine notes: 1.2.1 Conflict Resolution: 1.2.3 Copy Universal Web Link: 0.1.0 Cursor Sync: 2.1.0 Note list and sidebar toggle buttons: 1.0.3 Table Formatter Plugin: 1.2.1

Thanks for your help.

manuerwin commented 10 months ago

Thanks for letting me know, will seek to reproduce and investigate

manuerwin commented 10 months ago

@jvolker sorry this took me awhile to reproduce as I went down a rabbit hole regarding logging ! I've reproduced the error, it occurs when the plugin hasn't been configured

Plugin config - File path location needed

via "Preferences > Plugins > Attaché (Mac) OR Tools > Options > Attaché (PC?)", specifically the location of files that will replace your resources. I'll work on catching this scenario and prompting the user to choose the location if it's empty.

In the meantime, please configure the plugin and let me know if it doesn't work :)

More info -> https://github.com/manuerwin/joplin-plugin-attache