Skip to content
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

[CrashlyticsPlugin] "Unstripped native library path does not exist" because check is done before the "assembleRelease" task creates it (with plugin version 2.9.3 and 2.9.4) #4682

Closed
bowserf opened this issue Feb 15, 2023 · 10 comments
Assignees
Labels
api: crashlytics type: bug Something isn't working

Comments

@bowserf
Copy link

bowserf commented Feb 15, 2023

Configuration

  • Gradle version: 7.5.1
  • AGP: 7.2.2

My application, using a native library, is configured to upload debug symbols on Firebase Crashlytics.
Here is its configuration:

android {
  buildTypes {
        release {
            configure<com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension> {
                nativeSymbolUploadEnabled = true
                strippedNativeLibsDir = "$buildDir/intermediates/stripped_native_libs/release/out/lib"
                unstrippedNativeLibsDir = "$buildDir/intermediates/merged_native_libs/release/out/lib"
            }
        }
    }
}

Problem:

Starting from firebase-crashlytics-gradle version 2.9.3, when I do an "assembleRelease" (because I configured the plugin in release) without a previous build cache, I got the following error after a few seconds:

Unstripped native library path does not exist: /app/build/intermediates/merged_native_libs/release/out/lib. Either specify the correct unstrippedNativeLibsDir or disable Crashlytics symbol uploading.

It worked with previous plugin versions (we previously used version 2.9.2.

It seems the existence of a directory at the targeted path is now done before the "assembleRelease" process and before creating such a directory.

I now have to:

  • disable the plugin nativeSymbolUploadEnabled = false
  • build my release
  • re-enable the plugin nativeSymbolUploadEnabled = true
    Before executing the Gradle task to upload native symbols.
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@argzdev
Copy link
Contributor

argzdev commented Feb 17, 2023

Thanks for reporting, @bowserf. I was able to reproduce the same behavior with version 2.9.4. I'll notify our engineers and see what we can do here.

@argzdev argzdev added the type: bug Something isn't working label Feb 17, 2023
@soygabimoreno
Copy link

I had the same issue with 2.9.4. It worked in 2.9.2.

@Durkaen
Copy link

Durkaen commented Mar 1, 2023

Hi, I am also having the same issue. Is there any news?

@bernhardpflug
Copy link

Same issue here! Worked fine with 2.9.2

@horne3754sg
Copy link

Hi, I just want to add my own findings.

I have encountered this issue with 2.9.4 as well. It seems to me that it tries to include 'build/intermediates/merged_native_libs/release/out/lib' before its actually built them.

If I run 2.9.2, it will build the project as thought I ran npm run android, but for release and generate a release variant of the relevant intermediate files.

image

But if I run 2.9.4 it fails and informs me that the file could not be found which makes sense because its not been built.

image

@mrober
Copy link
Contributor

mrober commented Mar 31, 2023

Thanks for all the information. This issue happens when overriding the unstrippedNativeLibsDir. We have a fix for this that will go out in the next release, in about 2 weeks. For now, I recommend using version 2.9.2. I will update this after the release with the specific version.

@bowserf
Copy link
Author

bowserf commented Mar 31, 2023

Thank you very much for your message and the fix that is coming 🙏

We stay on 2.9.2 until you release the next version

@mrober
Copy link
Contributor

mrober commented Apr 14, 2023

This is fixed in 2.9.5 now. Please reopen this issue if you have any problems.

@mrober mrober closed this as completed Apr 14, 2023
@soygabimoreno
Copy link

This is fixed in 2.9.5 now. Please reopen this issue if you have any problems.

Thank you so much for fixing it, @mrober! 🙏

@firebase firebase locked and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: crashlytics type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants