Skip to content
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

No gif file found, please select a file or folder #66

Open
derision33 opened this issue Sep 16, 2021 · 14 comments
Open

No gif file found, please select a file or folder #66

derision33 opened this issue Sep 16, 2021 · 14 comments
Labels

Comments

@derision33
Copy link

I have been trying to get my gifs to display in screensaver. It used to work but since I updated to Big Sur it has not been displaying the gifs, and comes up with the error in the title. Am I doing something wrong, or do gifs not display on my current version of macOS?

@Waitsnake
Copy link
Owner

Witch version of Big Sur you have? I only check it on 11.5.

Did you really read the readme carefully? Because since Mojave and also in Big Sur Apple implemented also a function called Gatekeeper that automatically prohibits any downloaded software from internet to run.
Gatekeeper can only be passed automatically if the developer pays an annual fee of 99 USD. I don't pay and will not pay in future lagre amount of money each year since this is only a spare time project and do not earn a cent with AnimatedGif.

You need to pass the Gatekeeper manually so that AnimatedGif can fully run.
This was basically documented in readme under section "if there is an error message saying "[AnimatedGif.saver] can't be opened because it is from an unidentified developer".
But since Apple changes the form and the text of these dialogs with each main version of macOS the screenshots in readme did not mach hundert percent anymore even if the described steps are basically still the same.
I think about adding new screenshots for Big Sur next to the screenshots from Mojave.

@Waitsnake
Copy link
Owner

Ok I added some more screenshoots for Big Sur and hope that make it clearer.

If you already wrongly install AnimatedGif without allowing it to pass Gatekeeper you need to uninstall AnimatedGif first. Look into readme section "Uninstall AnimatedGif" - "Manually Uninstall".

Follow then the section "if there is an error message saying "If there is an error message saying "[AnimatedGif.saver] can't be opened because it is from an unidentified developer" (Mojave) or "[AnimatedGif.saver] can't be opened because Apple cannot check it for malicious software." (Big Sur)" and this time allowing AnimatedGif to run if you like to do so. But this is your decision. This software is under MIT License without Liability or Warranty.

One alternative you can do is to download Xcode from Apple then check all the open source code from AnimatedGif on your own and then build the project by yourself on your Mac with your own developer certificate. If you do so even the Gatekeeper will not ask you to allow to run your own build.

@kavlih
Copy link

kavlih commented Sep 21, 2021

i'm on big sur 11.6 and also have this issue. also tried to reinstall it but doesn't fix it.

@Waitsnake
Copy link
Owner

Waitsnake commented Sep 21, 2021

"No gif file found, please select a file or folder" this is no error message! In fact this text is rendered with the very same method that renders your Gif. This text was just a hint for the user that he has not yet selected a folder that contains GIFs or select a single Gif yet. If you see this text it at least shows that you have allowed the Gatekeeper to run AniamtedGif.

To select a Gif you have to go to Systempreferences -> Desktop & Screensavers -> Select AnimatedGif (at this poit you should see the hint "No gif file found, please select a file or folder" ) -> Screen Saver Options ... -> Select File or Directory in Options Dialog -> Go in the Opened File Dialog to your Gif (It has to be in a folder in your user directory where you reading rights) -> Open (in Opened File Dialog ) and you should already see your Gif in preview -> OK (in Options Dialog).

If this is not working only three reasons come to my mind:

  1. your gif is corrupt and can not be processed (maybe post it here so I can try?)
  2. your gif is in a folder where your user account has no rights (a folder of different user or in a system folder?)
  3. macOS has for whatever reason still sandboxed AnimatedGif on your Mac (this would be strange since it works on my 11.5 but not on your 11.6 . I mean I have not yet upgrated to 11.6 since I always wait some days, but it would be very strange if Apple messed this up again. But still it is possible)

As in the past, if 3) is the reason I can do nothing about it since it is Sandboxed by macOS, except from maybe drop the support for Big Sur altogether.

Added later:
In the release notes of 11.6 they have a point regarding some changes in the Sandbox:
Sandbox
Available for: macOS Big Sur
Impact: A user may gain access to protected parts of the file system
Description: An access issue was addressed with improved access restrictions.
CVE-2021-30850: an anonymous researcher
Entry added September 20, 2021

So it is possible that Apple again blocked access of screensavers to user files with 11.6.

@kavlih
Copy link

kavlih commented Sep 22, 2021

To be sure I tried different GIFs and different locations. But I think neither 1 or 2 is the problem. I also see the GIFs playing in the systempreferences and only see the "error message" when I try to preview or activate the screensaver, so i guess it's the update

@jacktionman
Copy link

This is likely a permissions issue from the OSX sandboxing.

I fixed it on mine by moving the image files to the folder:

/Users/XXXXX/Library/Containers/com.apple.ScreenSaver.Engine.legacyScreenSaver/Data/Library/Preferences/ByHost

It's the same issue for the SaveHollywood video background screensaver.

If you have trouble selecting this folder inside the AnimatedGif Options, first go to the folder in Finder and make a shortcut to the folder in your Favourites bar, then you can access that from the file explorer inside AnimatedGif Options.

@kavlih
Copy link

kavlih commented Oct 22, 2021

Thank you, that actually worked for me!

I didn't have a "com.apple.ScreenSaver.Engine.legacyScreenSaver" directory tho, but instead just a "legacyScreenSaver" directory.

@Waitsnake
Copy link
Owner

In the meantime I have upgraded to macOS 11.6 as well and after completely uninstall AnimatedGif and downloading the binary myself and installing it again as show on the screenshots. AnimatedGif still works for me and I can select other folders then /Users/XXXXX/Library/Containers/com.apple.ScreenSaver.Engine.legacyScreenSaver/Data/Library/Preferences/ByHost
like /Users/XXXXX/Pictures where I have my Gifs located.

I still don't understand why the sandboxing is not on same level for all users? I have an M1 Mac and maybe it behaves different on Intel Macs? Or maybe it is because I have AnimatedGif code signed with my own certificate and thats why I have less trouble with it on my Mac?

@nevsan73
Copy link

nevsan73 commented Oct 23, 2021 via email

@kavlih
Copy link

kavlih commented Oct 23, 2021

I have an M1 Mac and maybe it behaves different on Intel Macs?

I also have a M1 (2020), so that's not the problem

@necm1
Copy link

necm1 commented Oct 24, 2021

OS: macOS. Big Sur 11.6 (Macbook Pro 13-inch, 2020 Intel)

After using the solution from @jacktionman it seems to work in the preview now, but "Run screensaver in background mode" is greyed out. Is there any solution for this? I uninstalled it multiple times & installed it.

755b0939debcb6a2561856c40d2a9bc3

@jacktionman
Copy link

@necm1 > Run screensaver in background mode" is greyed out

If it helps, that has always been the case on my (Big Sur 11.6 Macbook Pro 13-inch, 2017 Intel) laptop.

@Waitsnake it's weird! It might be because it is permissioned from your computer. We could try building it on another computer and seeing if that executionable works on yours? But, maybe just adding the above tip to the readme is enough for most users and saves any more effort 🥼. Thanks for your hard work on this, btw!

@Waitsnake
Copy link
Owner

Waitsnake commented Oct 24, 2021

After using the solution from @jacktionman it seems to work in the preview now, but "Run screensaver in background mode" is greyed out. Is there any solution for this? I uninstalled it multiple times & installed it.

From the readme.md in section Compatibility:
Because Big Sur(11.5.2) still sandboxes screensaver the background mode is still not working and so this button will be automaticly disabled since release 1.5.4 when Big Sur(and Catalina) is detected. But background mode is still available on Mojave or earlier versions of OSX.

I investigated this background mode issue on my machine deeper long time ago but there are more obstacles then just the sandbox that jails AnimatedGif. Between Mojave and Big Sur the process and call structure of ScreenSaverEngine is complete different and because of this some mechanisms that I used before to realise background mode will not work anymore even if there wasn't a sandbox. When ScreenSaverEngine is started it starts a subprocess legacyScreenSaver where AnimatedGif lives as a plugin. But the parent window that needs to be changed still belongs to ScreenSaverEngine. Because of this the AnimatedGif has no longer access to the parent window and this was needed to change the properties of this window to behave as a background window. Furthermore I used the call parameters of ScreenSaverEngine to detect on witch screen the screensaver runs in case of multiple screens. But since AnimatedGif lives now in legacyScreenSaver and not in ScreenSaverEngine it also has no access to the call parameters of ScreenSaverEngine.

To wrap it up there are now 3 issues in Big Sur that make background mode impossible to work(1. sandbox prohibits starting ScreenSaverEngine from AnimatedGif via launchd 2. no longer access to parent window 3. no longer access to call parameter). Every single issue would be enough for the background mode to stop working. Thats why I needed to disable it on systems newer than Mojave.

If Apple in future will release a new screensaver API as I hope that a screensaver allow a user o have access to its own files than the background mode will be still gone. All that could be left will be a normal screensaver for GIFs. But this screensaver sandbox issue is not addressed by Apple since now 2 years so I loose hope to be honest. It is a shame since I added 3 years ago Metal support for accelerated drawing instead of only OpenGL so that AnimatedGif will be save for the future. xD

@IHe-KaiI
Copy link

In the meantime I have upgraded to macOS 11.6 as well and after completely uninstall AnimatedGif and downloading the binary myself and installing it again as show on the screenshots. AnimatedGif still works for me and I can select other folders then /Users/XXXXX/Library/Containers/com.apple.ScreenSaver.Engine.legacyScreenSaver/Data/Library/Preferences/ByHost like /Users/XXXXX/Pictures where I have my Gifs located.

I still don't understand why the sandboxing is not on same level for all users? I have an M1 Mac and maybe it behaves different on Intel Macs? Or maybe it is because I have AnimatedGif code signed with my own certificate and thats why I have less trouble with it on my Mac?

I can't find /Users/XXXXX/Library/Containers/com.apple.ScreenSaver.Engine.legacyScreenSaver/Data/Library/Preferences/ByHost. But, I move the gif to the ~/ (i.e. the home), and it works. (M1, Monterey 12.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants