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

[🐛] [ANDROID] :app:injectCrashlyticsBuildIdsRelease FAILED - unstrippedNativeLibsDir #6983

Closed
5 of 10 tasks
yepMad opened this issue Mar 11, 2023 · 7 comments
Closed
5 of 10 tasks
Labels
blocked: firebase-sdk Pending a confirmed fix landing on the official native sdk's (iOS/Android). impact: build-error Behaviour causing build failure platform: android plugin: crashlytics Firebase Crashlytics type: bug New bug report

Comments

@yepMad
Copy link

yepMad commented Mar 11, 2023

Issue

"./gradlew assembleRelease" error:

> Task :app:injectCrashlyticsBuildIdsRelease FAILED
w: Detected multiple Kotlin daemon sessions at build\kotlin\sessions

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:injectCrashlyticsBuildIdsRelease'.
> java.io.IOException: Unstripped native library path does not exist: C:\Users\---\Documents\Git\---\android\app\build\intermediates\merged_native_libs\release\out\lib. Either specify the correct unstrippedNativeLibsDir or disable Crashlytics symbol uploading.

Project Files

Javascript

Click To Expand

package.json:

    "expo": "^48.0.4",
    "react": "^18.2.0",
    "react-native": "^0.71.3",
    "@react-native-firebase/analytics": "^17.3.2",
    "@react-native-firebase/app": "^17.3.2",
    "@react-native-firebase/crashlytics": "^17.3.2",
    "@react-native-firebase/messaging": "^17.3.2",
    "@react-native-firebase/perf": "^17.3.2",

firebase.json for react-native-firebase v6:

{
  "react-native": {
    "messaging_android_notification_channel_id": "high-priority",
    "messaging_android_notification_color": "@color/white"
  }
}

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

release {
        signingConfig signingConfigs.release
        minifyEnabled enableProguardInReleaseBuilds
        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"

        firebaseCrashlytics {
                nativeSymbolUploadEnabled true
                unstrippedNativeLibsDir 'build/intermediates/merged_native_libs/release/out/lib'
        }
}

android/settings.gradle:

rootProject.name = '------'

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle");
useExpoModules()

apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesSettingsGradle(settings)

include ':app'
includeBuild(new File(["node", "--print", "require.resolve('react-native-gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile())

include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

System:
    OS: Windows 10 10.0.22621
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 15.29 GB / 31.92 GB
  Binaries:
    Node: 16.19.0 - ~\AppData\Local\Temp\yarn--1678500777997-0.07019674832839518\node.CMD
    Yarn: 1.22.19 - ~\AppData\Local\Temp\yarn--1678500777997-0.07019674832839518\yarn.CMD
    npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: AI-212.5712.43.2112.8609683
    Visual Studio: 15.9.28307.2019 (Visual Studio Community 2017), 16.11.32802.440 (Visual Studio Community 2019)
  Languages:
    Java: 11.0.15
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^18.2.0 => 18.2.0 
    react-native: ^0.71.3 => 0.71.3 
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 17.3.2
  • Firebase module(s) you're using that has the issue:
    • crashlytics
  • Are you using TypeScript?
    • Y & v4.9.5


@yepMad yepMad added help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report labels Mar 11, 2023
@yepMad
Copy link
Author

yepMad commented Mar 11, 2023

Probably related: firebase/firebase-android-sdk#4682

@mikehardy
Copy link
Collaborator

I was unable to successfully generate an android release build with crashlytics android plugin v2.9.4 whereas v2.9.2 worked in make-demo - so hopefully the upstream issue is resolved soon. Until then I have to recommend v2.9.2 of the android crashlytics plugin

@mikehardy
Copy link
Collaborator

I've got a PR open that will update the expo plugin to use 2.9.2 instead of 2.9.4 plus alters docs to recommend 2.9.2 with a note that 2.9.4 is problematic, linking back to here. I'm going to resolve this here since we have a workaround but I urge everyone to subscribe to the upstream issue and stay subscribed to this one. If there is anything important, I'll post updates but in general I think we can hope a 2.9.5 version-to-come of the plugin will fix things

@mikehardy mikehardy added platform: android impact: build-error Behaviour causing build failure plugin: crashlytics Firebase Crashlytics Resolution: Solution Provided blocked: firebase-sdk Pending a confirmed fix landing on the official native sdk's (iOS/Android). and removed help: needs-triage Issue needs additional investigation/triaging. labels Mar 26, 2023
mikehardy added a commit that referenced this issue Mar 26, 2023
@billnbell
Copy link

billnbell commented Apr 7, 2023

2.9.4 does not build on React Native - non-expo. So we still need a solution.

@mikehardy
Copy link
Collaborator

The solution is to use 2.9.2, until some version greater than 2.9.4 is released @billnbell

@phips28
Copy link
Contributor

phips28 commented Apr 25, 2023

I am using 2.9.5 and I am getting the following error:

* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportRelease'.
> Could not create task ':app:injectCrashlyticsBuildIdsRelease'.
   > Cannot invoke method map() on null object

2.9.2 works ✅

@amit-nayar
Copy link

I am using 2.9.5 and I am getting the following error:

* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportRelease'.
> Could not create task ':app:injectCrashlyticsBuildIdsRelease'.
   > Cannot invoke method map() on null object

2.9.2 works ✅

Same for me. Can't use the latest. Using 2.9.2 for now.

exaby73 pushed a commit that referenced this issue Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: firebase-sdk Pending a confirmed fix landing on the official native sdk's (iOS/Android). impact: build-error Behaviour causing build failure platform: android plugin: crashlytics Firebase Crashlytics type: bug New bug report
Projects
None yet
Development

No branches or pull requests

5 participants