The document could not be opened

Alex's Avatar

Alex

03 Jul, 2018 09:30 AM

Hello! Thanks for the great software!
I'm trying to use MMD Composer on macOS 10.13.5 as an editor for http://jrnl.sh and I'm getting errors like "The document “jrnlklyvfp3g.txt” could not be opened. You don’t have permission." while "vim /var/folders/gp/blablabla/T/jrnlklyvfp3g.txt" under the same user does open this temporary file for editing. I guess, it's some kind of sandboxing applied to Composer?
I also noted, that MMD Composer refuses to open files without extension in their name with error "The document “test” could not be opened". Currently it's not an issue for me.

  1. Support Staff 1 Posted by Fletcher on 06 Jul, 2018 02:19 AM

    Fletcher's Avatar

    That sounds more like a file permission error (e.g. read/write access). Otherwise it's a sandboxing issue. Are you using the Open... dialog to open the file? Do you have write access to those files?

    I'll dig into the UTI logic again to see if I can improve use of files without extensions.

    Thanks!

    Fletcher

  2. 2 Posted by Alexander Pavle... on 06 Jul, 2018 11:42 AM

    Alexander Pavlenko's Avatar

    Yes, I do have write access via VIM or Sublime, for example.
    No, I'm not using Open dialog. Filename is passed as CLI argument.
    Looks like it does open the file for editing via manual Open dialog.
    What is the proper way of automation? I was using command:
    open -Wna "MultiMarkdown Composer" --args $AbsolutePath

  3. Support Staff 3 Posted by Fletcher on 06 Jul, 2018 12:35 PM

    Fletcher's Avatar

    You have to use a file dialog window (or the finder) to gain sandbox permissions from macOS. Command line tools don’t give permission. This is part of macOS and not something I can change.

    You can create a MultiMarkdown file that links to a local image file and put it somewhere that forces composer to request sandbox permission(when it tries to preview the image, so enable the preview). In the permission dialog, choose the /var folder (or whatever folder you want) to give composer “blanket” permission to that folder. That *might* allow access, though it’s possible composer might only have permission during that session?? If you quit composer you might have to reopen the initial “dummy” file first to reset permissions.

    That’s the only idea I have right now.

    Fletcher

    Sent from my iPhone

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac