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

Version 6.4.1 FontAwesome5 not show icon on Android #964

Closed
tamirrab opened this issue Mar 13, 2019 · 23 comments
Closed

Version 6.4.1 FontAwesome5 not show icon on Android #964

tamirrab opened this issue Mar 13, 2019 · 23 comments

Comments

@tamirrab
Copy link

Version 6.4.1 FontAwesome5 not show icon on Android
Example: pencil-alt

iOS - Work
Android - not

Description

Describe your issue in detail. Include screenshots if needed.

Reproducible Demo

Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve

@loic-lopez
Copy link

Yes i'm facing this issue too with FontAwesome 5 Pro using chevron-left icon:

iOS:

Android:

Thanks for reply!

@mslabenyak
Copy link

Same here

@LuongTruong
Copy link

In my case, the error is the same. I am using react native 0.59. The react native 0.57.4 works fine

@rlecaro2
Copy link

Using react-native 0.57.5 I've found the Solid family to be the only missing from versions 6.4.0 and 6.4.1. Reverting to 6.3.0 fixes the issue for me.

@LuongTruong
Copy link

LuongTruong commented Mar 16, 2019

@rlecaro2 , big thanks. I use Solid nearly every icons in the app 😃 . I will try your solution

@sergei-zelinsky
Copy link

Reverting to 6.3.0 fixes the issue for me too.

Great thanks @rlecaro2

@oblador
Copy link
Owner

oblador commented Mar 18, 2019

Ping @hampustagerud

@hampustagerud
Copy link
Collaborator

hampustagerud commented Mar 19, 2019

I couldn't reproduce this issue on my emulator but my physical device showed this issue as well, why that happened is beyond me but I'll never do my testing on that emulator again 🙃 The problem was the additional styling I used for iOS, if used on Android it will just break down but only for the solid icons for some reason (even when using Pro and light icons) 🤔 At least it's working on my phone now so hopefully this should fix it for everyone. 🙂 Sorry for the inconvenience

I'll upload the fix tomorrow (morning hopefully), I just need to check what behaviour should be used for web and windows since they are supported by the rest of the code.

@franck-nadeau
Copy link

Just a quick note, that this issue affects both Android and iOS. That is, neither will have the Solid Pro fonts with version 6.4.X. Reverting to 6.3.0 does work.

@hampustagerud
Copy link
Collaborator

hampustagerud commented Mar 19, 2019

That is not the case for me and the others in this thread also seems to only have issues with Android. Are you sure you are linking the fonts correctly?

EDIT: @franck-nadeau just installed 6.4.1 clean and it worked perfectly with iOS, please check that you're font files are included 🙂 I noticed however that react-native link sometimes won't work properly so that might cause issues with copying fonts if you used the upgrade script.

@franck-nadeau
Copy link

Yes. It was working fine on 6.2.0, which I have been using for many months. My build server started to act up after I updated it (which involved clearing the node_module folder and a new install which fetched 6.4.1). Both platforms had problems after that.

Maybe it is because I am using the Pro version of Font Awesome.

This is the error that I was getting with version 6.4.X on iOS:

default	13:11:06.746330 -0400		Unrecognized font family 'FontAwesome5Pro-Solid'

The solid icons works fine now that I reverted back to 6.3.0.

@franck-nadeau
Copy link

Oh, one last detail. 6.4.X worked fine for me in Debug. The problem only occurred for me when I built release version of the app.

@hampustagerud
Copy link
Collaborator

I'll try building a release version but your error might indicate that you have an old version of the font. FontAwesome5Pro-Solid was introduced in 5.7.0 which is used in 6.4+, not in 6.3.0 which might be why it is still working. Are you cleaning derived data between builds? Also, unlinking and then relinking the project could work 🙂

@franck-nadeau
Copy link

Thanks for your response. I have tried many things yesterday to get it to work (including relinking and doing it manually), but was not able to get it to work. I will try a latter version at an other time, since I had not planned on this issue taking up so much of my time, and I now have a working solution with 6.3.0. :)

@hampustagerud
Copy link
Collaborator

I'm sorry you're having this issue but I cannot seem to be able to replicate it. If it persists you can open a new issue and ping me in it 🙂 Also, try creating a new project and installing the library in it just to make sure it is not something in your environment 👍

@ostar0816
Copy link

I have upgraded all dependencies for my react-native project yesterday - react-native v0.59.1, react-native-vector-icons v6.4.1 and it showed me box with a cross icon. I tried with all possible solutions but no luck. After suffering for several hours, I decided to get back to the previous stack react-native ^0.58.4 and react-native-vector-icons v6.3, which works fine.

@franck-nadeau
Copy link

@hampustagerud no worries. This is a great library. I would debug this problem further, only I need to catch up the time I lost yesterday.

@ostar0816 was that on Android or iOS?

@ostar0816
Copy link

It works fine on iOS but not working on Android.

@loic-lopez
Copy link

Sorry for not have put in my precedent post the react-nativer version which was : 0.59

And yes it seems that 0.59 broke something in this library.

@hampustagerud
Copy link
Collaborator

If any of you would like to try my patch before it is merged that would be great! If anyone still has issues we can solve them before they are merged into master 🙂 You can just run yarn add hampustagerud/react-native-vector-icons and it should grab it from my fork, it should be installing version 6.4.2!

I'm not on 0.59 in my personal projects yet so I don't know what might have changed but it could explain why I didn't catch this bug earlier. I've tested it with the latest RN now though so should be good.

@rlecaro2
Copy link

@hampustagerud your fork worked perfectly on my project using react-native 0.57.5 and a physical android device.

@LuongTruong
Copy link

LuongTruong commented Mar 20, 2019

hey guys, I try react native version 0.59 and react-native-vector-icons version 6.3.0 and they worked.

Please add the "android/app/src/main/assets/fonts" before run "react-native link"

I will use the 6.3.0 and wait for the new version of the library 😃

@hampustagerud
Copy link
Collaborator

@rlecaro2 Great, thanks! I'll merge and release it then 🎉

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

10 participants