You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Synfig can't read directories on latest OSX (10.15 Catalina) #972
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.
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:
Enable "Full Disk Access" for SynfigStudio.app
Rename SynfigStudio.app/Contents/MacOS/SynfigStudio to SynfigStudio.sh
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());
}
Compile it g++ ./synfig_osx_launcher.cpp -o SynfigStudio
Move SynfigStudio to SynfigStudio.app/Contents/MacOS/
Run SynfigStudio (this will take a long time for the first launch).
You can find a video on this link https://vimeo.com/448999497
You will see that I can't start the newest version.
The "older" version of Synfig accepts images when I drag them into the
canvas (it does not accept SVG) and I can render to any file in any folder.
But when I try to open a directory from within Synfig, it won't work.
Activity
ice0 commentedon Oct 10, 2019
Hi! Can you check if this method works for you?
http://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/
ankit-kumar-dwivedi commentedon Nov 3, 2019
Well @ice0 I tried it
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.
morevnaproject commentedon Nov 11, 2019
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:
morevnaproject commentedon Nov 15, 2019
More info from Krita - https://krita.org/en/item/first-notarized-macos-build-of-krita/
ice0 commentedon Nov 27, 2019
Well, I did some research and this is what I found out.
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:
SynfigStudio.app/Contents/MacOS/SynfigStudiotoSynfigStudio.shsynfig_osx_launcher.cppg++ ./synfig_osx_launcher.cpp -o SynfigStudiomorevnaproject commentedon Nov 28, 2019
Awesome! Thank you so much! I will take care on incorporating those changes into our OSX build script.
morevnaproject commentedon Dec 19, 2019
I have applied changes, we need to test this after build will be ready.
13 remaining items
NoBodyButMe commentedon Aug 18, 2020
rodolforg commentedon Nov 9, 2020
@ice0 Any news about this issue? I think this issue and #1052 are the last critical issues for a 1.4.0 release…
ice0 commentedon Nov 10, 2020
@rodolforg I am working on it.
rodolforg commentedon Nov 14, 2020
This should be fixed soon: it seems MacOS Catalina users won't be able to launch Synfig!
morevnaproject commentedon Nov 16, 2020
@ice0 The problem is about space in app dir name, right?
ice0 commentedon Nov 16, 2020
@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
ice0 commentedon Nov 16, 2020
@rodolforg They can. If they didn't rename SynfigStudio.app.
rodolforg commentedon May 9, 2021
This issue is supposed to be fixed in v1.4.1. Can you confirm it please? @gnovos @ice0
ice0 commentedon May 10, 2021
Works fine on latest 11.2.3