OliverBalfour / obsidian-pandoc

Pandoc document export plugin for Obsidian (https://obsidian.md)
MIT License
711 stars 59 forks source link

Pandoc conversion fails #76

Open J450n-4-W opened 3 years ago

J450n-4-W commented 3 years ago

I'm using KDE Neon Linux, aka Ubuntu 20.04.3 LTS x86_64 with KDE Plasma 5.21, fully updated Obsidian.

I have specified the correct path for Pandoc, and am getting all conversion options, but I am getting an error message saying "Pandoc conversion failed".

Here are the logs of my attempts to convert from the console.

main.ts:27 Loading Pandoc plugin
events.js:292 Uncaught Error: spawn /usr/bin/pandoc ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269)
    at onErrorNT (internal/child_process.js:465)
    at processTicksAndRejections (internal/process/task_queues.js:80)
events.js:292 Uncaught Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:156)
    at writeGeneric (internal/stream_base_commons.js:147)
    at Socket._writeGeneric (net.js:785)
    at Socket._write (net.js:797)
    at writeOrBuffer (internal/streams/writable.js:358)
    at Socket.Writable.write (internal/streams/writable.js:303)
    at start (eval at <anonymous> (app.js:1), <anonymous>:335:30)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:374:13)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:68:58)
main.ts:160 
eval @ main.ts:160
events.js:292 Uncaught Error: spawn /usr/bin/pandoc ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269)
    at onErrorNT (internal/child_process.js:465)
    at processTicksAndRejections (internal/process/task_queues.js:80)
events.js:292 Uncaught Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:156)
    at writeGeneric (internal/stream_base_commons.js:147)
    at Socket._writeGeneric (net.js:785)
    at Socket._write (net.js:797)
    at writeOrBuffer (internal/streams/writable.js:358)
    at Socket.Writable.write (internal/streams/writable.js:303)
    at start (eval at <anonymous> (app.js:1), <anonymous>:335:30)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:374:13)
    at Generator.next (<anonymous>)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:71:71)
main.ts:160 
eval @ main.ts:160
events.js:292 Uncaught Error: spawn /usr/bin/pandoc ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269)
    at onErrorNT (internal/child_process.js:465)
    at processTicksAndRejections (internal/process/task_queues.js:80)
events.js:292 Uncaught Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:156)
    at writeGeneric (internal/stream_base_commons.js:147)
    at Socket._writeGeneric (net.js:785)
    at Socket._write (net.js:797)
    at writeOrBuffer (internal/streams/writable.js:358)
    at Socket.Writable.write (internal/streams/writable.js:303)
    at start (eval at <anonymous> (app.js:1), <anonymous>:335:30)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:374:13)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:68:58)
main.ts:160 
eval @ main.ts:160
events.js:292 Uncaught Error: spawn /usr/bin/pandoc ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269)
    at onErrorNT (internal/child_process.js:465)
    at processTicksAndRejections (internal/process/task_queues.js:80)
main.ts:160 
eval @ main.ts:160

Happy to be told this is user error but it's not clear to me what I am doing incorrectly. Thanks!

MavropaliasG commented 3 years ago

I have the same problem. Don't know how to access the logs like @J450n-4-W, but I have configured the paths correctly, and I do also get the "Pandoc conversion failed" when trying to export to PDF.

image

J450n-4-W commented 3 years ago

I was also using the Flatpak version, and this seems to be a Flatpak permissions/sandboxing issue. I uninstalled the Flatpak version on a test machine and installed AppImage and the issue did not recur. I attempted on another machine to give Obsidian Flatpak install permissions in a way similar to the way a user on the Obsidian forum solved a slightly different issue (command line, Flatseal) and it didn't make any difference.

Perhaps this can't be solved by the plugin developers, and is an issue inherent to Flatpaks. If so, perhaps users could be warned about this issue.

ReaderGuy42 commented 3 years ago

I have the same issue. It worked for a little while, but now I'm getting "Pandoc Export failed:" with no explanation.

greenfreq commented 2 years ago

I was able to use the plugin after installing the debian package for Obsidian.

This leads me to believe the issue exists with the snap, Flatpak, and AppImage installs of Obsidian.

I believe it to be a sandboxing issue (although I still couldn't get it to work in AppImage using the --no-sandbox), which means that unless Obsidian provides a whitelist for all the plugins out there that depend upon external files, it is not likely to be resolved for users of these packaging systems.

I am not a developer and not sure what all is going on under the hood, but I did note that when I installed obsidian with the .deb package I received an error attempting to change permissions on chrome-sandbox (this is after installing/uninstalling Obsidian with snap and AppImage.

sudo dpkg -i obsidian_0.12.15_amd64.deb 
[sudo] password for user: 
Selecting previously unselected package obsidian.
(Reading database ... 231480 files and directories currently installed.)
Preparing to unpack obsidian_0.12.15_amd64.deb ...
Unpacking obsidian (0.12.15) ...
Setting up obsidian (0.12.15) ...
chmod: cannot access '/opt/obsidian/chrome-sandbox': No such file or directory
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...