microg/GmsCore · error · IllegalArgumentException
Missing package name
Error message
Missing package name
What it means
PayService.handleServiceRequest handles GMS service connections for the Pay API. It resolves the caller's package with PackageUtils.getAndCheckCallingPackage(this, request.packageName); when the result is null (missing/empty packageName in GetServiceRequest, or the caller does not actually own the claimed package) an IllegalArgumentException 'Missing package name' is thrown.
Source
Thrown at play-services-pay/core/src/main/kotlin/org/microg/gms/pay/PayService.kt:45
import com.google.android.gms.pay.GetSortOrderRequest
import com.google.android.gms.pay.GetValuablesFromServerRequest
import com.google.android.gms.pay.GetValuablesRequest
import com.google.android.gms.pay.internal.IPayService
import com.google.android.gms.pay.internal.IPayServiceCallbacks
import org.microg.gms.BaseService
import org.microg.gms.common.GmsService
import org.microg.gms.common.GooglePackagePermission
import org.microg.gms.common.PackageUtils
import org.microg.gms.utils.ExtendedPackageInfo
import org.microg.gms.utils.toBase64
import org.microg.gms.utils.warnOnTransactionIssues
private const val TAG = "PayService"
class PayService : BaseService(TAG, GmsService.PAY) {
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) {
val packageName = PackageUtils.getAndCheckCallingPackage(this, request.packageName)
?: throw IllegalArgumentException("Missing package name")
callback.onPostInitCompleteWithConnectionInfo(CommonStatusCodes.SUCCESS, PayServiceImpl(this, packageName), ConnectionInfo().apply {
features = arrayOf(
Feature("pay", 10),
Feature("pay_attestation_signal", 1),
Feature("pay_pay_capabilities", 1),
Feature("pay_feature_check", 1),
Feature("pay_get_card_centric_bundle", 1),
Feature("pay_get_passes", 1),
Feature("pay_get_pay_api_availability_status", 3),
Feature("pay_get_se_prepaid_card", 1),
Feature("pay_debit_se_prepaid_card", 1),
Feature("pay_get_specific_bulletin", 1),
Feature("pay_get_transit_cards", 1),
Feature("pay_get_wallet_status", 1),
Feature("pay_global_actions", 1),
Feature("pay_gp3_support", 1),
Feature("pay_homescreen_sorting", 3),
Feature("pay_homescreen_bulletins", 2),View on GitHub (pinned to 157c9d86ac)
Solutions
- Use an up-to-date Google Pay / play-services client library that populates GetServiceRequest.packageName
- Ensure the app's manifest package matches the package name passed to Pay APIs
- Confirm the calling UID owns the claimed package (signature/UID checks) when connecting directly
- Wrap the bind/init call so IllegalArgumentException is surfaced as a configuration error in your app
Defensive patterns
Strategy: try-catch
Validate before calling
val req = GetServiceRequest().apply {
packageName = context.packageName
require(!packageName.isNullOrBlank()) { "packageName required for Pay service" }
} Try / catch
try {
payClient.getAllWallets(...) // or manual bind to PayService
} catch (e: IllegalArgumentException) {
if (e.message == "Missing package name") {
Log.e(TAG, "GetServiceRequest.packageName missing; upgrade play-services-wallet client")
} else throw e
} Prevention
- Use current Google Pay / play-services client libraries that populate packageName
- Keep the manifest package name consistent with what is passed to Pay APIs
- Avoid hand-built GetServiceRequest objects in tests/tools without a valid package name
When it happens
Trigger: A client binds to the microG Pay service without setting packageName on GetServiceRequest; the resolved calling package does not match the claimed one; an unverified caller connects directly to the service.
Common situations: Outdated or hand-rolled GMS client bindings omitting the package name; package renaming (appId changes) causing caller/claim mismatch; security tooling or tests connecting to the service with minimal requests.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Missing package name
- Service not supported:
- Access denied, missing google package permission for
- UID [
- Required caller information missing
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/c467c81308cce2de.
Report an issue: GitHub.