xbar icon indicating copy to clipboard operation
xbar copied to clipboard

"Unicorn!" plugin crashes xbar for me

Open leland359 opened this issue 3 years ago • 5 comments

@mnin - this plugin brakes xbar for me. Would not display anything in the menu bar. Once I deleted "Unicorn!" from the Plugin folder xbar went back to working. Is this replicated for others?

@matryer - Feature request: once xbar is running in the background if I 'open' xbar again from the Applications folder it would bring up xbar setttings -- in this case xbar Plugin folder, similar to how Bartender or Pastebot function. (would have made fixing the above issue much eaiser)

leland359 avatar Sep 03 '21 03:09 leland359

@leaanthony This shouldn't be possible, we should investigate this.

matryer avatar Sep 03 '21 08:09 matryer

@matryer Assuming typo :-) I'll take a look 👍

leaanthony avatar Sep 03 '21 09:09 leaanthony

@leland359 I can reproduce this issue.

I think I have to make it clear that it is not acceptable if people out there can no longer see a unicorn.

Think the plugin isn't able to just render the base64 encoded image anymore (this is the line which breaks xbar).

TIMESTAMP=$(date +"%s")
IMAGE=$(curl -s "http://www.cornify.com/getacorn.php?r=$TIMESTAMP" | base64)

echo '🦄'
echo '---';
echo "| href=http://www.cornify.com/unicornpictures image=$IMAGE"

@matryer was there any API change for render images?

The cornify.com service is still working.

mnin avatar Sep 03 '21 10:09 mnin

It looks like the URL you are using for the IMAGE request redirects from HTTP to HTTPS. Changing the request to HTTPS or adding the -L flag to curl should resolve this.

It appears that xbar crashes with an invalid image (i.e., page redirect response).

AarynSmith avatar Jan 28 '22 19:01 AarynSmith

Thanks, created a PR https://github.com/matryer/xbar-plugins/pull/1769

mnin avatar Jan 28 '22 19:01 mnin