expo / vector-icons

https://icons.expo.fyi
MIT License
647 stars 114 forks source link

"Possible Unhandled Promise Rejection" warned by @expo/vector-icons component #290

Open ESKempken opened 4 months ago

ESKempken commented 4 months ago

@expo/vector-icons components fail to render icon and throw warning on Android with Expo Go.

Warning

Possible Unhandled Promise Rejection (id: 3):
Error: Module "14" is missing from the asset registry
Error: Module "14" is missing from the asset registry

Usage

import { Ionicons } from '@expo/vector-icons'

...

    <Ionicons
      name="repeat"
      size={26}
    />

Package.json

 "dependencies": {
    "@expo/vector-icons": "^14.0.0",
    "@expo/webpack-config": "~19.0.1",
    "@react-navigation/native": "^6.1.10",
    "@react-navigation/native-stack": "^6.9.18",
    "@rneui/base": "^4.0.0-rc.8",
    "@rneui/themed": "^4.0.0-rc.8",
    "eas-cli": "^5.0.2",
    "expo": "^50.0.6",
    "expo-constants": "~14.4.2",
    "expo-dev-client": "~2.4.8",
    "expo-device": "~5.4.0",
    "expo-notifications": "~0.20.1",
    "expo-splash-screen": "~0.20.5",
    "expo-status-bar": "~1.6.0",
    "expo-updates": "~0.18.12",
    "lodash": "^4.17.21",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.72.4",
    "react-native-gesture-handler": "~2.14.0",
    "react-native-reanimated": "~3.3.0",
    "react-native-safe-area-context": "4.6.3",
    "react-native-screens": "~3.22.0",
    "react-native-ui-lib": "^7.16.0",
    "react-native-web": "~0.19.6"
  },
digvalley commented 4 months ago

Same issue

victorlucss commented 4 months ago

I'm facing the same issue, and the icons are not showing up on iOS.

digvalley commented 4 months ago

npx expo install --fix solved this for me

victorlucss commented 4 months ago

I found a solution that worked for me: I installed expo-asset as a dev dependency cause it was failing in fastlane pipeline. I also changed from pnpm back to yarn (deleting the pnpm lock) and it started working (https://github.com/expo/expo/issues/26606)

sahilverma-dev commented 2 months ago

I've same issue icons are not visible and @victorlucss's solution doesn't work for me

joeyhuaa commented 1 month ago

I've same issue icons are not visible and @victorlucss's solution doesn't work for me

same here... just updated to Expo 50 and @expo/vector-icons are NOT showing up on Android (although they do show up on iOS)

sahilverma-dev commented 1 month ago

I've same issue icons are not visible and @victorlucss's solution doesn't work for me

same here... just updated to Expo 50 and @expo/vector-icons are NOT showing up on Android (although they do show up on iOS)

I was using development and when I cleared node modules and android folder and reinstalled it was working.

joeyhuaa commented 1 month ago

I've same issue icons are not visible and @victorlucss's solution doesn't work for me

same here... just updated to Expo 50 and @expo/vector-icons are NOT showing up on Android (although they do show up on iOS)

I was using development and when I cleared node modules and android folder and reinstalled it was working.

Did you run expo prebuild to regenerate the android folder? Because I've reinstalled node modules countless times and i also deleted android folder and still icons do not show up.

sahilverma-dev commented 1 month ago

I've same issue icons are not visible and @victorlucss's solution doesn't work for me

same here... just updated to Expo 50 and @expo/vector-icons are NOT showing up on Android (although they do show up on iOS)

I was using development and when I cleared node modules and android folder and reinstalled it was working.

Did you run expo prebuild to regenerate the android folder? Because I've reinstalled node modules countless times and i also deleted android folder and still icons do not show up.

Yes I deleted the android folder and rebuild it and used development build on my physical device with usb.

agrittiwari commented 3 weeks ago
 WARN  Possible Unhandled Promise Rejection (id: 9):
Error: Module "3" is missing from the asset registry
 WARN  Possible Unhandled Promise Rejection (id: 10):
Error: Module "4" is missing from the asset registry

I am also facing the same issue on iOS, icons are simply not laoding. Just updated my vector Icons package and performed the above mentioned solutions. Nothing works though.

agrittiwari commented 3 weeks ago

So I just updated the vector Icons package, added @react-nativeasset-registry: 0.74.83 to resolution, removed node_modules, removed app, rebuild everything with bun and it worked. been stuck at it for a month.