Skip to content

Warning: TypeError: _ExpoFontLoader.default.getLoadedFonts is not a function (it is undefined) #32895

Closed
@SREERAJ089

Description

Minimal reproducible example

https://github.com/SREERAJ089/expoFontsLoadedIssue/tree/main

What platform(s) does this occur on?

Android, iOS

Where did you reproduce the issue?

in a development build

Summary

Expected Behavior: The app is expected to load custom fonts asynchronously using expo-font, and the splash screen should remain visible until the fonts are fully loaded. After the fonts are loaded, the splash screen should hide, and the app should display the content with the custom fonts applied.

Actual Behavior: The error TypeError: _ExpoFontLoader.default.getLoadedFonts is not a function (it is undefined) occurs when attempting to load custom fonts. This error indicates that the getLoadedFonts method is being called, but it is undefined, suggesting an issue with how fonts are being loaded or managed within the expo-font library. The app might fail to load fonts properly or crash unexpectedly. The issue appears to be happening on both iOS and Android platforms (if using Expo).

Affected Platforms: iOS, Android

Environment

expo-env-info 1.2.1 environment info:
    System:
      OS: Windows 10 10.0.19045
    Binaries:
      Node: 22.11.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      expo: ^52.0.0 => 52.0.6
      react: 18.3.1 => 18.3.1
      react-native: 0.76.1 => 0.76.1
    Expo Workflow: managed

Expo Doctor Diagnostics

Enabled experimental React Native Directory checks. Unset the EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK environment variable to disable this check.
✔ Check package.json for common issues
✔ Check Expo config for common issues
✔ Check native tooling versions
✔ Check if the project meets version requirements for submission to app stores
✔ Check for common project setup issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for app config fields that may not be synced in a non-CNG project
✔ Check for issues with Metro config
✔ Check npm/ yarn versions
✔ Validate packages against React Native Directory package metadata
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

Metadata

Assignees

No one assigned

    Labels

    needs reviewIssue is ready to be reviewed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions