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
Remove Firebase Analytics #1121
Comments
Please elaborate. I made sure to disable analytics in firebase console, so where do you see analytics? |
My library scanner reported that, see here (scroll down and click on "libraries detected"). Triggered by |
I think it's good now: 045d6ee |
Thanks! Looks good from what I can tell about the code (I'm not an Android dev). "For sure" I'll be able to tell as soon as the next APK is available and has passed my scanner (maybe you'll tag v7.0.1?). Will close this issue then when confirmed. |
Just published: https://github.com/veloce/lichobile/releases/tag/v7.0.1 |
Thanks! Updater already grabbed it. And scanner still complains about Firebase Analytics. Let me look at the smali from v7.0.1… That's strange, it looks identical to that of v7.0.0 – |
Too bad. I don't see what I can do about it now. What is strange is that the gradle settings had really an effect: I could see in the logs that firebase-analytics could not be initialised. |
Yeah, the times of "don't be evil" are long gone – Google likes to sneak things in everywhere. I've got a bunch of other apps in my repo using FCM which don't have this issue, so there must be some way to get that out. Not being an Android dev myself I unfortunately cannot help figure. If it helps you I could check for some "example apps" also hosted on Github, maybe you see some "trick" in their code? |
It could help, yes. |
OK, then let me list some examples (going by the CDM permission and Firebase being detected; no guarantee they're not still on GCM):
While looking for these examples I've noted that most apps using FCM also show Firebase Analytics, probably for the same reason as here. I've skipped apps last updated 2018 or earlier, as they are much more likely to use GCM. |
On the F-Droid version of Lichess, (possibly through a 3rd party repo?) it shows Lichess requires Google Services, Firebase Cloud Messaging and Firebase Analytics, and are listed as anti-features. Can we please just remove (not "disable", keyword being remove) all these anti-features, and just keep it as Lichess. It would be great to see the app follow the ideals of the platform. I highly encourage this decision. |
They are here because of push notifications. If you don't want to use push notification on lichess app and want to have this libraries removed you can build your own version of the app using this repo. |
How do most other apps achieve push notifications curiously without using such? Is it just to stay alive in the background without it killing it? Because I note most apps do generally have a stay alive feature that throws the app into notification area (which you can minimize). Otherwise I don't really understand why Lichess needs these for push notifications, but thousands of other FOSS apps get away with notifications without them? |
@grravity they are probably using other alternatives, like MQTT, XMPP or SSE (the latter is e.g. used by Tutanota & Mastodon), or web sockets (Telegram, Signal). @veloce while I generally agree, not everyone is able to "self-compile". For a "naked build" (without push at all for now), could you establish a build flavor? Then we might be able to have F-Droid build that. |
Not too familiar with any of this, I am slightly familiar with XMPP as far as communications goes, but yes this does make sense as to me as to how/why. I'm more confused as to why Lichess isn't using these originally and instead using Google services.
I believe most do use two different flavors. Google services for their Play Store release, and then have an F-Droid release not using Google Services. I think this is the best way to go if it's possible in this case, and kinda what I was originally hoping for and expected upon originally going to download the app. Was confused when saw Google services was required for the F-Droid release. Kinda sucks, Lichess is amazing especially it's libre aspect, but then we have to have Google services within the F-Droid version of the app, which ruins it. Hoping some changes with the F-Droid version will be considered here. :) |
Wild guess: what's the first thing you think of when someone mentions Push? What's the most wide-spread push implementation? And which one is the easiest to implement? We're not born as privacy advocates. It's something some of us reach at some point. So my guess is that @veloce simply wasn't aware of the implication when he added FCM – and possibly would approach that differently today. But once you're "locked in", replacing isn't as easy as the original integration.
There is no separate F-Droid release as of now. It's the very same APK you find in Play, which @veloce thankfully attached to the releases here at Github so I can fetch it into my repo. As you can see above, he does his best to keep it privacy-friendly. So hopefully, one day we'll have a variant that comes completely without those proprietary components. When that will be, and how it will be done – we may contribute our ideas, but it's done when it's done and how the dev(s) decide(s). Thanks @veloce for bearing with us tin-foils! |
@IzzySoft Yes but the site and app seem very clear about being libre and privacy friendly, it seems to be only common sense not to use Google Services, or just some lazy implementation |
So, I've been lurking through #409 and this (https://gitlab.com/fdroid/rfp/issues/94), and it seems that the only way we get an F-droid version is if Firebase analytics are removed, and push notifications are changed for a FLOSS alternative on the regular APK uploaded to G Play store, or if someone builds another one specially for F-droid without these. I think the first way would be the better, since there are a lot of people who are not privacy advocates, or are even aware of the critical stalking condition taken by Silicon Valley who download the app from the most common application store and would have their data being stolen without them ever knowing it. This would also make easier the idea of having an F-droid version since it would be handled by the same person. Or am I missing something? By the way, you can check if your application has trackers in it by using Exodus. |
@5a384507-18ce-417c-bb55-d4dfcc8883fe Also Exodus Privacy works good, but I find ClassySharkExodus to work a bit better and finds things Exodus Privacy doesn't, but it is a little more "overwhelming" to look at for some. |
That's because it also includes my library definitions, in addition to Exodus', and probably some more (as mine get added to Exodus as well occasionally) 😄
Oh yes. That's why I had recommended that "intermediate page" with the short listing, which ClassyShark luckily included. The 3 of us (the author of ClassyShark, Exodus and me) often exchange ideas. |
By the way, while this is being worked out (and I assume it's going to take a while since this problem is being dealt with for at least two years), you can use the progressive web app which makes things a bit nicer than playing from your browser and allows you to block scripts if you have uMatrix/uBlock Origin (although all of Lichess' scripts are necessary and there isn't any third party tracker or similar thing). |
Any updates on this? |
It's the one you find attached to |
It's the same. |
I assume this means this (removing non-foss depdencies) still isn't even being worked on currently? |
I tried (cf. discussion above) and failed. Feel free to try and submit a PR. |
Rip, alright I don't have the knowledge to do this so I unfortunately cannot provide help myself. |
Just adding my two cents here, I'd love to see Lichess app free from proprietary dependencies, but this may actually be harder than one could think. Just creating a build flavor without push services wouldn't be sufficient because capacitor itself has transitive dependencies to firebase-messaging and play-services-location. I guess they need to address this first before Lichess can do anything. |
I have a quick-and-dirty fix that should work. I forked the Capacitor repository (https://github.com/Mageek627/capacitor) in order to remove everything related to Firebase and Google Services. After cloning that you do:
Then in your project:
I built the apk of the Ionic blank app with Capacitor and analyzed it in Android Studio and I don't find anything Google-related. I'm not sure that it doesn't break anything critical with Capacitor though. Whenever I'll have the time, I'll try to integrate this into a version of lichobile without Firebase (and therefore with no notification), so that we can at least have a working version soon. Of course if someone else feels like doing that, don't wait for me! |
I will upgrade to capacitor 3.0. About the rest, I'm ok with slight changes that don't involve extra maintenance cost over the long term. But we'll see that after. |
Any updates on this? Capacitor 3.0 was released some time ago. |
Not sure if this issue is dead, but I would also really like to be able to download lichess on F-droid. Even if there was notifications didn't work. There is a lot of talk about a build being easier after capacitor 3 is adopted. But it seems it is? Line 57 in 3c6572b
What's the hold up now on making an f-droid build? @gilbsgilbs did you any traction on your proposed changes? #1121 (comment) |
I didn't know the Capacitor 3 upgrade had been done, therefore I did not make any progress since then. But this is great news. I reckon my previous comment still holds: after removing Glancing through |
This commit provides a way to build lichobile for Android without support for push notifications, dropping the dependency on Firebase. This is a required step towards F-Droid inclusion. The main idea is to expose a `patch-nonfree` script that will: - replace the push notification implementation with a stub - remove any direct or indirect dependency to firebase (there was an indirect one in the @capacitor/push-notifications plugin, and a direct one in the app/build.gradle) - change the applicationId so that it doesn't gets confused with the non-free one The implementation is not as elegant as I'd have liked because I haven't found a magic way to enable or disable dependencies for specific product flavors with capacitor ([as the Android gradle plugin allows]( https://developer.android.com/studio/build/build-variants#product-flavors)). I'm far from a capacitor expert though, so there may be better ways. As I had to patch the JS sources anyways, I chose to not rely on Android's product flavors at all to prevent any confusion that would lead to build a non-free version as a free APK and vice-versa. I think it is pretty straightforward, not too intrusive, and that it should be manageable maintenance-wise. The remaining changes in the JS code are needed to remove any mention of "notifications" in the UI when using the push stub. We don't expect notifications to work on the free version. Fixes lichess-org#1121 (well, technically this doesn't "remove" the dependency to Firebase as the main build flavor still relies on it, but I think getting rid of that is lengthier project as lila itself depends on it) Issues related to F-Droid inclusion: - lichess-org#278 - lichess-org#409 - lichess-org#927 - lichess-org#1331
This commit provides a way to build lichobile for Android without support for push notifications, dropping the dependency on Firebase. This is a required step towards F-Droid inclusion. The main idea is to expose a `patch-nonfree` script that will: - replace the push notification implementation with a stub - remove any direct or indirect dependency to firebase (there was an indirect one in the @capacitor/push-notifications plugin, and a direct one in the app/build.gradle) - change the applicationId so that it doesn't gets confused with the non-free one The implementation is not as elegant as I'd have liked because I haven't found a magic way to enable or disable dependencies for specific product flavors with capacitor ([as the Android gradle plugin allows]( https://developer.android.com/studio/build/build-variants#product-flavors)). I'm far from a capacitor expert though, so there may be better ways. As I had to patch the JS sources anyways, I chose to not rely on Android's product flavors at all to prevent any confusion that would lead to build a non-free version as a free APK and vice-versa. I think it is pretty straightforward, not too intrusive, and that it should be manageable maintenance-wise. The remaining changes in the JS code are needed to remove any mention of "notifications" in the UI when using the push stub. We don't expect notifications to work on the free version. Fixes lichess-org#1121 (well, technically this doesn't "remove" the dependency to Firebase as the main build flavor still relies on it, but I think getting rid of that is lengthier project as lila itself depends on it) Issues related to F-Droid inclusion: - lichess-org#278 - lichess-org#409 - lichess-org#927 - lichess-org#1331
This commit provides a way to build lichobile for Android without support for push notifications, dropping the dependency on Firebase. This is a required step towards F-Droid inclusion. The main idea is to expose a `patch-nonfree` script that will: - replace the push notification implementation with a stub - remove any direct or indirect dependency to firebase (there was an indirect one in the @capacitor/push-notifications plugin, and a direct one in the app/build.gradle) - change the applicationId so that it doesn't gets confused with the non-free one The implementation is not as elegant as I'd have liked because I haven't found a magic way to enable or disable dependencies for specific product flavors with capacitor ([as the Android gradle plugin allows]( https://developer.android.com/studio/build/build-variants#product-flavors)). I'm far from a capacitor expert though, so there may be better ways. As I had to patch the JS sources anyways, I chose to not rely on Android's product flavors at all to prevent any confusion that would lead to build a non-free version as a free APK and vice-versa. I think it is pretty straightforward, not too intrusive, and that it should be manageable maintenance-wise. The remaining changes in the JS code are needed to remove any mention of "notifications" in the UI when using the push stub. We don't expect notifications to work on the free version. Fixes lichess-org#1121 (well, technically this doesn't "remove" the dependency to Firebase as the main build flavor still relies on it, but I think getting rid of that is lengthier project as lila itself depends on it) Issues related to F-Droid inclusion: - lichess-org#278 - lichess-org#409 - lichess-org#927 - lichess-org#1331
This commit provides a way to build lichobile for Android without support for push notifications, dropping the dependency on Firebase. This is a required step towards F-Droid inclusion. The main idea is to expose a `patch-nonfree` script that will: - replace the push notification implementation with a stub - remove any direct or indirect dependency to firebase (there was an indirect one in the @capacitor/push-notifications plugin, and a direct one in the app/build.gradle) - change the applicationId so that it doesn't gets confused with the non-free one The implementation is not as elegant as I'd have liked because I haven't found a magic way to enable or disable dependencies for specific product flavors with capacitor ([as the Android gradle plugin allows]( https://developer.android.com/studio/build/build-variants#product-flavors)). I'm far from a capacitor expert though, so there may be better ways. As I had to patch the JS sources anyways, I chose to not rely on Android's product flavors at all to prevent any confusion that would lead to build a non-free version as a free APK and vice-versa. I think it is pretty straightforward, not too intrusive, and that it should be manageable maintenance-wise. The remaining changes in the JS code are needed to remove any mention of "notifications" in the UI when using the push stub. We don't expect notifications to work on the free version. Fixes lichess-org#1121 (well, technically this doesn't "remove" the dependency to Firebase as the main build flavor still relies on it, but I think getting rid of that is lengthier project as lila itself depends on it) Issues related to F-Droid inclusion: - lichess-org#278 - lichess-org#409 - lichess-org#927 - lichess-org#1331
This commit provides a way to build lichobile for Android without support for push notifications, dropping the dependency on Firebase. This is a required step towards F-Droid inclusion. The main idea is to expose a `patch-nonfree` script that will: - replace the push notification implementation with a stub - remove any direct or indirect dependency to firebase (there was an indirect one in the @capacitor/push-notifications plugin, and a direct one in the app/build.gradle) - change the applicationId so that it doesn't gets confused with the non-free one The implementation is not as elegant as I'd have liked because I haven't found a magic way to enable or disable dependencies for specific product flavors with capacitor ([as the Android gradle plugin allows]( https://developer.android.com/studio/build/build-variants#product-flavors)). I'm far from a capacitor expert though, so there may be better ways. As I had to patch the JS sources anyways, I chose to not rely on Android's product flavors at all to prevent any confusion that would lead to build a non-free version as a free APK and vice-versa. I think it is pretty straightforward, not too intrusive, and that it should be manageable maintenance-wise. The remaining changes in the JS code are needed to remove any mention of "notifications" in the UI when using the push stub. We don't expect notifications to work on the free version. Fixes lichess-org#1121 (well, technically this doesn't "remove" the dependency to Firebase as the main build flavor still relies on it, but I think getting rid of that is lengthier project as lila itself depends on it) Issues related to F-Droid inclusion: - lichess-org#278 - lichess-org#409 - lichess-org#927 - lichess-org#1331
Does this mean lichess will be available on f-droid? (I was directed here by that question) |
@Powersource F-Droid metadata PR still needs to be made, but I don't think there's anything blocking inclusion anymore as far as lichobile in concerned. |
Until then it's available in my repo still. Once the new APK was fetched I can check for remaining stoppers; apart from Firebase Analytics, the previous versions also include GMS & FCM which would also be show-stoppers. As for metadata: I could provide what's set up with my repo (Fastlane structures as F-Droid expects) as a starter-package if wanted. |
I started to make the recipe and realized that there's at least two issues.
Apart from that, I was able to build the free variant successfully. |
I can repeat my above offer, @gilbsgilbs:
You just need to say you want them. And yes, in your repo is much preferred – F-Droid itself won't accept graphic files any more (the metadata repo was growing too much and became hard to handle). You can then adjust what I send of course, but you will at least have the structures in place and not to guess what goes where 😉 |
It was deprecated a while ago because of JCenter shutdown. And F-Droid scanner complains about it. See: - ionic-team/capacitor#4542 (comment) - lichess-org#1121 (comment)
Sure @IzzySoft, please do share what you have, don't ask 😄. Regarding upstream inclusion of fastlane metadata, as it doesn't depend on me but rather on what the maintainers of lichobile want, I'll completely ignore this issue for know and see what happens. Also, it seems the bintray repository was deprecated. I opened #2184 to remove it which sounds like the cleanest solution. |
There you go 😃 |
F-Droid inclusion PR: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11707 . |
Congrats to the listing at F-Droid.org! I guess it would be OK now to remove Lichess from my repo to avoid confusion – or would you prefer it to stay? A request for removal was opened on my repo, but as it does not come from here I felt the decision should be delegated to you 😉 Some background here – and yes, Shuvashish is correct with pointing out Lichess is slightly over the disk space limit alotted to each app in my repo… |
@veloce @gilbsgilbs Did you decide? I have no problems with waiting, but having received no reply at all could mean you've missed the note. As the default is removing an app about 10..14 days after it reached F-Droid, I'll now just add a due-date on the request to remove it unless you object 😉 Hope that's OK with you. |
@IzzySoft sorry I did not remember you had already the free app on your repo. I'm fine with the removal yes. Actually, seeing your 1st message, I'd let you decide what you want to do as it's your repo. That being said I guess it's better to remove it since now the app is on F-Droid. |
@veloce Thanks! Will do then (should you need it back, just give me a ping – it's easily re-established). I was just unsure as the package names differ. Could have been due to different functionality. |
This commit provides a way to build lichobile for Android without support for push notifications, dropping the dependency on Firebase. This is a required step towards F-Droid inclusion. The main idea is to expose a `patch-nonfree` script that will: - replace the push notification implementation with a stub - remove any direct or indirect dependency to firebase (there was an indirect one in the @capacitor/push-notifications plugin, and a direct one in the app/build.gradle) - change the applicationId so that it doesn't gets confused with the non-free one The implementation is not as elegant as I'd have liked because I haven't found a magic way to enable or disable dependencies for specific product flavors with capacitor ([as the Android gradle plugin allows]( https://developer.android.com/studio/build/build-variants#product-flavors)). I'm far from a capacitor expert though, so there may be better ways. As I had to patch the JS sources anyways, I chose to not rely on Android's product flavors at all to prevent any confusion that would lead to build a non-free version as a free APK and vice-versa. I think it is pretty straightforward, not too intrusive, and that it should be manageable maintenance-wise. The remaining changes in the JS code are needed to remove any mention of "notifications" in the UI when using the push stub. We don't expect notifications to work on the free version. Fixes lichess-org#1121 (well, technically this doesn't "remove" the dependency to Firebase as the main build flavor still relies on it, but I think getting rid of that is lengthier project as lila itself depends on it) Issues related to F-Droid inclusion: - lichess-org#278 - lichess-org#409 - lichess-org#927 - lichess-org#1331
It was deprecated a while ago because of JCenter shutdown. And F-Droid scanner complains about it. See: - ionic-team/capacitor#4542 (comment) - lichess-org#1121 (comment)
corresponding to #590 – your switch to FCM accidentally dragged that in. AFAIK it's a simple toggle with the wrong default, incidentally done that way by Google.
The text was updated successfully, but these errors were encountered: