microg/GmsCore · error · IOException
ERROR_SERVICE_NOT_AVAILABLE
ERROR_SERVICE_NOT_AVAILABLE
Error message
ERROR_SERVICE_NOT_AVAILABLE
What it means
GCM availability error in CloudMessagingRpc.sendRegisterMessageBlocking: the response Intent carried ERROR_SERVICE_NOT_AVAILABLE (or the wait failed), meaning the GCM service could not handle the register request at this time.
Source
Thrown at play-services-gcm/src/main/java/org/microg/gms/gcm/CloudMessagingRpc.java:134
private PendingIntent getSelfAuthIntent() {
if (selfAuthIntent == null) {
Intent intent = new Intent();
intent.setPackage("com.google.example.invalidpackage");
selfAuthIntent = PendingIntent.getBroadcast(context, 0, intent, 0);
}
return selfAuthIntent;
}
public Intent sendRegisterMessageBlocking(Bundle extras) throws IOException {
sendRegisterMessage(extras);
Intent resultIntent;
try {
resultIntent = messengerResponseQueue.poll(30, TimeUnit.SECONDS);
} catch (InterruptedException e) {
throw new IOException(e.getMessage());
}
if (resultIntent == null) {
throw new IOException(ERROR_SERVICE_NOT_AVAILABLE);
}
return resultIntent;
}
private void sendRegisterMessage(Bundle extras) {
Intent intent = new Intent(ACTION_C2DM_REGISTER);
intent.setPackage(getGcmPackageName(context));
extras.putString(EXTRA_MESSAGE_ID, "google.rpc" + messageIdCounter.getAndIncrement());
intent.putExtras(extras);
intent.putExtra(EXTRA_MESSENGER, messenger);
intent.putExtra(EXTRA_APP, getSelfAuthIntent());
context.startService(intent);
}
public void sendGcmMessage(Bundle extras) {
Intent intent = new Intent(ACTION_GCM_SEND);
intent.setPackage(GMS_PACKAGE_NAME);
intent.putExtras(extras);View on GitHub (pinned to 157c9d86ac)
Solutions
- Retry registration with backoff — the service is often temporarily unavailable
- Ensure GCM is enabled and the device has network
- Wait before retrying instead of hammering the service
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at play-services-gcm/src/main/java/org/microg/gms/gcm/CloudMessagingRpc.java:134 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/3aec2e62f6503c55.
Report an issue: GitHub.