expo/expo · error · Error

Cannot get GUID with null `Application.applicationId`

Error message

Cannot get GUID with null `Application.applicationId`

What it means

Thrown by `getGUID()` in a bare build when `expo-application`'s `Application.applicationId` is null/undefined. The bare GUID lookup is keyed by native application ID, so without it the function cannot determine which GUID to return. This typically means `expo-application` could not read the native bundle's identifier.

Source

Thrown at apps/native-component-list/src/api/guid.ts:46

  if (['storeClient', 'standalone'].includes(Constants.executionEnvironment)) {
    if (!GUID)
      throw new Error(
        `No valid GUID for Expo Go on platform: ${
          Platform.OS
        }. Supported native platforms are currently: ${Object.keys(managedMap).join(', ')}`
      );
    return GUID;
  } else if (Constants.executionEnvironment === 'bare') {
    if (!BARE_GUIDs) {
      throw new Error(
        `No valid GUID for bare projects on platform: ${
          Platform.OS
        }. Supported native platforms are currently: ${Object.keys(bareMap).join(', ')}`
      );
    }

    if (!Application.applicationId) {
      throw new Error('Cannot get GUID with null `Application.applicationId`');
    }
    if (!(Application.applicationId in BARE_GUIDs)) {
      throw new Error(
        `No valid GUID for native app Id: ${Application.applicationId}. Valid GUIDs exist for ${
          Platform.OS
        } projects with native Id: ${Object.keys(BARE_GUIDs).join(', ')}`
      );
    }
    return BARE_GUIDs[Application.applicationId];
  } else {
    throw new Error(
      `No GUID available for executionEnvironment: ${Constants.executionEnvironment}`
    );
  }
}

View on GitHub (pinned to b09195aac2)

Solutions

  1. Ensure `expo-application` is correctly installed and linked in the bare native project.
  2. Verify the native app has a valid `applicationId` (Android `build.gradle`) / `CFBundleIdentifier` (iOS Info.plist).
  3. In test/Node environments, mock `Application.applicationId` to a known value.

Example fix

// before
const guid = getGUID(); // applicationId is null

// after — ensure native id is set, and guard
guard: if (!Application.applicationId) { throw new Error('link expo-application'); }
const guid = getGUID();
Defensive patterns

Strategy: validation

Validate before calling

import * as Application from 'expo-application';
function hasApplicationId(): boolean {
  return !!Application.applicationId;
}

Type guard

function hasValidApplicationId(app: typeof Application): boolean {
  return typeof app.applicationId === 'string' && app.applicationId.length > 0;
}

Prevention

When it happens

Trigger: Calling `getGUID()` with `executionEnvironment === 'bare'`, a valid `BARE_GUIDs` map, but `Application.applicationId` evaluating falsy (null or undefined).

Common situations: expo-application is misconfigured or not linked; the native build did not embed the application identifier (misbuilt iOS bundle / Android package); running in a JS-only test environment where expo-application returns null.

Related errors


AI-assisted analysis of expo/expo@b09195aac2 (2026-08-12). Data as JSON: /api/errors/edcc9090cced57bc. Report an issue: GitHub.