"main" has not been registered" after sdk 38 upgrade (iOS only)

Please provide the following:

  1. SDK Version: 38
  2. Platforms(Android/iOS/web/all): iOS

Replace this section with as much relevant information as possible and any relevant code along with your question.

After running “expo start -c” the error shows up “main” has not been registered. This can happen if: …

When running expo start --no-dev --minify -c I get ‘Invariant Violation: Tried to register two views with the name name RNCSafeAreaView’

I updated to @3.0.6.

I downgraded back to ^1.0.2 and the same error above showed ^.

"@expo/vector-icons": "^10.2.0",
    "@react-native-community/async-storage": "^1.11.0",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/picker": "^1.6.5",
    "@react-navigation/drawer": "^5.8.4",
    "@react-navigation/native": "^5.6.1",
    "@react-navigation/stack": "^5.6.2",
    "@twotalltotems/react-native-otp-input": "^1.3.7",
    "axios": "^0.19.2",
    "card-validator": "^6.2.0",
    "country-code-info": "^0.3.0",
    "expo": "^38.0.3",
    "expo-asset": "^8.1.7",
    "expo-cellular": "^2.2.1",
    "expo-constants": "^9.1.1",
    "expo-facebook": "^8.2.1",
    "expo-firebase-recaptcha": "^1.1.2",
    "expo-font": "^8.2.1",
    "expo-google-app-auth": "^8.1.2",
    "expo-image-picker": "^8.3.0",
    "expo-linear-gradient": "^8.2.1",
    "expo-location": "^8.2.1",
    "expo-permissions": "^9.0.1",
    "expo-screen-orientation": "^1.1.1",
    "expo-sms": "^8.2.1",
    "expo-task-manager": "^8.3.0",
    "expo-updates": "^0.2.10",
    "firebase": "^7.15.5",
    "humanize-duration": "^3.23.1",
    "lottie-react-native": "^3.4.0",
    "luxon": "^1.24.1",
    "prop-types": "^15.7.2",
    "react": "16.13.1",
    "react-native": "0.62.2",
    "react-native-country-picker-modal": "^1.11.0",
    "react-native-dotenv": "^0.2.0",
    "react-native-flash-message": "^0.1.15",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-google-autocomplete": "^0.1.9",
    "react-native-image-progress": "^1.1.1",
    "react-native-lightbox": "^0.8.1",
    "react-native-maps": "^0.27.1",
    "react-native-maps-directions": "^1.8.0",
    "react-native-masked-text": "^1.13.0",
    "react-native-paper": "^3.10.1",
    "react-native-picker-select": "^7.0.0",
    "react-native-reanimated": "^1.9.0",
    "react-native-responsive-screen": "^1.4.1",
    "react-native-safe-area-context": "^3.0.6",
    "react-native-screens": "^2.9.0",
    "react-native-tab-view": "^2.14.4",
    "react-native-unimodules": "^0.10.1",
    "react-native-webview": "^10.3.1",
    "reanimated-bottom-sheet": "^1.0.0-alpha.20",
    "socket.io-client": "^2.3.0",
    "styled-components": "^5.1.1"
2 Likes

I had a similar issue too, in my case, the issue was that one module I implemented (react-native-material-dropdown) wasn’t compatible with react native 0.62.
I got the same ‘main’ has not been registered - error after upgrading to SDK 38, but I also got the error undefinded is not an object (evaluating ‘_reactNative.Animated.Text.propTypes.style’)
I further use react-native-safe-area-context at version 3.0.2 too, which doesn’t cause any errors in my case.

Maybe one of the modules used by you doesn’t work with rn 0.62.

I hope you get something out of that information.

Hmm, yea I can’t seem to find which one.

Gonna downgrade back for now and maybe try them one by one when I get some time idk

Yeah exact same problem as @kaspolar for me. @kaspolar do you know when they are trying to make react-native-material-dropdown compatible with sdk 38. If not then have you found an alternate package that does the same job?

Any alternate package you are using as replacement for react-native-material-dropdown? I have same issue. Rest all packages are fine and everything else works.

Hello @idrlmartian,
I used the workaround described in this medium-article: https://medium.com/swlh/how-to-add-a-dropdown-list-to-react-native-2441d6fe40c2. For this temporary solution you have to edit the node module, which is something I really don’t like to do, but it’s the only solution I found. I don’t know when they plan to fix this error, but I hope they do it asap. Furthermore I haven’t found any alternative dropdown-module featuring the material ui design.
Best regards
kaspolar

For the error “Invariant Violation: Tried to register two views with the name name RNCSafeAreaView”, running npm ddp solved it for me.

hey there! if you update to the latest version of the expo package this should be resolved: expo@38.0.8. it ensures that react-native-safe-area-context installed via expo install and the one installed as a dependency of expo are always the same

Someone recreated the issue here