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

The badge is broken due to librsvg #91

Open
changLiuUNSW opened this issue Aug 9, 2019 · 31 comments
Open

The badge is broken due to librsvg #91

changLiuUNSW opened this issue Aug 9, 2019 · 31 comments

Comments

@changLiuUNSW
Copy link

changLiuUNSW commented Aug 9, 2019

I just installed badge in my new machine today and after run badge command the icon become broken, but it works fine on my old machine.

before
Screen Shot 2019-08-09 at 10 30 48 pm

after
Screen Shot 2019-08-09 at 10 29 12 pm

@changLiuUNSW changLiuUNSW changed the title fastlane-plugin-badge 1.3 is broken The badge is broken after upgrade to fastlane-plugin-badge 1.3 Aug 9, 2019
@changLiuUNSW
Copy link
Author

changLiuUNSW commented Aug 9, 2019

After some research, the issue is caused by pango 1.44.3 which is one of the dependencies of librsvg, because It was working fine with pango 1.42.4.
I cannot raise the issue on their github page https://github.com/GNOME/pango, because they disabled it.

@changLiuUNSW changLiuUNSW changed the title The badge is broken after upgrade to fastlane-plugin-badge 1.3 The badge is broken due to librsvg Aug 9, 2019
@changLiuUNSW
Copy link
Author

The workaround for now is to uninstall librsvg and use default graphicsmagick

@techinpark
Copy link

techinpark commented Aug 17, 2019

@changLiuUNSW same issue. do you find any solution with using librsvg ?
I found this link https://gitlab.gnome.org/GNOME/pango/issues

@changLiuUNSW
Copy link
Author

@techinpark no solution.

Can we raise the issue to that link?

@julianch
Copy link

The workaround for now is to uninstall librsvg and use default graphicsmagick

Could you tell me how to use graphicsmagick? I uninstalled librsvg but I get this error:

INFO [2019-08-29 18:16:36.32]: Start adding badges...
DEBUG [2019-08-29 18:16:36.32]: Trying to load image from shields.io. Timeout: 10s
DEBUG [2019-08-29 18:16:36.32]: URL: https://img.shields.io/badge/1.7-40-blue.png
ERROR [2019-08-29 18:16:36.54]: Error validating image from shields.io. Use --verbose for more info
INFO [2019-08-29 18:16:36.54]: Waiting for 10s and retry to load image from shields.io tries remaining: 5
WARN [2019-08-29 18:16:46.55]: Install RSVG to get better results for shields on top of your icon
WARN [2019-08-29 18:16:46.55]: 
WARN [2019-08-29 18:16:46.55]: Install it using (RSVG):
INFO [2019-08-29 18:16:46.55]: $ brew install librsvg

@PatrickDotStar
Copy link

PatrickDotStar commented Aug 30, 2019

@julianch have you installed graphicsmagick? brew install graphicsmagick

@julianch
Copy link

brew install graphicsmagick

@PatrickDotStar Yes, I have graphicsmagick installed and I'm still getting that error.

@Gremkow
Copy link

Gremkow commented Sep 4, 2019

I am experiencing the same error as @julianch . I have graphicsmagick 1.3.33 installed. Sadly this does not seem to be a workaround (or might need some more configuration I am not aware of).

@techinpark
Copy link

@julianch how to you run badge? fastlane plugin or standalone ?

@Gremkow
Copy link

Gremkow commented Sep 4, 2019

add_badge(
	dark: true,
	shield: "Version-#{options[:app_version]}-blue",
	glob: "/path/to/png"
)

I use badge inside the fastfile like this.

@techinpark
Copy link

@Gremkow (cc @julianch )
In my case, i have same problem like yours.

Solution

  1. Open Terminal and make badge icon
  • badge --shield Version-#{app_version}-blue -- dark
  1. remove add_badge line in fastfile

@Gremkow
Copy link

Gremkow commented Sep 4, 2019

@techinpark Thanks for your advice, when trying to run your command (with a removed whitespace between -- and dark) inside the folder containing the .png, badge does not find any icons.
Anyway, we will probably need to get a solution using the fastfile, since running manual commands is not something we want to do in our automation process, if possible.
If we find a solution to this which works for us I will update you.

@filipef101
Copy link

using librsvg solved but the badges look blury, any idea to make them less blury?

@Gremkow
Copy link

Gremkow commented Sep 6, 2019

I got it working by

  • manually deleting /usr/local/Cellar/pango
  • manually deleting /usr/local/Cellar/librsvg

Copying /usr/local/Cellar/pango & /usr/local/Cellar/librsvg from a working machine (older formula versions: librsvg 2.44.14_1, pango 1.42.4_2) to a non working machine.

  • running brew link pango
  • running brew link librsvg

This might be a work around if you have access to the older version on another machine, but this is not recommend since I don't know what I'm doing with homebrew and you will probably break something and definetly wont be able to update these packages out-of-the-box later on.
Simply posting this for people that maybe REALLY need it right now and have access to old files.

@wiedem
Copy link

wiedem commented Sep 24, 2019

Easiest solution if you're using homebrew:
brew switch pango 1.42.4_1

@Gremkow
Copy link

Gremkow commented Sep 24, 2019

Easiest solution if you're using homebrew:
brew switch pango 1.42.4_1

This only works if you had it previously installed (and did not get removed via some kind of cleanup), right?

@wiedem
Copy link

wiedem commented Sep 24, 2019

This only works if you had it previously installed (and did not get removed via some kind of cleanup), right?

Yes.

In case you've already cleaned up version 1.42.4_1, run the following command first:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7cf3b63be191cb2ce4cd86f4406915128ec97432/Formula/pango.rb

@techinpark
Copy link

@wiedem Thanks for solution!

Here is my solution. open the Terminal and type it commands.

Solution

brew install librsvg 
brew unlink pango  
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7cf3b63be191cb2ce4cd86f4406915128ec97432/Formula/pango.rb
brew switch pango 1.42.4_1 
  • Enjoy it 🎉

@adelmojunnior
Copy link

@techinpark The 'alpha' or 'beta' label no more generate.

@aitor
Copy link

aitor commented Oct 16, 2019

I've reported this:

And the underlying issue may be connected to the fact that in pango 1.44, they have replaced cairo by harfbuzz for getting glyph extents: harfbuzz/harfbuzz#1892

@CMJunghoon
Copy link

Solution
brew uninstall librsvg
brew uninstall pango

@marcosgriselli
Copy link

Is anyone experiencing issues with brew install librsvg? We're using @techinpark and our CI started failing there out of the blue with no visible error.

@fruitcoder
Copy link

@marcosgriselli Happened to me a couple of days ago. I used the built in brew install step of Bitrise and some caching which I disabled and replaced everything related to librsvg with a shell script:

brew install librsvg
brew link librsvg

if [ -d "/usr/local/Cellar/pango/1.42.4_2" ]
then
   brew link pango
else
   brew unlink pango
   brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb
fi

I don't know if it helps (I think it's been posted before)

@marcosgriselli
Copy link

@fruitcoder thanks! You pushed me in the right direction. I was using the script step but left the set -e line which was probably reporting a false error and failed the step with no reason. Removed it and the installation is working again and the badge looks perfect.

@aitor
Copy link

aitor commented Sep 15, 2020

I can confirm that, although the reported issues are still open, pango 1.46.1 fixed the font tracking problem for us and we are using off-the-shelf dependencies configuration again for badge. If the correct behavior is reproduced for more people maybe this issue can be closed.

@leonardarnold
Copy link

I came across the issue today and i resolved it with:

brew upgrade librsvg

Thanks @aitor for the effort here

@fruitcoder
Copy link

I can confirm that the stable version of pango is working and the issue could be closed

@benkane
Copy link

benkane commented Sep 17, 2020

I can also confirm this is no longer an issue with the latest version of librsvg on homebrew. I think this can be closed

@hahtml
Copy link

hahtml commented Sep 18, 2020

I can confirm this issue has been fixed on my side as well!

@phisakel
Copy link

brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb
==>
Error: Calling Installation of pango from a GitHub commit URL is disabled! Use 'brew extract pango' to stable tap on GitHub instead.

@benkane
Copy link

benkane commented Nov 11, 2020

@phisakel straight up brew install librsvg works now and will give you a working version of pango. No need to manually install a different version of pango after

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

No branches or pull requests