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

Weird characters on random refreshes (Ubuntu 14.04, Archlinux, Chrome) #10842

Closed
joaokamun opened this issue Mar 24, 2017 · 29 comments
Closed

Weird characters on random refreshes (Ubuntu 14.04, Archlinux, Chrome) #10842

joaokamun opened this issue Mar 24, 2017 · 29 comments
Labels
Milestone

Comments

@joaokamun
Copy link

joaokamun commented Mar 24, 2017

Its happen sometimes, and I dind't find any pattern to reproduce, its just random.
Everything is working properly, but suddenly in one refresh or page change, all icons become weird characters like "", "", "�". After a refresh, icons back to normal.

Any Ideas of what is happening?

Screenshots
When bug occurs:
screenshot from 2017-03-24 18-53-25

Normally:
panel

@tagliala
Copy link
Member

Browser? Browser version? OS? Any further detail?

Is it reproducible on jsfiddle?

@joaokamun
Copy link
Author

My bad..
Browsers that already occured: Chrome (50+) and Chromium (57.0.2987)
OS: Ubuntu 14.04 and Archlinux

Like I said, its totally random, and it back to work when I refresh. At first I thought was only in my machine, but some other users reported that 'bug' already (ubuntu users) - I never tried on other browsers, because its so random.

Probably not reproducible on jsfiddle, I cant even reproduce when I want on my application.

Any tips? Maybe some encoding, I dont know...
Fontawesome is at 4.7.0.

@tagliala
Copy link
Member

What is the failure percentage? Could you please try with another icon font using the PUA? (bootstrap's glyphicons should be fine)

@joaokamun
Copy link
Author

Very low.
I'll change to glyphicon and try receive the bug.

@tagliala
Copy link
Member

Thanks.

If you also use other webfonts on your website (let's say Open Sans), please check that when you are not seeing font awesome icons, the other text is properly displayed and it does not fallback to the default system font

@PeterShaggyNoble
Copy link

Are they the characters that would otherwise be displayed if FA wasn't loaded? It may simply be a case that, for some reason, the FA font files aren't being downloaded - if you have your browser's console open, you'll be able to check that.

@tagliala
Copy link
Member

@joaokamun are you using font awesome from the cdn or your local server? If you are using font awesome on your local server, are you using css, less or scss?

@joaokamun
Copy link
Author

From local server and using scss.

@tagliala
Copy link
Member

could you please past the output of your css file? I think there is an issue related to #6728

@joaokamun
Copy link
Author

@tagliala
Copy link
Member

@joaokamun thanks

Apparently, #6728 is not involved.

Output from #6728 is something like

.fa-home:before{content:""}

@joaokamun
Copy link
Author

joaokamun commented Mar 29, 2017

It happened again.

On console:
screenshot from 2017-03-29 14-51-10

variable.scss file:
screenshot from 2017-03-29 14-51-33

css file:
screenshot from 2017-03-29 15-00-21

But again, just a refresh, and everything back to normal!

I'll stop using scss for while. But if has anything I can do to help find the cause of the problem. I'm glad to help.

I'll made more tests with glyphicons, didn't occured this problem yet.

@tagliala
Copy link
Member

@joaokamun well, I think #6728 is one the cause of your issue.

Apparently, sometime your sass compiler (or server?) messes up with encoding, producing non-unicode files

Please take a look at #6728 for a possible workaround and unquoted variables

@mtbolger
Copy link

We've seen this issue in Chrome as well, we found that we could consistently (~30% of the time or so) reproduce the issue if we open the DevTools then immediately refresh the page.

Another odd thing we noticed is that, when this issue occurs, Chrome isn't listing our CSS file on its "Network" tab. Seems like it may be a Chrome cache issue.

@tagliala
Copy link
Member

@Rhannek could you please check CDN failure rate?

@mtbolger
Copy link

@tagliala We aren't using a CDN in this case, we're loading both the CSS and the font files from a local web server. It happens consistently on multiple machines. Each time Chrome's Network tool is missing our CSS file even though a request was sent. This is why we are thinking it is a Chrome cache issue, where the cached version of our CSS has incorrect content: "" entries.

@tagliala
Copy link
Member

We aren't using a CDN in this case

Yes, I know. Since I'm unable to replicate this issue, I was wondering if there could be some server side configuration involved

@mtbolger
Copy link

We don't believe it is, it happens in cases where Chrome is not retrieving the CSS from the server, it is loading it from the cache. The exact set of steps we're seeing is something like this:

  • Refresh page, icons load as expected
  • Check Chrome Network tab, CSS was loaded as expected, viewing CSS in DevTools shows boxes in content: "" CSS
  • Open DevTools then immediately refresh page
  • Page loads, but icons are showing as odd characters (not boxes)
  • Check Chrome Network tab, CSS is not mentioned (for this step we used Wireshark to watch what Chrome actually did, it did make a request to our server, our server responded with a 304 Not Modified)
  • Check Source tab, CSS is present but the content: "" sections in the CSS have the same odd characters as the screen, even though the server did not retrieve the file from the server

@tagliala
Copy link
Member

*Check Chrome Network tab, CSS was loaded as expected, viewing CSS in DevTools shows boxes in content: "" CSS

  • Open DevTools then immediately refresh page

If I'm already in the Network tab, DevTools aren't already open?

PS: do you think this is the case of submitting a bug to chrome developers, maybe with a video showing the issue?

@artursopelnik
Copy link

+1

@tagliala tagliala changed the title Weird characters on random refreshes Weird characters on random refreshes (Ubuntu 14.04, Archlinux, Chrome ) Jun 19, 2017
@tagliala tagliala changed the title Weird characters on random refreshes (Ubuntu 14.04, Archlinux, Chrome ) Weird characters on random refreshes (Ubuntu 14.04, Archlinux, Chrome) Jun 19, 2017
@tagliala
Copy link
Member

@artursopelnik please do not comment with +1, they don't help here

@artursopelnik
Copy link

artursopelnik commented Jun 19, 2017

@tagliala Same bug here ...

Solution:
Overwrite _variables.scss with own _fa-variables.scss, where you remove the quotes around.

Example:
// Fontawesome
@import 'font-awesome/scss/variables';
@import './fa-variables'; // https://gist.github.com/artursopelnik/1f30deea1b276228c4a7ac7f4e5f8ad3
@import 'font-awesome/scss/path';

Read more:
sass/sass#1395 (comment)

Output before
.icon-share:before{content:"ï‡ "}"

Output after
.icon-share::before {content: "\f1e0";}

@tagliala
Copy link
Member

The workaround above fixes #6728

#6728 is assigned to 5.0.0 milestone, but it could be postponed

@nhanle020285
Copy link

i got the same scenario issue, i solved by set response header content-type to text/css; charset=UTF-8

@tagliala tagliala added this to the 5.0.0 milestone Jan 15, 2019
@tagliala
Copy link
Member

Hi,

I'm pretty confident that this has been solved in Font Awesome 5.0.0 because we are using another approach to generate content properties.

If this is still an issue, please open a new request and fill out our bug report template

@silviodelgado
Copy link

Hi,

I'm pretty confident that this has been solved in Font Awesome 5.0.0 because we are using another approach to generate content properties.

If this is still an issue, please open a new request and fill out our bug report template

This is happening often in my web application.
This occurs randomly, after a refresh for any reason (through F5 press or refreshing by code).
I'm using 5.11.2 version.
I was using latest version and having the same bug, then I downgraded to test, but it still happening.

@tagliala
Copy link
Member

@silviodelgado please open a new issue by following the bug report template. Please provide a reproducible test case

@NuclearMachine
Copy link

Can confirm, still happening here.

@tagliala
Copy link
Member

tagliala commented Apr 6, 2020

Hi @NuclearMachine

I'm going to lock here. This particular issue was related to how chars were encoded in the css file and it has been fixed in version 5.0.0

If you are still experiencing issues, please fill out our bug report template and remember to provide all the information required, including

  • version of the OS
  • version of the browser
  • implementation of Font Awesome (SVG / CSS - css I guess)
  • how Font Awesome is hosted (cdn / kit / self-hosting)

Since this is random and it is not possible to provide a reproducible test case, please provide ad least a test case which is randomly failing.

🔒

@FortAwesome FortAwesome locked as resolved and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants