Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ESKempken opened this issue Feb 15, 2024 · 12 comments

Comments

@ESKempken
Copy link

ESKempken commented Feb 15, 2024

@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"
  },
@ESKempken ESKempken changed the title Possible Unhandled Promise Rejection "Possible Unhandled Promise Rejection" warned by @expo/vector-icons component Feb 15, 2024
@digvalley
Copy link

Same issue

@victorlucss
Copy link

victorlucss commented Feb 18, 2024

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

@digvalley
Copy link

npx expo install --fix solved this for me

@victorlucss
Copy link

victorlucss commented Feb 21, 2024

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 (expo/expo#26606)

@sahilverma-dev
Copy link

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

@joeyhuaa
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

 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
Copy link

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.

@VijayPDev
Copy link

VijayPDev commented Sep 2, 2024

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.

Was struggling for three days on this, when suddenly my icons stopped appearing and was getting this warning. After trying multiple things for three days, this helped me. The version that was failing for me was @react-nativeasset-registry: 0.75.2. Setting the below and re-building worked for me.

"resolutions": { "@react-native/assets-registry": "0.74.84" }, "overrides": { "@react-native/[email protected]": "@react-native/[email protected]", "@react-native/[email protected]": "@react-native/[email protected]" },

Thank you very much @agrittiwari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants