expo / google-fonts

Use any of the 1000+ fonts (and their variants) from fonts.google.com in your Expo app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Font fails MD5 integrity check

tomrom-pomelo opened this issue · 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?

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'),
  });
  // ...
}