firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.25k stars 572 forks source link

Firebase Crashlytics: failed for task ':news:uploadCrashlyticsMappingFileRelease' #2234

Closed umair-dpl closed 3 years ago

umair-dpl commented 3 years ago

[READ] Step 1:Steps that I have already tried?

Integrating Crashlytics to your react native app can literally be pain in the ass sometimes. I have found the solutions listed below : 1) Implementing this piece of code in your App level Gradle.build :

afterEvaluate { Task uploadMappingTask = tasks.findByName("uploadCrashlyticsMappingFileRelease") if (uploadMappingTask != null) { println "find uploadMappingTask" Task packageTask = tasks.findByName("packageRelease") if (packageTask != null) { println "find packageTask" uploadMappingTask.mustRunAfter(packageTask) } Task packageBundleTask = tasks.findByName("packageReleaseBundle") if (packageBundleTask != null) { println "find packageBundleTask" uploadMappingTask.mustRunAfter(packageBundleTask) } } }

2) Delete these two lines for a temporary fix.

apply plugin: 'com.google.firebase.crashlytics implementation 'com.google.firebase:firebase-crashlytics:X.X.X'

2a) Tried deleting these two lines, APK is also built but it crashes on start.

3) Added this piece of code in App level build.gradle in release : firebaseCrashlytics { // nativeSymbolUploadEnabled true, mappingFileUploadEnabled true }

3a) Followed this solution as well after implementation got another bug of :

No signature of method: build_6elsnc00nil35c05ncglt9f91.android() is applicable for argument types: (build_6elsnc00nil35c05ncglt9f91$_run_closure1) values: [build_6elsnc00nil35c05ncglt9f91$_run_closure1@2ff1c989]

3b) now in context to solve the issue of NO SIGNATURE OF METHOD, I did few implementations.

3b1) inducing io.fabric in app level build.gradle/ downgrading io fabric which didn't give any help. dependencies { classpath 'io.fabric.tools:gradle:1.27.1' } 3b2) watch for systemProps and remove them from gradle.properties. systemProp.http.proxyHost= systemProp.http.proxyPort=80 systemProp.https.proxyHost= systemProp.https.proxyPort=80

they were not included in my gradle.properties.

4) Tried solving Crashlytics bug by adding below mentioned lines in pro guard rules :

-keepattributes Annotation -keepattributes SourceFile,LineNumberTable prevent Crashlytics obfuscation -keep class com.crashlytics.* { ; } -dontwarn com.crashlytics.**

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

install Firebase Crashlytics and try creating a signed APK on android 4.0, react native 0.63.4 and firebase 10.1.0.

wpmed92 commented 3 years ago

Having the same issue here. Any progress on this?

farhankhan-mset commented 3 years ago

Start facing this issue since last night.

 What went wrong:
Execution failed for task ':app:uploadCrashlyticsMappingFileEnvCaUat'.
> java.io.IOException: Unknown error while sending file, check network [/Users/runner/work/1/s/app/build/crashlytics/EnvCaUat/mappings/9dbd44faa2d44f029c7ade66c8bc0c3c.gz; response: 500 HTTP/1.1 500 Internal Server Error]
harry248 commented 3 years ago

Start facing this issue since last night.

 What went wrong:
Execution failed for task ':app:uploadCrashlyticsMappingFileEnvCaUat'.
> java.io.IOException: Unknown error while sending file, check network [/Users/runner/work/1/s/app/build/crashlytics/EnvCaUat/mappings/9dbd44faa2d44f029c7ade66c8bc0c3c.gz; response: 500 HTTP/1.1 500 Internal Server Error]

Same error for us (see my comment in https://github.com/firebase/firebase-android-sdk/issues/2145).

MarijanGazica commented 3 years ago

Start facing this issue since last night.

 What went wrong:
Execution failed for task ':app:uploadCrashlyticsMappingFileEnvCaUat'.
> java.io.IOException: Unknown error while sending file, check network [/Users/runner/work/1/s/app/build/crashlytics/EnvCaUat/mappings/9dbd44faa2d44f029c7ade66c8bc0c3c.gz; response: 500 HTTP/1.1 500 Internal Server Error]

One more case of the same problem here

farhankhan-mset commented 3 years ago

Looks like Crashlytics wasn't enabled for different flavors, as for different flavors we were using separate firebase projects. https://github.com/firebase/firebase-android-sdk/issues/2145#issuecomment-745261376

MarijanGazica commented 3 years ago

Start facing this issue since last night.

 What went wrong:
Execution failed for task ':app:uploadCrashlyticsMappingFileEnvCaUat'.
> java.io.IOException: Unknown error while sending file, check network [/Users/runner/work/1/s/app/build/crashlytics/EnvCaUat/mappings/9dbd44faa2d44f029c7ade66c8bc0c3c.gz; response: 500 HTTP/1.1 500 Internal Server Error]

One more case of the same problem here

Update: started working yesterday afternoon with no changes made

umair-dpl commented 3 years ago

solution i found was : changing
shrinkResources false minifyEnabled false in buildType release this doesn't invoke the proguard file and thus the mapping file error is not raised

you can also use useProguard false but it's obsolete for now.