google-fonts icon indicating copy to clipboard operation
google-fonts copied to clipboard

Font fails MD5 integrity check

Open tomrom-pomelo opened this issue 2 years ago • 1 comments

Hi there, not sure which community to post this issue in, but we are repeatedly seeing an issue with expo cli 5.4.2, expo 45.0.5, expo-font 10.1.0 and @expo-google-fonts/poppins 0.2.2 . related to loading a font. When running

import { Poppins_400Regular, Poppins_600SemiBold, useFonts } from '@expo-google-fonts/poppins';

export default function useCachedResources() {
  let [fontsLoaded, error] = useFonts({
    poppins: Poppins_400Regular,
    'poppins-semibold': Poppins_600SemiBold,
  });
  // ...
}

on Android emulator with expo go, we keep getting

failed MD5 integrity check

This only happens on Android and iOS works fine. We've followed a lot of different forum threads and gh issues, purged package-lock.json, cleared metro cache, upgraded libraries, but are still hitting this.

Has anyone encountered this recently that would be able to help?

tomrom-pomelo avatar Jun 10 '22 18:06 tomrom-pomelo

FWIW we fixed this by downloading the fonts directly and loading them like

import { useFonts } from 'expo-font';

export default function useCachedResources() {
  let [fontsLoaded, error] = useFonts({
    poppins: require('../assets/fonts/Poppins-Regular.ttf'),
    'poppins-semibold': require('../assets/fonts/Poppins-SemiBold.ttf'),
  });
  // ...
}

tomrom-pomelo avatar Jun 10 '22 22:06 tomrom-pomelo