-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working on Big Sur #72
Comments
CrashReporter indicates the underlying cause is that highlight cannot use the lua dynamic library as it is not codesigned. Dyld Error Message: |
There's nothing in the full crash log (below) about a code signature being missing or wrong. @ralphrmartin maybe you know more? I've tried manually signing the lua library, and adding highlight to
|
Sorry, no perhaps I was jumping to a conclusion. While liblua is not codesigned, that may not be the problem. Maybe one way to overcome this is to bundle a private copy of highlight and the lua library with QLColorCode? I'm certainly no expert. |
+1 |
FYI, a similar plugin also has this issue: samuelmeuli/glance#46 (sadly the project is archived) |
I attempted to bypass the
The only difference is the Parent Process line. I tested with a binary that has no libraries other than ones signed by Apple and it shows output. So theoretically, a static build of I think if I can build Other observationsIt would be theoretically possible to use a user-provided Pygmentize as long as task.environment = @{@"PYTHONPATH": @"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages", @"TMPDIR": @"/tmp"};
task.launchPath = @"/usr/bin/python3";
task.arguments = @[@"-B", @"/opt/local/bin/pygmentize", @"-f", @"html", targetEsc]; My only issue is that for whatever reason,
I have added |
I think I've discovered that because of sandbox restrictions, a Quick Look plugin must have all properly signed binaries (even if only ad-hoc) and files it wishes to use within its bundle. In this project that's a highlight binary plus the Lua library it needs and the configuration files it uses. I did build Highlight (outside of bundle) with a static Lua but then I only ran into a different sandbox error because Highlight needs to read its configuration. |
+1 with js files |
I'll be working on a patch to include Highlight and Lua in the built bundle. |
For my experience I suggest you statically link the lua library in highlight.
|
I've already done this on my own. Whether it's linked statically or not is not going to make a difference here. The macOS sandbox since Big Sur just has more stringent requirements for plugins. It's going to be a lot easier to keep all binaries signed and contained within the bundle. It also makes this package easier to install since having |
I prefer statically so as not to have problems with paths and avoid the OS trying to pass the library installed in the system perhaps by homebrew (unsigned) instead of the one inserted in the application. |
this works on DEBUG mode but on finder it shows white blank page. On console i managed to get this warning message below
|
Yes it works on debug because sandbox restrictions are not so strict there (possibly because of you setting Terminal/etc to lessen restrictions in System Preferences - Security & Privacy). |
so is there a workaround for quicklook plugins? |
At this time not for this one. Plugins that bundle all of their code properly signed and within the bundle directory will work. This plugin requires highlight to be in PATH so it does not work from Finder where it wants everything properly code signed. Even if you adhoc sign the highlight binary or make it load Lua statically, it still needs to read its configuration file and this isn't going to be sandbox friendly usually. I am making a patched version of this that will bundle Highlight and its libs and files so this will work again on Big Sur. |
I encountered the same issues |
It's there. Please try it out. |
@anthonygelibert confirming that the pull request by @Tatsh works on BigSur 11.0.1 (20B29) |
@ferologics, perhaps you should try to restart the system. |
@okalachev works! I guess quick look needed to reload the plug-in. |
@anthonygelibert I just tried to verify the plugin on Big Sur and have exactly the same issue as @sourcier in #72 (comment) |
looking at Console I'm getting
on Big Sur 11.1 |
This is a different issue than what this #72 was originally for. The distributed package needs to add more permissions. If you build locally you probably will not have this issue. |
@Tatsh For those of us who don't use XCode much, is there a way to build it locally without the full XCode app (which I happen to not have enough space for right now)? |
Solution (on Big Sur) is: list quarantine files: then I am able to use space bar to preview/quicklook files (.sh, .sql, etc.) credits to @neslob (Vielen Dank Nils) |
The preview window is all blank. Apps from anywhere are allowed and
com.apple.quarantine
is removed.The text was updated successfully, but these errors were encountered: