question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

transformClassesWithFirebasePerformancePlugin Gradle task error Can't instrument because of null. Copying as is.

See original GitHub issue

Environment

  • Android Studio version: 4.1.3
  • Firebase Component: Performance
  • Component version: com.google.firebase:firebase-bom:26.8.0
  • Plugin version: com.google.firebase:perf-plugin:1.3.5

The problem

HTTP/S network request trace and Monitor specific methods using @AddTrace does not report to Firebase.

  • Steps to reproduce: Run the gradle task ‘transformClassesWithFirebasePerformancePluginForYourBuildFlavor’.

Build is successful compile but @AddTrace and network monitor does not work and I have a lot of errors in output log. There are so many errors that the buffer overflows. Looks like it logs for all classes like this:

[DEBUG] [FirebasePerformancePlugin] instrumentClassFile() >> inputFile: 'path_to_class/MyClass.class' 
[ERROR] [FirebasePerformancePlugin] Can't instrument because of null. Copying as is.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
thebrodyagacommented, Apr 7, 2021

The problem is https://github.com/gradle/gradle/issues/12286 Easy solution is add in buildSrc/build.gradle like https://github.com/firebase/firebase-android-sdk/blob/master/buildSrc/build.gradle

def perfPluginVersion = System.getenv("FIREBASE_PERF_PLUGIN_VERSION") ?: "1.3.5"
dependencies {
    implementation "com.google.firebase:perf-plugin:$perfPluginVersion"
}
0reactions
google-oss-botcommented, Apr 7, 2021

Hey @thebrodyaga. We need more information to resolve this issue but there hasn’t been an update in 5 weekdays. I’m marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Error:Execution failed for task ':app ... - Stack Overflow
After migrating my Android project to Gradle Kotlin DSL I suddenly also receive the Can't instrument error by the Firebase Performance ...
Read more >
Get started with Performance Monitoring for Android - Firebase
The Performance Monitoring Gradle plugin v1.1.0 can cause a mismatch in Guava dependencies, resulting in the following error: Error:Execution failed for task ......
Read more >
Firebase performance plugin ExceptionInInitializerError
I've tried keeping various firebase classes in my proguard rules to no effect. build.gradle files and proguard files attached (with sensitive information ...
Read more >
Hidden costs of Firebase Performance and how to avoid them
Solution. We can't fully address this issue, but using code shrinking tool will somewhat reduce the impact on installed app size. Hidden cost...
Read more >
ASM throws ArrayIndexOutOfBoundsException when ...
CompilationFailedException Can't instrument: ... Run the gradle assemble task and you should see the below error when ... null java.lang.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found