-
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
Crashes when using Firebase Performance Monitoring and R8 #1476
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hello @rishun-fsi , To further investigate the issue, would you like to tell us more about the step 1 to reproduce?
ObservationPerformance Monitoring works well when ExoPlayer is proguarded, maybe there is something to do with R8 and Performance Monitoring gradle plugin. Performance Monitoring SDK is not in the scope of concern. |
Hello @zijianjoy , Thank you for your answer. How do you enable obfuscation by R8 for ExoPlayer's library-core? Are you able to test with older version of ExoPlayer and see whether the problem exists? |
Thank you @rishun-fsi , I have tried to build with your ExoPlayer project with the following steps. However, the StepsRun gradle taskOn Android Studio, run gradle task Retrieves ExoPlayer aar
Add aar to Test appAdd the aar above to Test app's ResultWhen I ran the test app, it doesn't crash in the emulator and video player performed well. Would you like to confirm this is how you reproduce the issue? If not, what are the steps you have followed through to build ExoPlayer? (For example, how to set the obfuscation out of scope as appropriate?) Thank you! |
Hello @zijianjoy , Sorry, I'm going to detail the steps of the Run gradle task. Step.
core:
The following steps are the same. Note:This issue is happening when you create a player based on ExoPlayer. |
Thank you @rishun-fsi for the reproduction steps. I have followed the steps you listed, but I couldn't find the
FindingsWhen trying to reproduce the issue, I also found some records about Firebase Performance Gradle Plugin when it tries to instrument two classes with same names (regardless of cases) on a case-insensitive machine (See reference https://buganizer.corp.google.com/issues/139268403). By looking at ExoPlayer repository, I found a class called C.java which is
Since the R8 is obfuscating other classes in alphabetical order, one of the other file under the same directory was converted to Next steps
|
Hey @rishun-fsi. 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! |
R8 has been updated to account for existing mixed names such that clashing should no longer occur if using the keep rule To use the R8 version, add the following to your build.gradle file:
If you see other issues, please let us know. |
Thank you @zijianjoy for the response. StepsFor example run I could get a list of folders under aapt_friendly_merged_manifests
annotation_processor_list
annotations_typedef_file
annotations_zip
blame
check_manifest_result
compile_only_not_namespaced_r_class_jar
consumer_proguard_file
generated_proguard_file
incremental
jacoco_instrumented_classes
jacoco_instrumented_jars
javac
library_and_local_jars_jni
library_assets
library_manifest
lint_publish_jar
local_only_symbol_list
manifest_merge_blame_file
merged_java_res
merged_jni_libs
merged_manifests
merged_native_libs
merged_shaders
packaged-classes
packaged_res
public_res
res
shader_assets
stripped_native_libs
symbols The next step answer
Thank you @mkj-gram for the quick response. you saved my day. |
Glad that the issue is resolved now, thank you @mkj-gram for committing the fix and @rishun-fsi for confirming! For future reference, Firebase Performance Monitoring gradle plugin cannot instrument classes with only case difference in class name (for example, The current workaround is to apply |
The root cause ( The changes will come in the upcoming release of |
[REQUIRED] Step 2: Describe your environment
Android Studio version: 3.6.1
Firebase Component: Firebase Performance Monitoring
Component version: 19.0.6
ExoPlayer version: r2.11.3
[REQUIRED] Step 3: Describe the problem
Firebase Performance Monitoring + R8 encounters problems when using obfuscated library.
This reproduction occurred when I used Google ExoPlayer.
Steps to reproduce:
Obfuscate & build aar ExoPlayer in R8
Get the latest version of release-v2 branch from GitHub of ExoPlayer.
Enable obfuscation by R8 for library-core.
=>set the obfuscation out of scorpe as appropriate.
Execute the assemblyRelease task of library-core, library-dash, library-hls, library-smoothstreaming, and library-ui.
Execute the library-all assemblyRelease with the generated jar file.
=>ExoPlayer's aar is completed.
Load the library and enable Firebase Performance Monitoring in the application.
Running the app occurred an exception.
=>Please check out the Crash logs.
Tried patterns
Relevant Code:
Crash Logs
For details, please check the sample project.
TestApp_Exo_R8.zip
Thanks in advance for any help!
The text was updated successfully, but these errors were encountered: