firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

Storage barfs AppCheck warnings into logcat when AppCheck is not enabled

Open matejdro opened this issue 1 year ago • 1 comments

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general Firebase discussion, use the firebase-talk google group.
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Android Studio Jellyfish | 2023.3.1 Beta 1
  • Firebase Component: Storage (Database, Firestore, Storage, Functions, etc)
  • Component version: 20.3.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

  1. Create an Android project that uploads some files to Storage.
  2. Upload some files
  3. Watch logcat

Logcat is filled with Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: No AppCheckProvider installed. warnings. I do NOT use AppCheck, nor do I want it and yet storage keeps bugging me about it.

matejdro avatar Apr 16 '24 04:04 matejdro

Hi @matejdro, thank you for reaching and reporting the issue. I encountered the warnings upon uploading an image to Firebase Storage. I agree that the warnings are confusing when you’re not using AppCheck. I’ll inform our engineers and see what we can do here.

lehcar09 avatar Apr 17 '24 18:04 lehcar09

Hi @matejdro thanks for your feedback. While annoying for those that do not plan on integrating, those messages are there to help debug integration issues for those that want to use both products together. Knowing that no AppCheckProvider was found by the system greatly reduces the number of places you need to look at when debugging. And because it's not possible to know when someone is trying to integrate, and thus the message is most helpful, it's there for all.

An alternative would be for you to set up a logcat filters in Android Studio to get rid of them https://developer.android.com/studio/debug/logcat#key-value-search

rlazo avatar May 21 '24 22:05 rlazo

Could you maybe add a way to install no op app check provider in order to suppress this spam?

matejdro avatar May 22 '24 05:05 matejdro

I'm definitely not in favor of this approach, as you are changing your app only to get rid of a log message, which by definition should be done with log filters, but if you want to go there, I guess you can install the debug provider https://firebase.google.com/docs/app-check/android/debug-provider

rlazo avatar May 22 '24 10:05 rlazo

Well, changing log filter is already an ugly hack to get rid of logspam that shouldn't be there in the first place (storage has nothing to do with app check. How about we add logs for every single other Firebase feature that is not enabled just in case?)

matejdro avatar May 22 '24 11:05 matejdro