microg/GmsCore · error · IllegalArgumentException
Missing package name
Error message
Missing package name
What it means
TapAndPayService.handleServiceRequest() resolves the calling package with PackageUtils.getAndCheckCallingPackage(this, request.packageName); if it returns null (caller unknown, uid/package mismatch, or request.packageName absent), it throws IllegalArgumentException("Missing package name") and the service request is rejected before TapAndPayImpl is created.
Source
Thrown at play-services-tapandpay/core/src/main/kotlin/org/microg/gms/tapandpay/TapAndPayService.kt:56
import com.google.android.gms.tapandpay.internal.firstparty.RefreshSeCardsRequest
import com.google.android.gms.tapandpay.internal.firstparty.SetActiveAccountRequest
import com.google.android.gms.tapandpay.internal.firstparty.SetSelectedTokenRequest
import com.google.android.gms.tapandpay.issuer.ListTokensRequest
import com.google.android.gms.tapandpay.issuer.PushTokenizeRequest
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 = "GmsTapAndPay"
class TapAndPayService : BaseService(TAG, GmsService.WALLET_TAP_AND_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, TapAndPayImpl(this, packageName), ConnectionInfo().apply {
features = arrayOf(
Feature("tapandpay", 1),
Feature("tapandpay_account_linking", 1),
Feature("tapandpay_add_service_listener", 1),
Feature("tapandpay_backup_and_restore_tokenize", 1),
Feature("tapandpay_block_payment_cards", 1),
Feature("tapandpay_check_contactless_eligibility", 1),
Feature("tapandpay_check_notification_governance", 1),
Feature("tapandpay_dismiss_quick_access_wallet", 1),
Feature("tapandpay_enable_secure_keyguard", 1),
Feature("tapandpay_felica_tos", 1),
Feature("tapandpay_get_active_wallet_infos", 1L),
Feature("tapandpay_get_all_cards_for_account", 1),
Feature("tapandpay_get_contactless_setup_configuration", 1),
Feature("tapandpay_get_data_for_backup", 1),
Feature("tapandpay_get_environment", 1L),
Feature("tapandpay_get_last_attestation_result", 1),View on GitHub (pinned to 157c9d86ac)
Solutions
- Ensure the client's GetServiceRequest.packageName is set to the caller's own package name
- Reinstall/update the client so its UID matches the declared package signature
- Check that the calling app is properly signed and visible to the service (package visibility rules)
- On the service side, return a proper error Status instead of throwing if you control the fork
Example fix
// before
// client: GetServiceRequest() with packageName unset
// after
val request = GetServiceRequest().apply {
packageName = context.packageName
callingPackage = context.packageName
} Defensive patterns
Strategy: validation
Validate before calling
val request = GetServiceRequest().apply { packageName = context.packageName } Type guard
fun GetServiceRequest.hasValidPackage() = !packageName.isNullOrBlank()
Try / catch
try { bindAndRequest() } catch (e: IllegalArgumentException) { if (e.message == "Missing package name") fixRequestPackageNameAndRetry() } Prevention
- Always set packageName on GetServiceRequest to your own package
- Keep app signature/UID consistent (avoid reinstall races)
- Account for Android package-visibility filtering
When it happens
Trigger: A client binds and issues a GetServiceRequest whose packageName is null/empty, or whose claimed package does not match the actual calling UID so getAndCheckCallingPackage returns null.
Common situations: Client SDK passing no package name in the service request, side-loaded/modified clients spoofing a wrong package, or uid mismatch after app reinstallation while an old binding persists.
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
- maxUpdates must be greater than 0
- minUpdateDistanceMeters must be greater than or equal to 0
- minUpdateIntervalMillis must be greater than or equal to 0,
- Transparency must be in the range [0..1]
- An empty path was supplied.
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/72f16cf8fdb34191.
Report an issue: GitHub.