{"record":{"id":"fa064c377edffa6b","repo":"microg/GmsCore","slug":"missing-package-name-fa064c","errorCode":null,"errorMessage":"Missing package name","messagePattern":"Missing package name","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"play-services-core/src/main/kotlin/org/microg/gms/games/GamesConnectService.kt","lineNumber":45,"sourceCode":"import com.google.android.gms.games.internal.connect.GamesSignInResponse\nimport com.google.android.gms.games.internal.connect.IGamesConnectCallbacks\nimport com.google.android.gms.games.internal.connect.IGamesConnectService\nimport org.microg.gms.BaseService\nimport org.microg.gms.auth.AuthConstants\nimport org.microg.gms.auth.AuthManager\nimport org.microg.gms.auth.AuthPrefs\nimport org.microg.gms.auth.signin.checkAccountAuthStatus\nimport org.microg.gms.common.GmsService\nimport org.microg.gms.common.PackageUtils\nimport org.microg.gms.utils.warnOnTransactionIssues\nimport java.util.UUID\n\nprivate const val TAG = \"GamesConnectService\"\n\nclass GamesConnectService : BaseService(TAG, GmsService.GAMES) {\n    override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) {\n        val packageName = PackageUtils.getAndCheckCallingPackage(this, request.packageName)\n            ?: throw IllegalArgumentException(\"Missing package name\")\n        callback.onPostInitCompleteWithConnectionInfo(\n            CommonStatusCodes.SUCCESS,\n            GamesConnectServiceImpl(this, lifecycle, packageName),\n            ConnectionInfo()\n        )\n    }\n}\n\nclass GamesConnectServiceImpl(val context: Context, override val lifecycle: Lifecycle, val packageName: String) : IGamesConnectService.Stub(), LifecycleOwner {\n\n    override fun signIn(callback: IGamesConnectCallbacks?, request: GamesSignInRequest?) {\n        Log.d(TAG, \"signIn($request)\")\n        suspend fun sendSignInRequired() {\n            val resolution = PendingIntentCompat.getActivity(context, packageName.hashCode(), Intent(context, GamesSignInActivity::class.java).apply {\n                putExtra(EXTRA_GAME_PACKAGE_NAME, packageName)\n                putExtra(EXTRA_ACCOUNT, GamesConfigurationService.getDefaultAccount(context, packageName))\n                putExtra(EXTRA_SCOPES, arrayOf(Scope(Scopes.GAMES_LITE)))\n            }, PendingIntent.FLAG_UPDATE_CURRENT, false)","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-core/src/main/kotlin/org/microg/gms/games/GamesConnectService.kt#L27-L63","documentation":"GamesConnectService validates the requesting package via PackageUtils.getAndCheckCallingPackage before constructing GamesConnectServiceImpl; a null result (missing or unverifiable package name in the GetServiceRequest) causes IllegalArgumentException(\"Missing package name\") and the GAMES connect endpoint is not bound.","triggerScenarios":"Client binds to GmsService.GAMES (connect variant) with request.packageName null or not matching the calling UID.","commonSituations":"Hand-rolled GmsClient implementations not setting packageName; spoofed bind attempts; apps running under UIDs the package manager cannot attribute (shared userId, instrumentation).","solutions":["Set request.packageName to the caller's package before binding","Use the standard microG/Play Games connect client which populates the request","Confirm the app is installed and its UID matches the claimed package"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"require(request.packageName != null) { \"packageName required for GamesConnectService bind\" }","typeGuard":null,"tryCatchPattern":"try {\n  gamesConnectClient.connect()\n} catch (e: IllegalArgumentException) {\n  if (e.message == \"Missing package name\") retryWithPackageName()\n}","preventionTips":["Always set GetServiceRequest.packageName from the caller's context","Use standard GmsClient connect paths","Avoid shared-UID setups that break package attribution"],"tags":["play-games","package-validation","service-binding","android"],"backgroundTag":"missing-required-argument","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"}