microg/GmsCore · error · LoadingException

No acceptable module " + moduleId + " found. Local version i

Error message

No acceptable module " + moduleId + " found. Local version is " + result.localVersion + " and remote version is " + result.remoteVersion + ".

What it means

DynamiteModule.load consults a VersionPolicy that reports local and remote versions of the requested module. When the policy's selection is NONE — neither a locally bundled module nor a remotely available one in Google Play services — it throws LoadingException('No acceptable module <moduleId> found...').

Source

Thrown at play-services-basement/src/main/java/com/google/android/gms/dynamite/DynamiteModule.java:139

    public static int getRemoteVersion(@NonNull Context context, @NonNull String moduleId) {
        return getRemoteVersion(context, moduleId, false);
    }

    public static int getRemoteVersion(@NonNull Context context, @NonNull String moduleId, boolean forceStaging) {
        Log.e(TAG, "Remote modules not yet supported");
        return 0;
    }

    @NonNull
    public static DynamiteModule load(@NonNull Context context, @NonNull VersionPolicy policy, @NonNull String moduleId) throws LoadingException {
        Context applicationContext = context.getApplicationContext();
        if (applicationContext == null) throw new LoadingException("null application Context", null);
        try {
            VersionPolicy.SelectionResult result = policy.selectModule(context, moduleId, VersionPolicy.IVersions.Default);
            Log.i(TAG, "Considering local module " + moduleId + ":" + result.localVersion + " and remote module " + moduleId + ":" + result.remoteVersion);
            switch (result.selection) {
                case NONE:
                    throw new LoadingException("No acceptable module " + moduleId + " found. Local version is " + result.localVersion + " and remote version is " + result.remoteVersion + ".");
                case LOCAL:
                    Log.i(TAG, "Selected local version of " + moduleId);
                    return new DynamiteModule(context);
                case REMOTE:
                    throw new UnsupportedOperationException();
                default:
                    throw new LoadingException("VersionPolicy returned invalid code:" + result.selection);
            }
        } catch (LoadingException loadingException) {
            throw loadingException;
        } catch (Throwable e) {
            throw new LoadingException("Failed to load remote module.", e);
        }
    }

    @NonNull
    public IBinder instantiate(@NonNull String className) throws LoadingException {
        try {

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. Add the required play-services module dependency so a local version is bundled in the APK
  2. Use a VersionPolicy that prefers local (e.g., prefer-local) to avoid depending on remote availability
  3. Catch LoadingException and fall back to a bundled implementation of the functionality
  4. Prompt/update Google Play services on the device (GoogleApiAvailability.makeGooglePlayServicesAvailable)

Example fix

// before
DynamiteModule mod = DynamiteModule.load(ctx, DynamiteModule.PREFER_REMOTE, "ads");
// after
DynamiteModule mod;
try {
    mod = DynamiteModule.load(ctx, DynamiteModule.PREFER_LOCAL, "ads");
} catch (DynamiteModule.LoadingException e) {
    Log.w(TAG, "Module unavailable, using fallback", e);
    mod = null; // use bundled fallback path
}
Defensive patterns

Strategy: try-catch

Validate before calling

// check availability before loading
DynamiteModule.VersionPolicy.IVersions v =
    new DynamiteModule.VersionPolicy.IVersions.Default();
if (DynamiteModule.getVersion(ctx, moduleId) <= 0
    && /* remote unavailable */ false) {
    // module is neither local nor remote — skip load, use fallback
}

Try / catch

try {
    DynamiteModule m = DynamiteModule.load(ctx, DynamiteModule.PREFER_LOCAL, moduleId);
} catch (DynamiteModule.LoadingException e) {
    Log.w(TAG, "Module unavailable", e);
    // fall back to bundled implementation
}

Prevention

When it happens

Trigger: Requesting a moduleId that is neither bundled in the APK (no local Dynamite module) nor available on the device's Google Play services; missing play-services dependencies so the local version is 0; devices without updated Play services; remote selection path unavailable (REMOTE throws UnsupportedOperationException in this variant).

Common situations: App built without the corresponding play-services feature dependency; old/emulator devices with outdated Google Play services; regional/restricted Play services builds lacking the module.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06). Data as JSON: /api/errors/88312d3dbdf85ab7. Report an issue: GitHub.