microg/GmsCore · error · RuntimeException

No package provided

Error message

No package provided

What it means

PushRegisterService.register(intent) extracts the sender/package from the C2DM register intent and throws with this message when the required package extra is absent — a malformed or incomplete registration intent.

Source

Thrown at play-services-core/src/main/kotlin/org/microg/gms/gcm/PushRegisterService.kt:160

            if (ACTION_C2DM_UNREGISTER == intent.action || ACTION_C2DM_REGISTER == intent.action && "1" == intent.getStringExtra(EXTRA_DELETE)) {
                unregister(intent)
            } else if (ACTION_C2DM_REGISTER == intent.action) {
                register(intent)
            }
        } catch (e: Exception) {
            Log.w(TAG, e)
            replyNotAvailable(intent)
        }
    }

    private fun replyNotAvailable(intent: Intent) {
        val outIntent = Intent(ACTION_C2DM_REGISTRATION)
        outIntent.putExtra(EXTRA_ERROR, PushRegisterManager.attachRequestId(ERROR_SERVICE_NOT_AVAILABLE, intent.requestId))
        sendReply(intent, intent.appPackageName, outIntent)
    }

    private suspend fun register(intent: Intent) {
        val packageName = intent.appPackageName ?: throw RuntimeException("No package provided")
        ensureAppRegistrationAllowed(this, database, packageName)
        Log.d(TAG, "register[req]: " + intent.toString() + " extras=" + intent!!.extras)
        val bundle = completeRegisterRequest(this, database,
                RegisterRequest()
                        .build(this)
                        .sender(intent.getStringExtra(EXTRA_SENDER))
                        .checkin(LastCheckinInfo.read(this))
                        .app(packageName)
                        .extraParams(intent.extras))

        val outIntent = Intent(ACTION_C2DM_REGISTRATION)
        outIntent.putExtras(bundle)
        Log.d(TAG, "register[res]: " + outIntent.toString() + " extras=" + outIntent.extras)
        sendReply(intent, packageName, outIntent)
    }

    private suspend fun unregister(intent: Intent) {
        val packageName = intent.appPackageName ?: throw RuntimeException("No package provided")

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. Include the package/sender extra in the com.google.android.c2dm.intent.REGISTER intent
  2. Reply with ERROR_INVALID_PARAMETERS so the caller can correct the request
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at play-services-core/src/main/kotlin/org/microg/gms/gcm/PushRegisterService.kt:160 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06). Data as JSON: /api/errors/e858d30d994cceba. Report an issue: GitHub.