uazo / cromite

Cromite a Bromite fork with ad blocking and privacy enhancements; take back your browser!
https://www.cromite.org/
GNU General Public License v3.0
3.28k stars 74 forks source link

Non-Latin and non-Cryillic text is broken. #966

Open LellyTheTeapot opened 5 months ago

LellyTheTeapot commented 5 months ago

Preliminary checklist

Can the bug be reproduced with corresponding Chromium version?

No

Are you sure?

No

Cromite version

123.0.6312.105

Device architecture

arm64-v8a

Platform version

Android 14

Android Device model

Pixel 6a

Is the device rooted?

No

Changed flags

no flags changed

Is this bug happening in an incognito tab?

No

Is this bug caused by the adblocker?

No

Is this bug a crash?

No.

Describe the bug

Any non-Latin or non-Cryillic text us rendered as thin crossed boxes, likely caused by the embedded fonts in #935 not supporting it.

Steps to reproduce the bug

Demonstrated easiest by using any site that uses CJK text like jisho.org.

Expected behavior

Text should display appropriate scripts as normal.

Screenshots

Details

![Screenshot_20240405-030206](https://github.com/uazo/cromite/assets/15335997/27b6ed6d-1931-4085-a543-0a9620f17efa)

islam2hamy commented 5 months ago

Arabic also

apardogi commented 5 months ago

Same problem here for Japanese text as shown above.

DeepBlueBubble commented 5 months ago

Simplified and Traditional Chinese is broken too

uazo commented 5 months ago

Any non-Latin or non-Cryillic text us rendered as thin crossed boxes, likely caused by the embedded fonts in https://github.com/uazo/cromite/pull/935 not supporting it.

yes, it's my fault. i didn't think about those characters.

could you give me some sites to check?

islam2hamy commented 5 months ago

Any non-Latin or non-Cryillic text us rendered as thin crossed boxes, likely caused by the embedded fonts in #935 not supporting it.

yes, it's my fault. i didn't think about those characters.

could you give me some sites to check?

https://f-droid.org/ just change site language

MahdiAhmadnejad commented 5 months ago

Hi this is for persian

Details

![Screenshot_20240405_125922_org cromite cromite](https://github.com/uazo/cromite/assets/53077144/f3f785ea-c239-4272-bbf4-766c041d7ec6)

uazo commented 5 months ago

OK, thanks, I will do a partial revert.

someftierguy commented 5 months ago

Greek characters work fine

Details

![Screenshot_20240405_184803](https://github.com/uazo/cromite/assets/166099128/2d46abc4-d20d-48ff-8dd7-b3070408b353)

muhammadkarodia commented 5 months ago

Arabic also

Same here

calvin2021y commented 5 months ago

Can not install old version(install will failure), and can not read any non Latin pages. this is disaster.

ABCCOMPANYPOHARKA commented 5 months ago
Details

![Screenshot_2024_0405_221417](https://github.com/uazo/cromite/assets/120773766/4ef520fa-56cf-4d03-a985-2495f54aa854)

What 😨 happened... After update???

drogga commented 5 months ago

@calvin2021y I can install older versions with MT Manager, which uses Shizuku to downgrade (you will have to remove MT M. from the recents or even force stop it in order to start using Shizuku for the installation, else it won't be able to downgrade), other packages retain their data, so in theory Cromite should too, you can also try InstallWithOptions, InstallerX, manually using the -d & -r params or just wait for an update, which shouldn't take long.

cvtsi2sd commented 5 months ago

Cromite 123.0.6312.105 from F-Droid on Android 8.1.0, ARMv7 build. The situation here is even worse: apparently as soon as the browser needs to render one of the missing glyphs, the whole page crashes

Details

![Screenshot_20240405-211924](https://github.com/uazo/cromite/assets/1788086/a074fe9a-076c-4fd9-a4cb-ac05c8b6a56c)

I can reproduce this trivially: if I paste a Chinese character in this (or any website) textbox, the page crashes; same e.g. if I open the "other languages" menu on Wikipedia, or visit any site containing Chinese glyphs.

wreaver commented 5 months ago

I study Japanese and visit pages that use it. I don't mean to pressure but Cromite is unusable for me now, unfortunately.

uazo commented 5 months ago

thank you all for the various reports.

you can deactivate the feature with chrome://flags/#fonts-fingerprint-mitigation (Enable fonts fingerprint mitigation (Cromite flag)) set to off

cvtsi2sd commented 5 months ago

At least for my problem, the workaround doesn't seem to work, probably the crash comes from something that isn't disabled by the flag.

calvin2021y commented 5 months ago
adb install -r -d arm64_ChromePublic.apk 
Performing Streamed Install
adb: failed to install arm64_ChromePublic.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 631208604 is older than current 631210504]

not work for me

calvin2021y commented 5 months ago

chrome://flags/#fonts-fingerprint-mitigation this work

islam2hamy commented 5 months ago

thank you all for the various reports.

you can deactivate the feature with chrome://flags/#fonts-fingerprint-mitigation (Enable fonts fingerprint mitigation (Cromite flag)) set to off

thank you

apardogi commented 5 months ago

It did work for me. I disabled the flag, relaunched and then erased the cache. After that I started to get Japanese text displayed correctly again.

Thank you!

nordicw0lf commented 5 months ago

thank you all for the various reports.

you can deactivate the feature with chrome://flags/#fonts-fingerprint-mitigation (Enable fonts fingerprint mitigation (Cromite flag)) set to off

I cant see that flag when I search for it

Details

![Screenshot_20240407-095037](https://github.com/uazo/cromite/assets/107339628/973940c3-8712-4071-8fbb-7505a1b08e54)

The bug is also affecting hebrew

Details

![Screenshot_20240407-093737](https://github.com/uazo/cromite/assets/107339628/08ffa11f-566f-4bb8-bbfe-b1e84b60aed9)

cvtsi2sd commented 5 months ago

I cant see that flag when I search for it !

Search doesn't seem to work for Cromite flags, you have to go explicitly in the "Cromite" tab and look for it.

cvtsi2sd commented 5 months ago

I tried making my own build of Cromite without the font patches and, while it did succeed (in 7 hours of compilation, wow), I still can't install it over my current Android installation, as the signature doesn't match; I guess that's because the official releases use a specific certificate that is not available in the public repo? Any way I can workaround this/produce an official build without those patches?

alisonatwork commented 5 months ago

@nordicw0lf I had the same problem. You need to select Cromite tab (on the right) and the setting is in there. Workaround works for me.

avipars commented 5 months ago

I tried making my own build of Cromite without the font patches and, while it did succeed (in 7 hours of compilation, wow), I still can't install it over my current Android installation, as the signature doesn't match; I guess that's because the official releases use a specific certificate that is not available in the public repo? Any way I can workaround this/produce an official build without those patches?

That's the point of these certificates... only the original owner/creator with the private keys can publish a new official version.

You can make your own set of keys and sign the apk with them... then you can uninstall their chromite apk, and install your own.

As for release, you should make a pull request and ask the project owner to integrate it and make a build.

avipars commented 5 months ago
adb install -r -d arm64_ChromePublic.apk 
Performing Streamed Install
adb: failed to install arm64_ChromePublic.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 631208604 is older than current 631210504]

not work for me

Uninstall the original apk and then try again

GfEW commented 5 months ago

@uazo

you can deactivate the feature with chrome://flags/#fonts-fingerprint-mitigation (Enable fonts fingerprint mitigation (Cromite flag)) set to off

Because of obvious similarities, I'd like to also test this workaround against #971 which is different in that there, even chrome://flags is unreadable due to font placeholders, so I've tried to identify and disable the flag #fonts-fingerprint-mitigation blindly:

Screenshot 1 ![chrome://flags/#fonts-fingerprint-mitigation (search box empty)](https://github.com/uazo/cromite/assets/15276963/34ef8943-7880-4a83-a847-9b264f2d81fd) _(Note that in this screenshot, the search box is really empty, the placehoders there only represent the inactive, normally greyed-out search hint.)_

Apparently, this shows many flags. Let's search for the string 'font':

Screenshot 2 ![chrome://flags/#fonts-fingerprint-mitigation](https://github.com/uazo/cromite/assets/15276963/f94fff5f-5f96-4e10-a000-65d973ff842b) _(In this screenshot, the four placeholders in the search box represent real contents, namely the entered letters 'f' 'o' 'n' 't'.)_

The shape of those placeholder lines suggests there's only one search result, and according to the same search conducted in an unaffected cromium instance (same v123.0.6312.105 on another device), that one search result is #enable-fontations-backend!

Details ~So, there doesn't seem to be a `#fonts-fingerprint-mitigation` flag in my instances of cromite v123.0.6312.105 at all.~ ~Now that's odd - how can a flag possibly be available in one instance and entirely missing (not even listed as "unavailable") in another instance of the same version of cromite? Has anyone else failed to find that flag?~ #### EDIT: > > I cant see that flag when I search for it ! > > Search doesn't seem to work for Cromite flags, you have to go explicitly in the "Cromite" tab and look for it. Sigh, I should have read _all_ previous comments before commenting.

However, in the 'cromite' tab of chrome://flags in that unaffected instance, there's indeed a #fonts-fingerprint-mitigation flag.

Alas, without 'cromite' flag search, it's very difficult to identify that flag in the affected instance.

drogga commented 5 months ago

@calvin2021y IDK why the ADB command doesn't work for you, but not only I managed to downgrade with the mentioned apps (in my prev. comment) in an A.11 emulator, but also SAI (by Aefyr), by using a custom install-create command in the super secret settings menu: pm install-create -d -r

Keep in mind that there's always a risk to lose the app's data when downgrading, so don't keep me responsible if that happens.

GfEW commented 5 months ago

971. There, even chrome://flags is unreadable due to font placeholders [...]

Screenshot ![chrome://flags/#fonts-fingerprint-mitigation (search box empty)](https://github.com/uazo/cromite/assets/15276963/34ef8943-7880-4a83-a847-9b264f2d81fd)

[...] without flag search, it's very difficult to identify that flag in the affected instance.

I've managed to identify and disable #fonts-fingerprint-mitigation in that flood of font placeholders posing as listing of flags. And since restarted, cromite renders all affected pages, including chrome://flags, readable again. Yay!

cvtsi2sd commented 5 months ago

That's the point of these certificates... only the original owner/creator with the private keys can publish a new official version.

Yep, I was just wondering if there was some way for me to explicitly override the check when installing, but apparently there is not (unless with root probably).

You can make your own set of keys and sign the apk with them... then you can uninstall their chromite apk, and install your own.

I hoped to avoid that to avoid losing my data (which isn't all that much, but still is a nuisance for bookmarks, home screen, some logins, etc); ultimately I tried to make a custom build to avoid having to do that to downgrade.

As for release, you should make a pull request and ask the project owner to integrate it and make a build.

@uazo would that be accepted? The current state of affairs is very sad, the workaround doesn't work and the browser is borderline unusable (a renderer process crash whenever a "strange" character should appear is a huge problem).

uazo commented 5 months ago

I have only now better understood the issue.

The identifiability of emojii is only a subset of the larger problem that is related to the handling of fallback fonts in android. To solve it, I would have to insert all the necessary fonts, about 90 mega in the apk more. Not feasible. For now I decided to drop the patch, maybe in the future I will reactivate the component update and the automatic download of the necessary fonts. Having it active, even for emojii alone, could have the effect of decreasing entropy by improving fingerprinting efficiency.

Thank you all for letting me know (OK, at the cost of a huge bug :)

Vinfall commented 5 months ago

I've managed to identify and disable #fonts-fingerprint-mitigation in that flood of font placeholders posing as listing of flags. And since restarted, cromite renders all affected pages, including chrome://flags, readable again. Yay!

I know you have solved it, but In case anyone discovered this issue as late as I am, you can actually head to cromite tab, then use Find in page in the toolbar instead. Search using that would still work.


Given that uazo already dropped the patch in recent commits, I don't whether the following would add any value but just post here.

For me the symptom is a bit weirder. CJK characters still appear normally as long as they are not inside the <code> HTML element...

uazo commented 5 months ago

thank you all for checking.

I think I will proceed in this way:

if it works, all cromite will use the same set of fonts and I will probably also be able to drop the Canvas::measureText() antifingerprinting patch.

vishalscodes commented 5 months ago

It doesn't work properly for Tamil, Kannada and Hindi too.

EDIT: It works now. Thanks @uazo for the quick response.

uazo commented 5 months ago

It doesn't work properly for Tamil, Kannada and Hindi too.

please use the latest version released today. it cannot not work, that patch has been removed.

GfEW commented 5 months ago

@uazo Can we reset #fonts-fingerprint-mitigation to enabled (default) by v123.0.6312.106 or is there any reason to keep it disabled?

alisonatwork commented 5 months ago

I switched it back to default after upgrading and haven't noticed any untoward effects.

uazo commented 5 months ago

Can we reset #fonts-fingerprint-mitigation to enabled (default) by v123.0.6312.106

yes, you can reactivate it, although in android, in the light of what I have learned (now), it does basically nothing. I am working on a new approach.

atauzki commented 5 months ago

Also broken on Windows build.