-
Notifications
You must be signed in to change notification settings - Fork 578
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
IidCompatibilityCheckFailure
lint check fails with a null pointer exception (NPE)...
#1701
Comments
I found a few problems with this issue:
|
@yogurtearl Thanks for reporting this issue. I am Ankita from the Firebase team. I used the following setup you mentioned but I couldn't reproduce this issue:
It's possible that the Could help me with more details like
|
I am using Gradle 6.5 |
Hi @yogurtearl Thanks for the Gradle version. I tried running with that version and still dint see the check fail. Are you able to consistently run into lint check failure. |
Yes, it is a nullpointerexception, but not sure how to get lint to print the full stack trace. |
I started to get the same issue in Android Studio when performing a code inspection. Gradle: 6.1.1 Firebase dependencies: |
Thanks for your response @perracolabs & @yogurtearl . I will try with versions as shown in @perracolabs comment & see if I am able to reproduce the issue. @perracolabs Which version of Android studio & Android Gradle plugin are using? |
@yogurtearl Regarding how to get a full stack trace: When you run |
Gradle version: 6.1.1 In case is of any use, the lint warning appears when performing a code inspection at "whole project" level |
I've found out that "firebase-ml-vision-face-model:20.0.1" has been deprecated, I removed it as it would had made sense that this could be the issue based in the lint notes about the 20.1.1 minimal version requirement.
PS: Make sure to perform a "whole project" code inspection in order to reproduce the issue. For a moment I thought it was solved after I removed the deprecated library, yet I missed this setting. |
I might be seeing the same thing with a more descriptive error with Gradle 6.5.1 and Android Gradle Plugin 4.2.0-alpha04:
|
@petedoyle Thanks for posting the descriptive error. This is super helpful. |
I am still unable to reproduce this issue with all the versions mentioned here. I will continue to reproduce this issue, meanwhile if this lint check is blocking you by any chance - you can disable this lint check by adding the following lines in your gradle file. android { |
Find attached a simple test project where I can reproduce the issue. I also include an export of my Android Studio settings, so by importing them you can match a similar development environment, if you also use the same Gradle and Android Studio versions. Gradle version: 6.1.1 in gradle-wrapper.properties: In the project level build.gradle: |
It's worth noting that this is not a failure it's just a "weak warning" Lines 117 to 121 in 3f4b32d
So arguably it's not a bug that needs fixing, although I could be convinced that we can make it fail silently cc @ankitaj224 |
I have the same issue on Gradle 6.1.1 and Android Studio 4.2 Canary 5 |
Similarly, I just started seeing this after I updated to Gradle Plugin 4.1.0 with Gradle 6.5:
Our dependencies show that we're using |
@ankitaj224 You can check this repository to reproduce the error using Android Studio 4.1 Android Studio: 4.1 I created a new Empty Activity project using Android Studio 4.1. The only code I added after creating the new project was for adding Crashlytics to the project by following the instructions from the official documentation. This commit (harshalbhakta/IidCompatibilityCheckFailureDemo@927c869) has the changes I made to enable Crashlytics. Code in this commit causes below lint warnings. Check failed with exception: java.lang.NoSuchMethodException: com.android.tools.idea.lint.AndroidLintIdeProject$LintGradleProject.getGradleProjectModel()
Check failed with exception: java.lang.NoSuchMethodException: com.android.tools.idea.lint.common.LintIdeProject$LintModuleProject.getGradleProjectModel() Firebase IID Compatibility Check Unable To Run
The check failed to run as it encountered unknown failure.
This is most likely caused by a new version of Android Gradle Plugin that this check does not support.
Please make sure your build does not depend on firebase-iid version earlier than 20.1.1 as it will cause issues.
Issue id: IidCompatibilityCheckFailure |
I'm having this issue too since AGP 4.1, and I could reproduce it with @harshalbhakta project 👍 |
Same issue on AGP 4.1, Gradle Version 6.7, iid is 20.3.0. |
Gradle Version 6.5 and iid is 20.3.0 Android Studio 4.1.0 having the same issue |
The exception is caused by this line. https://github.com/firebase/firebase-android-sdk/blob/15be8218dbb890dbc79deb858addece0ad255831/firebase-installations/customer-lint-checks/src/main/java/com/google/firebase/installations/lint/IncompatibleIidVersionDetector.kt |
Hi Everyone. Sorry for the delayed response. Yes, its a broken lint check caused by the reflection call in Firebase-Installations library resulting in this issue. I was figuring out if its safe to remove the lint check from the firebase-installations library. We have decided on removing the lint check from Firebase Installations library by mid November. Since, this lint check failure is a weak warning, anyone getting this error please feel free to ignore it if your app depends on firebase-iid version i.e greater than 20.1.1 I will keep this issue open till we rollout the lint removal. Thanks, |
this also doesn't seem to work...I end up adding these to our lint baselines... |
@kenyee use |
@ankitaj224 any update in newer releases? do you know if this has been fixed? |
also FYI, disable 'IidCompatibilityCheckFailure' doesn't work if you apply it to all modules... lint complains that the rule doesn't exist if that module doesn't use a firebase lib. Would be nice if this were fixed in the firebase lint rule though...or just take out the entire rule out of Firebase for now until it gets fixed so we don't need this workaround... |
Hi @chrisjenx Yes, as part of the firebase-installations v16.3.5 release, this lint check has been removed from the library(firebase-installations) that introduced it. Only firebase-messaging library has released a new version 21.0.1 that uses the latest version of firebase-installations. So, if you see this lint check warning been in your project due to a dependency on firebase-messaging. Update to the latest version of firebase-messaging v21.0.1 which will resolve this issue. However, not all firebase libraries that depend on older version of firebase-installations have updated to the version that removes the lint check. Reason being different firebase libraries follow different release schedule. Note: This issue is a lint warning and not causing any major build failures. A reasonable solution would be explicitly defining & updating the dependency on the firebase-installations library with the fix (v16.3.5) in your build file. Meanwhile, we will continue working with other firebase libraries to release with the newer version of firebase-installations. Please let me know if you have any questions. Thanks, |
There's two options:
|
IidCompatibilityCheckFailure
lint check fails with a null pointer exception (NPE)...Using bom
25.4.1
and Iid20.2.0
[REQUIRED] Step 2: Describe your environment
25.4.1
and Iid20.2.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
Run
lintRelease
Seems to be related to dagger 2.28, or Google places SDK 2.3.0 or androidtimesquare lib 1.7.10
The text was updated successfully, but these errors were encountered: