rignaneseleo / SlimSocial-for-Facebook

Light version of Facebook. Light both in the weight and in the use.
GNU General Public License v2.0
368 stars 73 forks source link

No icons appearing with latest Android User Agent #174

Open TomBonnot opened 1 year ago

TomBonnot commented 1 year ago

Device : Google Pixel 7 Version of SlimSocial : Latest 10.0.9 Custom User Agent : Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.76 Mobile Safari/537.36 Screenshot of the issue : Screenshot_20230516-073621 Software that could interact or generate the bug : I have a DNS with Rethink DNS but I have totally excluded SlimSocial from it, so it shouldn’t interfere. Thank you for your time and your so useful app

rignaneseleo commented 1 year ago

I'm pretty sure it's a DNS problem. Be sure all the facebook domains are excluded. This app uses touch.facebook.com for example.

TomBonnot commented 1 year ago

That’s weird because I am using NativeAlpha with Facebook, with the same User Agent and NativeAlpha isn’t bypassed by the DNS and my icons are there

HarriBuh commented 1 year ago

I have the same issue and did not change my DNS server, nor anything else. Browsing Facebook on both touch.facebook.com and m.facebook.com works without any of these issues.

sonofevil commented 1 year ago

I am also having this issue. No changes to DNS or user agent. While loading the feed, the icons at the top appear at first, but then get replaced by boxes once the page is loaded. To me the boxes look like missing unicode symbol placeholders, which would suggest a font issue. Screenshot_20230625-093359_SlimSocial_for_Facebook.png

sonofevil commented 1 year ago

Interesting: With an iPhone user agent the icons are immediately broken, whereas with an Android agent there is some delay. The icons work fine with a desktop Linux agent, but the overall UI shrinks.

imol-ai commented 11 months ago

If you turn off dark mode in the app settings, the icons return. There should be a toggle or something for dark mode on the main fb page and for everywhere else.

sonofevil commented 11 months ago

Is there some way at all to remote debug the app's css via adb like there is for Firefox for Android? I suspect it might be as easy to fix as changing the font in the css.

sonofevil commented 11 months ago

Right, so the buttons use character codes that are not in Unicode and likely only supported by proprietary fonts. On Firefox for Android, the font family it falls back on is "popular-symbols", a font I can't even find on Google. This is the fallback list in the css:

.dfr .native-text { font-family: Roboto-V2, popular-symbols, lite-glyphs-outlined, lite-glyphs-filled, snaptu-symbols, NotoSansDevanagari, NotoSansMalayalam, NotoSansGujarati, NotoSansKannada, NotoSansGurmukhi, NotoSansSinhala, BengaliOTS, RobotoThaiLao, NotoSansHebrew, NotoSansKhmer, NotoSansTamil, NotoSansTelugu, NotoSansArmenian, NotoSansGeorgian, NotoSansEthiopic, NotoSansOriya, NotoSansTibetan, NotoSansCherokee, NotoSansArabic, NotoSansMyanmar, system-ui, Arial, sans-serif }

Of the others, the only one that works is "lite-glyphs-outlined", also not found on Google, the rest displays placeholders. The fonts in question seem to be loaded via .woff2 file from fbcdn.net.

Unfortunately the custom css option in the settings seems to be entirely non-functional, otherwise I could try to force those fonts.

sonofevil commented 11 months ago

Could this be the culprit? https://github.com/rignaneseleo/SlimSocial-for-Facebook/blob/82d63bc696a924cc48d27a522679a7145248f7bc/SlimSocial_for_Facebook/lib/utils/css.dart#L286

There is no other instance of font-family being used in the app's css. Or perhaps the app fails to cache the .woff2 file correctly?