{"record":{"id":"ffdd531ff6c76ed4","repo":"microg/GmsCore","slug":"failed-to-instantiate-module-class","errorCode":null,"errorMessage":"Failed to instantiate module class: ","messagePattern":"Failed to instantiate module class: ","errorType":"exception","errorClass":"DynamiteModule.LoadingException","httpStatus":null,"severity":"error","filePath":"play-services-basement/src/main/java/com/google/android/gms/dynamite/DynamiteModule.java","lineNumber":160,"sourceCode":"                    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 {\n            return (IBinder) this.moduleContext.getClassLoader().loadClass(className).newInstance();\n        } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | RuntimeException e) {\n            throw new LoadingException(\"Failed to instantiate module class: \" + className, e);\n        }\n    }\n}\n","sourceCodeStart":142,"sourceCodeEnd":164,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-basement/src/main/java/com/google/android/gms/dynamite/DynamiteModule.java#L142-L164","documentation":"Thrown in DynamiteModule.instantiate when reflection cannot create an instance of the requested module class — wrong class name or inaccessible constructor. The class name is appended; the underlying reflection failure is chained.","triggerScenarios":"Thrown at play-services-basement/src/main/java/com/google/android/gms/dynamite/DynamiteModule.java:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the class name passed to instantiate matches an instantiable class in the loaded module","Catch LoadingException and degrade to a path that does not need the remote module"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}