{"record":{"id":"88312d3dbdf85ab7","repo":"microg/GmsCore","slug":"no-acceptable-module-moduleid-found-local","errorCode":null,"errorMessage":"No acceptable module \" + moduleId + \" found. Local version is \" + result.localVersion + \" and remote version is \" + result.remoteVersion + \".","messagePattern":"No acceptable module \" \\+ moduleId \\+ \" found\\. Local version is \" \\+ result\\.localVersion \\+ \" and remote version is \" \\+ result\\.remoteVersion \\+ \"\\.","errorType":"exception","errorClass":"LoadingException","httpStatus":null,"severity":"error","filePath":"play-services-basement/src/main/java/com/google/android/gms/dynamite/DynamiteModule.java","lineNumber":139,"sourceCode":"    public static int getRemoteVersion(@NonNull Context context, @NonNull String moduleId) {\n        return getRemoteVersion(context, moduleId, false);\n    }\n\n    public static int getRemoteVersion(@NonNull Context context, @NonNull String moduleId, boolean forceStaging) {\n        Log.e(TAG, \"Remote modules not yet supported\");\n        return 0;\n    }\n\n    @NonNull\n    public static DynamiteModule load(@NonNull Context context, @NonNull VersionPolicy policy, @NonNull String moduleId) throws LoadingException {\n        Context applicationContext = context.getApplicationContext();\n        if (applicationContext == null) throw new LoadingException(\"null application Context\", null);\n        try {\n            VersionPolicy.SelectionResult result = policy.selectModule(context, moduleId, VersionPolicy.IVersions.Default);\n            Log.i(TAG, \"Considering local module \" + moduleId + \":\" + result.localVersion + \" and remote module \" + moduleId + \":\" + result.remoteVersion);\n            switch (result.selection) {\n                case NONE:\n                    throw new LoadingException(\"No acceptable module \" + moduleId + \" found. Local version is \" + result.localVersion + \" and remote version is \" + result.remoteVersion + \".\");\n                case LOCAL:\n                    Log.i(TAG, \"Selected local version of \" + moduleId);\n                    return new DynamiteModule(context);\n                case REMOTE:\n                    throw new UnsupportedOperationException();\n                default:\n                    throw new LoadingException(\"VersionPolicy returned invalid code:\" + result.selection);\n            }\n        } catch (LoadingException loadingException) {\n            throw loadingException;\n        } catch (Throwable e) {\n            throw new LoadingException(\"Failed to load remote module.\", e);\n        }\n    }\n\n    @NonNull\n    public IBinder instantiate(@NonNull String className) throws LoadingException {\n        try {","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-basement/src/main/java/com/google/android/gms/dynamite/DynamiteModule.java#L121-L157","documentation":"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...').","triggerScenarios":"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).","commonSituations":"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.","solutions":["Add the required play-services module dependency so a local version is bundled in the APK","Use a VersionPolicy that prefers local (e.g., prefer-local) to avoid depending on remote availability","Catch LoadingException and fall back to a bundled implementation of the functionality","Prompt/update Google Play services on the device (GoogleApiAvailability.makeGooglePlayServicesAvailable)"],"exampleFix":"// before\nDynamiteModule mod = DynamiteModule.load(ctx, DynamiteModule.PREFER_REMOTE, \"ads\");\n// after\nDynamiteModule mod;\ntry {\n    mod = DynamiteModule.load(ctx, DynamiteModule.PREFER_LOCAL, \"ads\");\n} catch (DynamiteModule.LoadingException e) {\n    Log.w(TAG, \"Module unavailable, using fallback\", e);\n    mod = null; // use bundled fallback path\n}","handlingStrategy":"try-catch","validationCode":"// check availability before loading\nDynamiteModule.VersionPolicy.IVersions v =\n    new DynamiteModule.VersionPolicy.IVersions.Default();\nif (DynamiteModule.getVersion(ctx, moduleId) <= 0\n    && /* remote unavailable */ false) {\n    // module is neither local nor remote — skip load, use fallback\n}","typeGuard":null,"tryCatchPattern":"try {\n    DynamiteModule m = DynamiteModule.load(ctx, DynamiteModule.PREFER_LOCAL, moduleId);\n} catch (DynamiteModule.LoadingException e) {\n    Log.w(TAG, \"Module unavailable\", e);\n    // fall back to bundled implementation\n}","preventionTips":["Bundle the local module via the matching play-services dependency","Prefer PREFER_LOCAL/PREFER_HIGHEST_OR_LOCAL policies over remote-only","Handle devices with outdated Google Play services via GoogleApiAvailability checks","Always provide an in-app fallback for module-dependent features"],"tags":["android","dynamite","play-services","module"],"backgroundTag":"resource-not-found","analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}