Using Firebase App Distribution service is resulting in app not installed error
Asked Answered
T

12

39

I'm using the Firebase app distribution service for the Android platform. For automatic distributions, I've set up the Gradle file according to the steps mentioned in the docs. The setup and auth are successful. The distribution is also successful. But once I download the app using Firebase's App Tester app for Android, it results in app not installed error. This is for both: debug as well as release variant.

I tried installing the app after disabling the Google play protect, but the issue remains. Can someone please help me regarding this?

enter image description here

enter image description here

enter image description here

enter image description here

Tini answered 27/9, 2019 at 6:5 Comment(5)
I'm voting to close this question as off-topic because it should be addressed directly to Firebase support. support.google.com/firebase/contact/supportPinebrook
@DougStevenson As this service is released yesterday, there may be many developers out there facing the same issue. I'm into Android app development for 4 years now, and I have taken best care of all other aspects of the app. The app not getting installed on multiple devices in any build variant is concerning. Also, an answer by a Firebase team member here will help all the developers facing this issue. I request you to kindly do not close this question please.Tini
Thanks for the feedback. I have followed your suggestion: reddit.com/r/Firebase/comments/d9wmjm/…Tini
Throwing my guess into the ring: is there a chance you’ve got the application already installed with an incompatible version?Anthiathia
As I've commented on the answer by @JamesWatson, nopes.Tini
I
13

The reason of the message "Installation Failed" or "App not installed" can vary, simply because this is the only error you can get while installing your app. I agree that it is not helpful.

However, it is for most cases due to a signing issue. Here are some solutions :

  1. Make sure you used a Release Signed APK for your Firebase Distribution. https://developer.android.com/studio/build/build-variants#signing

enter image description here

  1. When you generate your signed APK, you can choose V1 or V2 signatures. Try using the V1 signature. V2 signature was a feature introduced in Android 7.0 : https://developer.android.com/about/versions/nougat/android-7.0#apk_signature_v2

  2. Make sure your app is signed correctly, by checking the values in your file, app/build.gradle :

    android {
       ...
       defaultConfig {...}
       signingConfigs {
           release {
               storeFile file("myreleasekey.keystore")
               storePassword "password"
               keyAlias "MyReleaseKey"
               keyPassword "password"
           }
       }
       buildTypes {
           release {
               ...
               signingConfig signingConfigs.release
           }
       }
    

    }

Last but not least, make sure that your phone has enough storage to install the app, and that the option "Install from unknown sources" is checked in the settings.

Ioneionesco answered 5/7, 2020 at 22:7 Comment(1)
Very good answer detailing out the possible reasonsTini
S
9

I ran into this issue with a customer and it turned out that she needed to delete the version of the app that was on her phone to get this to work. (It was a previously installed non Firebase version)

Selemas answered 13/4, 2020 at 1:46 Comment(2)
I've run into this before, but I currently have a situation where this does not resolve the problem.Monad
@Selemas I've run into this now, I already uninstalled the debug version and still got this error when installing the release version from Firebase App Distribution and I still have no idea what the problem.Ynez
N
4

As for my case, when I did ./gradlew appDistributionUploadDebug, it just grabbed whatever APK file it found and uploaded it. In other words, it just uploaded a portion of the app that happened to be there, which was significantly smaller than what it should have been.

./gradlew assembleDebug; ./gradlew appDistributionUploadDebug solved the problem.

Nye answered 26/9, 2020 at 3:29 Comment(0)
K
3

I had the same issue. So I checked the logs and found this when the installation failed:

2019-10-07 10:20:29.941 771-2406/? E/ResolverController: No valid NAT64 prefix (114, <unspecified>/0)
2019-10-07 10:20:30.740 1278-1537/? W/NativeHelper: Failure copying native libraries [errorCode=-113]
2019-10-07 10:20:30.740 1278-1537/? E/PackageInstallerSession: Commit of session 392193568 failed: Failed to extract native libraries, res=-113

So I assumed there had to be something wrong with my APK-file I used. I pressed Build -> Build APK(s) and uploaded that file to Firebase when it was done. I'm not sure I actually went through the build process the first time or just grabbed the apk directly from the build folders. It may have been corrupted or just the wrong one. I recommend just doing the steps one more time and make sure you build the correct one and upload that.

Kiln answered 7/10, 2019 at 8:54 Comment(0)
N
2

Make sure you are providing a signingConfigs to each of your variants.

add to your app's build.gradle's android tag the following code:

signingConfigs {
    config {
        keyAlias '<YOUR_ALIES>'
        keyPassword '<YOUR_KEY_PASSWORD>'
        storeFile file('<YOUR_KEY_PATH>') // Usually use '../keystore.key'
        storePassword '<YOUR_STORE_PASSWORD>'
    }
}

Finally, add the following line into each variant in your buildTypes in your app's build.gradle :

signingConfig signingConfigs.config

Hope this helps.

Numerology answered 10/11, 2019 at 12:7 Comment(2)
This is the correct answer here. You don't want your QA/internal testers to need to uninstall each time. Simply sign the distributed version with your current keystore file or a new one - it doesn't matter.Ribal
For flutter users signing the app using this flutter.dev/docs/deployment/android worked for meOliveolivegreen
R
2

This is a random error (apparently).

What worked for me was manually deleting the build folder inside the app module (simply cleaning the project does not delete all the compiled code), build the APK again, re-upload it on FAD and then the APK installed successfully.

Rosecan answered 22/11, 2019 at 14:45 Comment(0)
M
2

The reason this happens is that the APK that you generated may not be compatible with all mobile CPU architectures. By CPU architectures, I mean that some APKs are compatible with only ARM or x86 Android devices. Therefore, there is a tag within the app-level gradle file within <project_dircectory>/android/app/build.gradle called universalApk which has to be set to true so that when you generate the APK from either android studio or from the CLI, it will generate for you a universal APK, compatible with all CPU architectures and therefore, multiple Android devices regardless of which CPU architecture that Android device supports.

The parameter universalApk can be found specifically in the splits JSON object with the build.gradle file aforementioned like so:

splits {
        abi {
            reset()
            enable enableSePerCPUArchitecture
            universalApk true  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }

You can also customize, as you see in the same JSON object, the different CPU architecture you would like to include to separately support when generating an APK. In this case, I have included: "armeabi-v7a", "x86", "arm64-v8a", "x86_64", which means when I undergo the APK generation process, a separate APK will be generated for each of these CPU architectures (which is useful is you only want to support specific android devices and reduce the size of the APK).

Evidently, one downside of using a Universal APK is that the size of the apk will be substantially larger than the individual architecture APKs, simply because we are accommodating multiple Android devices.

In summary, this is the solution I found because initially, I had only uploaded the x86 APK, which produced the same error on my Android device because it was not x86 compatible. As soon as I generated a universal release APK via Android studio, and invited myself to test the app on my Android device using Firebase App Distribution, it worked smoothly!

Mathia answered 8/9, 2020 at 21:38 Comment(0)
B
1

After trying all of the other solutions, it turned out that the problem in my case was that there wasn't enough available storage space - the package installer gives a generic "Install failed" in this case too. Hopefully this saves someone else the hours I wasted.

Bicknell answered 16/5, 2020 at 1:40 Comment(0)
G
1

I have ran into this issue. This might be due to lack of sufficient space on the phone's internal storage. I tried freeing up some space and then installed the app. This worked for me.

Gastro answered 1/3, 2021 at 14:53 Comment(0)
J
0

We ran into this error when having the production build of our application available on the devices in question.

Simply uninstalling the production app worked a charm - we could then install either our test/dev/both applications without any issues.

Jackhammer answered 1/10, 2019 at 10:38 Comment(2)
Thank you for the response. But no, I don't have the app already installed on the target device.Tini
I had a similar issue. There was previous snapshot version installed and while updating the app via App Tester I've got the meaningless: Installation Failed error. In my case I had to do two steps: uninstall previously installed app AND reboot the phone. Next, I was able to update the app via App Tester.Jacquijacquie
G
0

For me, bitrise had an issue with the ANDROID KEYSTORE FILE in code signing. Somehow, the keystore password, alias, and private upload key were missing.

Going to workflows -> code signing -> android keystore file and re-entering the values made it work

Girardi answered 4/2, 2022 at 22:0 Comment(0)
H
0

For me the debug apk does not work with Firebase App Distribution but release apk does work. You can disable proguard in build.gradle file:

buildTypes {
    release {
        minifyEnabled false
    }
}
Hessite answered 10/7, 2022 at 2:25 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.