Jump to content

GIF Search: Workflow for Searching and Browsing GIFs


Recommended Posts

5 hours ago, JakeS said:

I also have Xcode.  Never worked with Swift myself, but how hard can it be?

@JakeS

Seems like you'll have to resort to this.
If you've been programming for a while, it won't be hard at all! :)
(would most likely involve setting breakpoints, adding print statements etc (standard ad-hoc debugging))

I need to learn a thing or two from @deanishe and do at least half as decent a job as he does in extensive, detailed documentation, logging and error reporting! sigh

 

P.S. can you go through the whole log and search for "error", "Error", "ERROR"?
Just want to make sure an error isn't buried there somewhere!

Link to comment
48 minutes ago, Mr Pennyworth said:

@JakeS

 

P.S. can you go through the whole log and search for "error", "Error", "ERROR"?
Just want to make sure an error isn't buried there somewhere!

Did find this while digging through the system.log:

 

May 28 14:21:29 Jakes-MacBook-Pro AlfredGifBrowser[9667]: getattrlist failed for /System/Library/Frameworks/OpenGL.framework/Resources//GLRendererFloat.bundle/GLRendererFloat: #2: No such file or directory

Otherwise no other errors I can find so far.  That .bundle folder exists, but is empty.

Edited by JakeS
Link to comment

Running it in debugger in Xcode now.  Still trying to find my way around this (I've been more focused on .net and javascript), but the console here does give the following suspicious info:

 

2021-05-28 15:23:42.790197-0500 AlfredGifBrowser[21138:4704770] [ScriptFilterServer.swift:34 respond(with:)] Responded to alfred: ScriptFilterResponse(items: [Alfred.ScriptFilterResponse.Item(arg: "dummy", uid: nil, title: "Select with arrow keys, drag-n-drop with mouse", subtitle: Optional("[↩: search again] [⌘: copy GIF] [⌥: copy URL]"), valid: nil, match: nil, autocomplete: nil, quicklookurl: nil, type: nil, text: nil, icon: nil, mods: nil)])
2021-05-28 15:23:55.640738-0500 AlfredGifBrowser[21138:4704770] Metal API Validation Enabled
2021-05-28 15:23:55.683921-0500 AlfredGifBrowser[21138:4704770] fopen failed for data file: errno = 2 (No such file or directory)
2021-05-28 15:23:55.683950-0500 AlfredGifBrowser[21138:4704770] Errors found! Invalidating cache...
2021-05-28 15:23:55.740299-0500 AlfredGifBrowser[21138:4704770] +[MTLIOAccelDevice registerDevices]: Zero Metal services found

 

I've put some relevant info in a github issue so we can continue the conversation either here or there.

Edited by JakeS
Link to comment
  • 1 month later...

HI, 

 

Not sure if you are still monitoring this topic or not. I'm having a few little issues. First some specs:

  • Alfred 4.3.4
  • M1 Mac Mini
  • macOS 11.2.3
  • GIF Search v0.3.5

I get search results and I can act on them, however, I'm having two issues. The window resizes strangely. It behave as expected when using a duplicate of a default theme (as shown in this thread) but it doesn't work with my custom theme or a duplicate of the custom theme. It's slightly hard to tell in the screenshot, but the window expands past the normal window size.

1720056887_ScreenShot2021-07-06at10_38_16PM.thumb.png.0cc195c2ace5bdc364429d81ab068283.png

 

 

The other issue I'm having is that when I command-return to copy and then paste into Messages, it pastes the generic file thumbnail and not the actual GIF. If I try to send it, it doesn't actually go through at all. It behaves as if it sends but the other person doesn't see it.  Dragging from Alfred into Messages works. If I can provide anything else that is helpful, let me know. Thanks! 

 

 

112917632_ScreenShot2021-07-06at10_40_42PM.png.2ab38b63d262e38456f73a5c452ddab0.png

Link to comment
11 hours ago, Mr Pennyworth said:

Let me take a look at what is happening with command-return.
About the theme issue, can you upload your theme somewhere?

 

https://www.alfredapp.com/extras/theme/7sIc27t9X7/

 

There is the theme. I just tried on my work computer. Which is running the same OS but is an intel MacBook Pro. On that machine, I can't arrow around the results. It just moves the cursor though the typed string. I've removed the app from accessibility and added it back, twice. 

Link to comment
  • 2 weeks later...
  • 4 weeks later...

HI! 👋

 

I just installed this workflow and I'm seeing the same behavior as some others were before. It shows the alfred result "Select with the arrow keys..." etc. but the gif results view never appears.

 

I do have an intel mac and I am running Big Sur. (Copying from my "About this Mac":)

MacBook Pro (Retina, 15-inch, Late 2013)

Processor: 2 GHz Quad-Core Intel Core i7

Graphics: Intel Iris Pro 1536 MB

I'm including the graphics card info because I think it may be relevant, which we can see later in the logs.

 

I did the things that were recommended in the thread so far: kill the AlfredGifBrowser and run it in a terminal so I can see the outputs. I then triggered it by hitting the server with curl (which I copied from the workflow).

 

I ran this:

curl -s -G 'http://localhost:9911/' \
          --data-urlencode "query=omg" \
          --data-urlencode "service=giphy" \
          --data-urlencode "key=<my key>"

 

And the server logs showed this:

<a bunch of startup stuff, finding a cache from previous searches and so forth...>

  2021-08-09 09:44:47.753 AlfredGifBrowser[99387:3812940] [ScriptFilterServer.swift:30 start()] Query from alfred: ["query": "omg", "key": "<my key>", "service": "giphy"]
2021-08-09 09:44:47.992 AlfredGifBrowser[99387:3812903] [GifSearcher.swift:143 parse(_:then:)] Query URL: https://api.giphy.com/v1/gifs/search?api_key=<my key>&limit=50&q=omg
2021-08-09 09:44:47.992 AlfredGifBrowser[99387:3812903] [GifSearcher.swift:147 parse(_:then:)] https://i.giphy.com/TgOYjtgKpS9jAytUlh.gif
<...a bunch more results just like that...>
2021-08-09 09:44:47.998 AlfredGifBrowser[99387:3812903] [ScriptFilterServer.swift:34 respond(with:)] Responded to alfred: ScriptFilterResponse(items: [Alfred.ScriptFilterResponse.Item(arg: "dummy", uid: nil, title: "Select with arrow keys, drag-n-drop with mouse", subtitle: Optional("[↩: search again] [⌘: copy GIF] [⌥: copy URL]"), valid: nil, match: nil, autocomplete: nil, quicklookurl: nil, type: nil, text: nil, icon: nil, mods: nil)])

 

Other info: There is no downloader.bin running.

pgrep gif-downloader.bin

No response + exits with an error status as no process is found.

 

I also searched through the system logs and found these interesting tidbits.

Aug  9 09:44:48 Johns-MacBook-Pro AlfredGifBrowser[99387]: getattrlist failed for /System/Library/Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsGLDriver: #2: No such file or directory
Aug  9 09:44:48 Johns-MacBook-Pro AlfredGifBrowser[99387]: getattrlist failed for /System/Library/Frameworks/OpenGL.framework/Resources//GLRendererFloat.bundle/GLRendererFloat: #2: No such file or directory

It seems to my (mostly uninformed) perspective that something is wrong with the graphics rendering code in the app. But I haven't had time to dig any further.

Link to comment
  • 1 year later...
  • 5 months later...

Hi, @Mr Pennyworth It's really a shame that one of the greatest Alfred workflows such as yours is no longer being monitored.

 

I've posted an issue on the GitHub repository notifying you about the common issue where Displaying a message on macOS Ventura using Alfred 5.0.5 saying:
"This workflow uses an Alfred feature only available in v4.3.0 and newer. The installed Alfred version is v0.0.0."

 

SCR-20221123-e6z

 

Would anyone have any suggestions on how to fix it?

Link to comment
  • 5 months later...

I recently moved to a new company and have to use Slack instead of Discord (a painful transition). Hoping Alfred might come to the rescue with a Gif workflow, I got so excited when I found this project! Sadly it's outdated and not running - So now hoping someone might be able to help get this up and running on Alfred 5? 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...