Skip to content

Synfig can't read directories on latest OSX (10.15 Catalina) #972

Closed

Description

@gnovos

Synfig version & platform:

synfig 1.2.2
OSX 10.15

Issue description:

OSX now has some ACL thing that forces every application to go through some new API that pops up a dialog to prompt the user for permission before it can access any directory. Synfig doesn't do whatever this process is and subsequently gets an error when trying to get any directory list (like when you try and open a file). You can drag and drop a file into the screen to open it, but the same issue crops up and causes other issues where the .sifz file throws up error dialogs and cause crashes. Screenshots of errors attached.

Screen Shot 2019-10-08 at 2 47 26 PM

Screen Shot 2019-10-08 at 2 49 30 PM

Activity

  1. ankit-kumar-dwivedi commented on Nov 3, 2019

    @ankit-kumar-dwivedi
    Member

    Well @ice0 I tried it

    Hi! Can you check if this method works for you?
    http://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/

    and this doesn't work. However, this is not related to synfig. Mac OS Catalina has a bunch of security features that change how permissions are managed.
    Gimp (https://gitlab.gnome.org/GNOME/gimp/issues/3710) and InkScape(https://gitlab.com/inkscape/inkscape/issues/459) is also affected. GIMP has fixed this issue in latest release.

  2. added this to the v1.4.0 milestone on Nov 11, 2019
  3. morevnaproject commented on Nov 11, 2019

    @morevnaproject
    Member

    We have a shell script wrapper for OSX binary and it looks like OSX doesn't allow to app start from shell script anymore.

    See related links for GIMP:

  4. modified the milestone: v1.4.0 on Nov 25, 2019
  5. ice0 commented on Nov 27, 2019

    @ice0
    Collaborator

    Well, I did some research and this is what I found out.

    Apple expanded Mojave’s SIP (System Integrity Protection) to include certain system and library folders and files in the user’s home directory. Where you previously could open and access these user files and directories in earlier macOS High Sierra/Sierra, in macOS Mojave, these files, etc. are no longer readable without disabling SIP or granted Full Disk Access.

    To bypass it we must enable "Full Disk Access" for SynfigStudio.app (instruction).

    This doesn't works because SynfigStudio.app/Contents/MacOS/SynfigStudio is just a bash script.
    But if we replace it with our simple starter stub, then everithing begin to work!

    Here are the steps what i did:

    1. Enable "Full Disk Access" for SynfigStudio.app
    2. Rename SynfigStudio.app/Contents/MacOS/SynfigStudio to SynfigStudio.sh
    3. Create file synfig_osx_launcher.cpp
    #include <cstdlib>
    #include <string>
    
    int main(int argc, char* argv[]) {
      std::string buf(argv[0]);
    
      std::size_t found = buf.rfind('/'); // looking for a last slash in path
      if (found != std::string::npos) {
        buf = buf.substr(0, found + 1); // get the directory where exe is located
      }
    
      return system(buf.append("SynfigStudio.sh").c_str());
    }
    
    1. Compile it g++ ./synfig_osx_launcher.cpp -o SynfigStudio
    2. Move SynfigStudio to SynfigStudio.app/Contents/MacOS/
    3. Run SynfigStudio (this will take a long time for the first launch).
  6. morevnaproject commented on Nov 28, 2019

    @morevnaproject
    Member

    Awesome! Thank you so much! I will take care on incorporating those changes into our OSX build script.

  7. morevnaproject commented on Dec 19, 2019

    @morevnaproject
    Member

    I have applied changes, we need to test this after build will be ready.

  8. 13 remaining items

  9. reopened this on Aug 18, 2020
  10. NoBodyButMe commented on Aug 18, 2020

    @NoBodyButMe
  11. rodolforg commented on Nov 9, 2020

    @rodolforg
    Contributor

    @ice0 Any news about this issue? I think this issue and #1052 are the last critical issues for a 1.4.0 release…

  12. ice0 commented on Nov 10, 2020

    @ice0
    Collaborator

    @rodolforg I am working on it.

  13. modified the milestones: v1.4.0, v1.6.0 on Nov 14, 2020
  14. rodolforg commented on Nov 14, 2020

    @rodolforg
    Contributor

    This should be fixed soon: it seems MacOS Catalina users won't be able to launch Synfig!

  15. morevnaproject commented on Nov 16, 2020

    @morevnaproject
    Member

    @ice0 The problem is about space in app dir name, right?

  16. modified the milestones: v1.6.0, v1.4.1 on Nov 16, 2020
  17. ice0 commented on Nov 16, 2020

    @ice0
    Collaborator

    @morevnaproject 2 problems here, both linked to this issue.

    [MacOS] SynfigStudio.app won't start if renamed #1832
    [MacOS] SynfigStudio.app won't start if filename contains spaces #1835

  18. ice0 commented on Nov 16, 2020

    @ice0
    Collaborator

    This should be fixed soon: it seems MacOS Catalina users won't be able to launch Synfig!

    @rodolforg They can. If they didn't rename SynfigStudio.app.

  19. rodolforg commented on May 9, 2021

    @rodolforg
    Contributor

    This issue is supposed to be fixed in v1.4.1. Can you confirm it please? @gnovos @ice0

  20. ice0 commented on May 10, 2021

    @ice0
    Collaborator

    Works fine on latest 11.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions