Google Play - Can't install. Try again, and if it still doesn't work, see common ways to fix the problem

Viewed 576

A large number of users are complaining that they receive the following error when trying to install the latest update of my application (see image below). I have been unable to replicate this issue myself. Have logged issue with Google, but they don't seem to know what is causing this either (asking for developer bug reports, but I feel uncomfortable walking users through how to do this). I've seen a few other posts about this topic, but no solutions. Any ideas on what could be the cause?

Things I have considered:

  • uses-permission - I haven't added any this release
  • uses-feature - I haven't added any this release
  • Package name has not been modified in this release
  • Min/target/compile sdk version - no changes made this release (min 24/target 30/compil 30)

Two changes I did make, but I don't suspect being an issue are:

  • I did change the android:label field in the application's manifest for <application>
  • I have added an exception to cleartextpermitted

Example error below:

enter image description here

And manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:sharedUserId="XXX..shared"
package="XXX">

<uses-feature
    android:name="android.hardware.camera"
    android:required="true" />
<uses-feature
    android:name="android.hardware.sensor.compass"
    android:required="true" />
<!--<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />-->
<uses-feature
    android:glEsVersion="0x00030002"
    android:required="true" />


<queries>
    <!-- Explicit apps you know in advance about: -->
    <package android:name="XXX"/>
    <package android:name="XXX2"/>
    <package android:name="XXX3"/>
</queries>


<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
    android:maxSdkVersion="28"
    tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
    android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:name="XXX"
    android:allowBackup="true"
    android:fullBackupContent="true"
    android:icon="@mipmap/ic_launcher"
    android:label="XXX"
    android:usesCleartextTraffic="false"
    android:theme="@style/AppTheme"
    android:networkSecurityConfig="@xml/network_security_config">

    <provider
        android:authorities="XXX"
        android:name="XXX.SharedPreferencesContentProvider"
        android:exported="true"
        android:protectionLevel="signature">
    </provider>

    <activity
        android:name=".MainActivity"
        android:label="XXX"
        android:screenOrientation="fullSensor"
        android:theme="@style/SplashTheme"
        >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    ...

</application>

</manifest>

EDIT: Suspect that the following line in my manifest may be the culprit:

android:sharedUserId="XXX..shared"

Releasing new version, will keep you updated.

1 Answers

Issue was with the following line in the manifest:

android:sharedUserId="XXX..shared"

I added this since the previous release to experiment with my suite of apps communicating with one another, but had forgotten to remove this before my release. This sharedUserId is typically used to group apps that are signed with the same cert/developer so that they can share info with one another. However, the flag has now been deprecated, and if you need your apps to communicate with one another, there are far better ways to do this without breaking your app. Read more about sharedUserID here (but DON'T implement it, whatever you do!):

https://developer.android.com/guide/topics/manifest/manifest-element

App updates will fail for users if the sharedUserId is added or doesn't match the current installed version. Google play will just hang or show a generic error that isn't useful to your users, ending up with confusion and a bunch of 1 star reviews.

Warning: removing the sharedUserId can be just as problematic as adding it. Any users that downloaded the app after you added it (or reinstalled your app during this time) will now get the same error when trying to update to a version where you removed it. The only way for them to fix is to uninstall/reinstall the app again. Lucky for me, I worked out this root cause within a few days, so I only have to manage a few days worth of new users who will experience this issue now, but if this had gone on any longer, you could be looking at a large number of users with the update issue.

Related