commaai/openpilot · critical · RuntimeError

Profile installation failed: no result from eUICC

Error message

Profile installation failed: no result from eUICC

What it means

load_bpp() sends each BPP chunk to the eUICC and looks for an install result (parsed via _parse_install_result) in the responses. If no chunk produced a recognizable ProfileInstallResult, RuntimeError('Profile installation failed: no result from eUICC') is raised. The same message is reused at the tail for a parsed-but-unsuccessful result with no errorReason.

Source

Thrown at openpilot/common/esim/lpa.py:585

        if bpp_cmd:
          result["bppCommandId"] = int.from_bytes(bpp_cmd, "big")
        err = find_tag(value, 0x81)
        if err:
          result["errorReason"] = int.from_bytes(err, "big")
  return result


def load_bpp(client: AtClient, b64_bpp: str) -> dict:
  bpp = b64d(b64_bpp)
  result = None
  for chunk in _split_bpp(bpp):
    response = es10x_command(client, chunk)
    if response and (parsed := _parse_install_result(response)):
      result = parsed
      break

  if result is None:
    raise RuntimeError("Profile installation failed: no result from eUICC")
  if not result["success"] and result["errorReason"] is not None:
    msg = BPP_ERROR_MESSAGES.get(result["errorReason"])
    if not msg:
      cmd_name = BPP_COMMAND_NAMES.get(result["bppCommandId"], f"unknown({result['bppCommandId']})")
      err_name = BPP_ERROR_REASONS.get(result["errorReason"], f"unknown({result['errorReason']})")
      msg = f"Profile installation failed at {cmd_name}: {err_name}"
    raise RuntimeError(msg)
  if not result["success"]:
    raise RuntimeError("Profile installation failed: no result from eUICC")
  return result


def parse_metadata(b64_metadata: str) -> dict:
  root = find_tag(b64d(b64_metadata), TAG_PROFILE_METADATA)
  if root is None:
    raise RuntimeError("Invalid profileMetadata")
  return decode_struct(root, PROFILE)

View on GitHub (pinned to 516ec1e682)

Solutions

  1. Enable DEBUG=1 to capture the full APDU transcript and see where the eUICC stopped answering
  2. Reset modem + reopen ISD-R, then restart the entire download flow from the QR code (the BPP session cannot be resumed)
  3. Check whether the profile actually installed despite the missing result (list_profiles) before re-downloading — re-downloading an installed profile triggers 'already installed' errors
  4. If the eUICC consistently returns nothing after loadProfileElements, suspect eUICC memory/state — delete profiles and retry

Example fix

# before
result = load_bpp(client, b64_bpp)
# RuntimeError: Profile installation failed: no result from eUICC

# after — verify actual state before assuming failure
from openpilot.common.esim.lpa import load_bpp, list_profiles

try:
  result = load_bpp(client, b64_bpp)
except RuntimeError:
  installed = any(p['iccid'] == expected_iccid for p in list_profiles(client))
  if installed:
    result = {'success': True, 'errorReason': None}
  else:
    raise
Defensive patterns

Strategy: fallback

Try / catch

from openpilot.common.esim.lpa import load_bpp, list_profiles

try:
  result = load_bpp(client, b64_bpp)
except RuntimeError as e:
  if 'no result from eUICC' in str(e):
    # fallback: eUICC may have installed despite losing the result APDU
    if any(p['iccid'] == expected_iccid for p in list_profiles(client)):
      result = {'success': True}
    else:
      client._reset_modem()
      raise SystemExit('install incomplete; restart download with a fresh QR/session') from e
  raise

Prevention

When it happens

Trigger: Installation sequence completes (or aborts) without the eUICC emitting the BF37 install-result structure: eUICC stopped responding mid-load (modem/channel loss swallowed by retries), response TLVs unrecognized by the parser, or the session was cancelled server-side so no final result arrives.

Common situations: Modem serial hiccups during the long multi-APDU load; eUICC firmware returning a result layout the parser doesn't recognize; timeouts between chunks; mismatch between chunk segmentation (ES10X_MSS=120) and eUICC expectations.

Related errors


AI-assisted analysis of commaai/openpilot@516ec1e682 (2026-08-15). Data as JSON: /api/errors/22e4a6f1515574ab. Report an issue: GitHub.