Some features don't work on mozilla-mobile.github.io/testapp/
Steps to reproduce
- Install the v93 Focus build.
- Open the mozilla-mobile.github.io/testapp/.
- Test the options from Settings - Privacy & Security - Web Content, and Cookies and Site Data.
Expected behavior
The features are working properly.
Actual behavior
There are some features that do not respond anymore:
- web fonts, the "This is some crazy font text!" is displayed in normal fonts,
- JavaScript pop-up is displayed wether the user enables/disables the JS toggle,
- The option "Yes please", and "Block 3rd-party cookies only" options.
Device information
- Android device: Lenovo Tab M10 (Android 10)
- Focus version: 93.0.1 build 352452037 GV 93.0a1-20210831093704
For main: ❌ I can confirm the web fonts are blocked even with the setting off. ✅ The JavaScript pop-up is not displayed after turning the block setting on. Note that the page has to be reloaded and that is expected. ✅ The cookies options work as expected. Note that JavaScript needs to be turned on in order to test cookies state on this page.
@Amejia481 I think having SCRIPTS_AND_SUB_RESOURCES enabled blocks web fonts by default. Is there a workaround, or should we consider removing the option to allow web fonts?
@Amejia481 I think having SCRIPTS_AND_SUB_RESOURCES enabled blocks web fonts by default. Is there a workaround, or should we consider removing the option to allow web fonts?
I'm not familiar about how the fonts blocking feature used to work, but I haven't seen something similar on GV, it is very likely that we used to do the blocking manually.
Tracking protection only blocks resources that belong to sites that are on the active categories that it's blocking.
should we consider removing the option to allow web fonts?
No sure how important it's the feature for Focus and if we want to commit to re-implement it if needed cc @amedyne
Tagging @channingcarter and @brampitoyo do we want to keep "Block web fonts" ?
@mcarare could you check how fonts blocking used to work? To see how much work will be to re-implement it?
@Amejia481 At this moment:
-
in
mozilla.components.concept.engineDefaultSettingshas a paramwebFontsEnabled:Setting to control whether or not Web fonts are enabled.
open var webFontsEnabled: Boolean by UnsupportedSetting()
and that is passed to GeckoEngine. From there I do not know how it's supposed to work and if the settings is ignored when using SCRIPTS_AND_SUB_RESOURCES blocking.
Previously, it looks like this was the PR that added webfont blocking : https://github.com/mozilla-mobile/focus-android/pull/121/commits/df62d9144f1f7887cb347e95e2b4a39717a78f96
Nice, I didn't know that GV supports that functionality.
This is separated from tracking protection is an Engine setting, it looks like we are already modifying it on.
https://github.com/mozilla-mobile/focus-android/blob/482faf577a6e4071882580d52c0f4588fce51a86/app/src/main/java/org/mozilla/focus/engine/EngineSharedPreferencesListener.kt#L85
I'm not sure why it's not working for this case, I guess we will need to debug AC and see if there is an issue on GV or AC.
My first guess is that it is an overlap in GV in these settings. Not sure if we can get around it though. It used to work and it still works if we remove the SCRIPTS_AND_SUB_RESOURCES. Maybe someone from the GV team could have more insight?
Thanks for the clarification, maybe @agi could help us to clarify.
@mcarare @Amejia481 If it’s hard to implement web fonts blocking in time for MVP, I would be OK to remove it for now. However, if we can add it later on, we should.
Aside from privacy concern, web fonts can also be considered a “heavy” resource, so blocking it might save some resource and page load time. There’s still nothing as heavy as images, though!
@brampitoyo We already block them, the issue here is we cannot unblock them. 😁
I filed this ticket https://bugzilla.mozilla.org/show_bug.cgi?id=1730181 for the GV team to take a look.
I was able to reproduce the issue regarding:
- web fonts, the "This is some crazy font text!" is displayed in normal fonts,
- JavaScript pop-up is displayed wether the user enables/disables the JS toggle,
- the "Yes please", and "Block 3rd-party cookies only" cookies options.
Device: Lenovo Tab M10 (Android 10) Build 93.0.2 (352522329 GV 93.0a1-20210906031657)
I was able to reproduce the issue regarding:
- web fonts, the "This is some crazy font text!" is displayed in normal fonts,
- JavaScript pop-up is displayed wether the user enables/disables the JS toggle,
- the "Yes please", and "Block 3rd-party cookies only" cookies options.
Device: Lenovo Tab M10 (Android 10) Build 93.0.3 (352601845 with GV 93.0a1-20210906031657)
I was able to reproduce the issue regarding:
- web fonts, the "This is some crazy font text!" is displayed in normal fonts,
- JavaScript pop-up is displayed wether the user enables/disables the JS toggle,
- the "Yes please", and "Block 3rd-party cookies only" cookies options.
Device: Lenovo Tab M10 (Android 10) Build 93.1.1 (build 352731722 with GV 93.0-20210927210923)
@mcarare @ionutbedregeanu we need to look at this further. They are being reported by users in the product release.
It is strange, I still cannot reproduce the Javascript issue on the main branch but I can reproduce it in the play store version.
@mcarare, I was able to reproduce this on the 93.1.1 build, with Google Pixel (Android 10). Please see the short video below:
https://user-images.githubusercontent.com/40694158/136762674-388c1774-efed-4e47-9d38-dbb20b3493d7.mp4
The Cookies and Site Data settings work correctly on both Beta 94.0.0 (build 352862025 GV 94.0-20211005185813) and the latest debug build from main from 10/14 (build 11 GV 95.0a1-20211007091917). The Web content settings have been checked here: https://github.com/mozilla-mobile/focus-android/issues/5238.
Devices used:
- Oppo Find X3 (Android 11)
- Huawei MediaPad M3 (Android 7)
I'll leave the issue open until the fix is uplifted to the Beta build.