skip to Main Content

I am migrating my managed Expo React Native project to the EAS build ecosystem and am getting a strange error that I dont see anywhere else when googling around.

The following error happens while running the Fastlane part of the build:

❌  (node_modules/expo-modules-core/ios/JSI/ExpoModulesProxySpec.mm:12:118)

10 | using PromiseInvocationBlock = void (^)(RCTPromiseResolveBlock resolveWrapper, RCTPromiseRejectBlock rejectWrapper);
11 | 
> 12 | static void callPromiseSetupWithBlock(jsi::Runtime &runtime, std::shared_ptr<CallInvoker> jsInvoker, std::shared_ptr<Promise> promise, PromiseInvocationBlock setupBlock)
    |                                                                                                                      ^ use of undeclared identifier 'Promise'
13 | {
14 |   auto weakResolveWrapper = CallbackWrapper::createWeak(promise->resolve_.getFunction(runtime), runtime, jsInvoker);
15 |   auto weakRejectWrapper = CallbackWrapper::createWeak(promise->reject_.getFunction(runtime), runtime, jsInvoker);
2543

❌  (node_modules/expo-modules-core/ios/JSI/ExpoModulesProxySpec.mm:14:29)

12 | static void callPromiseSetupWithBlock(jsi::Runtime &runtime, std::shared_ptr<CallInvoker> jsInvoker, std::shared_ptr<Promise> promise, PromiseInvocationBlock setupBlock)
13 | {
> 14 |   auto weakResolveWrapper = CallbackWrapper::createWeak(promise->resolve_.getFunction(runtime), runtime, jsInvoker);
    |                             ^ incomplete type 'facebook::react::CallbackWrapper' named in nested name specifier
15 |   auto weakRejectWrapper = CallbackWrapper::createWeak(promise->reject_.getFunction(runtime), runtime, jsInvoker);
16 | 
17 |   __block BOOL resolveWasCalled = NO;
2544

❌  (node_modules/expo-modules-core/ios/JSI/ExpoModulesProxySpec.mm:15:28)

13 | {
14 |   auto weakResolveWrapper = CallbackWrapper::createWeak(promise->resolve_.getFunction(runtime), runtime, jsInvoker);
> 15 |   auto weakRejectWrapper = CallbackWrapper::createWeak(promise->reject_.getFunction(runtime), runtime, jsInvoker);
    |                            ^ incomplete type 'facebook::react::CallbackWrapper' named in nested name specifier
16 | 
17 |   __block BOOL resolveWasCalled = NO;
18 |   __block BOOL rejectWasCalled = NO;
2545

❌  (node_modules/expo-modules-core/ios/JSI/ExpoModulesProxySpec.mm:95:91)

93 | 
94 |   // The function that is invoked as a setup of the JS `Promise`.
> 95 |   auto promiseSetupFunc = [expoModulesProxy, args](jsi::Runtime &runtime, std::shared_ptr<Promise> promise) {
    |                                                                                           ^ use of undeclared identifier 'Promise'
96 |     callPromiseSetupWithBlock(runtime, expoModulesProxy->jsInvoker_, promise, ^(RCTPromiseResolveBlock resolver, RCTPromiseRejectBlock rejecter) {
97 |       NSString *moduleName = convertJSIStringToNSString(runtime, args[0].getString(runtime));
98 |       NSString *methodName = convertJSIStringToNSString(runtime, args[1].getString(runtime));
2546

❌  error: 

As you can see it is telling me Promise is undefined. The call stack looks like its trying to load promises while it breaks, but I’m not too sure.

Here is my package.json:

{
"scripts": {
  "start": "expo start --dev-client",
  "android": "expo run:android",
  "ios": "expo run:ios",
  "web": "expo start --web",
  "eject": "expo eject",
  "test": "jest"
},
"dependencies": {
  "@expo/config-plugins": "^5.0.1",
  "@expo/match-media": "0.3.0",
  "@expo/webpack-config": "^0.17.0",
  "@react-native-async-storage/async-storage": "~1.17.3",
  "@react-native-community/datetimepicker": "6.3.2",
  "@react-native-community/viewpager": "5.0.11",
  "@react-native-firebase/app": "^15.4.0",
  "@react-native-picker/picker": "2.4.4",
  "@react-navigation/bottom-tabs": "^6.1.0",
  "@react-navigation/drawer": "^6.4.2",
  "@react-navigation/native": "^6.0.10",
  "@react-navigation/stack": "^6.2.1",
  "@stripe/react-stripe-js": "^1.10.0",
  "@stripe/stripe-js": "^1.35.0",
  "@stripe/stripe-react-native": "0.18.1",
  "eas-cli": "^2.1.0",
  "expo": "~46.0.9",
  "expo-auth-session": "~3.7.1",
  "expo-av": "~12.0.4",
  "expo-calendar": "~10.3.0",
  "expo-checkbox": "~2.2.0",
  "expo-dev-client": "~1.2.1",
  "expo-device": "~4.3.0",
  "expo-facebook": "~12.2.0",
  "expo-google-sign-in": "~11.0.0",
  "expo-image-manipulator": "~10.4.0",
  "expo-image-picker": "~13.3.1",
  "expo-linear-gradient": "~11.4.0",
  "expo-modules-autolinking": "^0.10.3",
  "expo-notifications": "~0.16.1",
  "expo-random": "~12.3.0",
  "expo-screen-orientation": "~4.3.0",
  "expo-splash-screen": "~0.16.2",
  "expo-status-bar": "~1.4.0",
  "expo-updates": "~0.14.5",
  "express": "^4.17.1",
  "firebase": "^9.6.7",
  "firebase-functions": "^3.13.1",
  "google-map-react": "^2.1.10",
  "google-maps-react": "^2.0.6",
  "idb": "^7.0.1",
  "modal-enhanced-react-native-web": "^0.2.0",
  "modal-react-native-web": "^0.2.0",
  "ngeohash": "^0.6.3",
  "react": "18.0.0",
  "react-calendar": "^3.1.0",
  "react-collapsible": "^2.10.0",
  "react-dom": "18.1.0",
  "react-dropdown": "^1.10.0",
  "react-google-autocomplete": "^2.6.1",
  "react-helmet": "^6.1.0",
  "react-native": "0.69.1",
  "react-native-anchor-point": "^1.0.1",
  "react-native-calendar-strip": "^2.0.9",
  "react-native-calendars": "^1.1285.0",
  "react-native-collapsible": "^1.6.0",
  "react-native-date-picker": "^4.2.1",
  "react-native-dropdown-picker": "^5.4.2",
  "react-native-elements": "^3.0.0-alpha.1",
  "react-native-gesture-handler": "~2.6.0",
  "react-native-gifted-chat": "^1.0.4",
  "react-native-google-places-autocomplete": "^2.4.1",
  "react-native-keyboard-aware-scroll-view": "^0.9.5",
  "react-native-maps": "1.3.1",
  "react-native-material-ripple": "^0.9.1",
  "react-native-modal": "^13.0.1",
  "react-native-paypal": "^4.1.0",
  "react-native-ratings": "^8.0.3",
  "react-native-read-more-text": "^1.1.2",
  "react-native-reanimated": "^2.2.1",
  "react-native-render-html": "^6.3.4",
  "react-native-responsive-ui": "^2.1.1",
  "react-native-screens": "~3.17.0",
  "react-native-svg": "13.1.0",
  "react-native-uuid": "^2.0.1",
  "react-native-video": "^5.2.0",
  "react-native-web": "~0.18.7",
  "react-native-web-hover": "^0.2.9",
  "react-native-web-maps": "^0.3.0",
  "react-native-webview": "11.23.1",
  "react-number-format": "^4.4.1",
  "react-paypal-button-v2": "^2.6.2",
  "react-pro-sidebar": "^0.7.1",
  "react-responsive": "^8.1.0",
  "react-ripples": "^2.2.1",
  "react-select": "^5.4.0",
  "react-time-picker": "^4.5.0",
  "save": "^2.4.0",
  "expo-build-properties": "~0.3.0"
},
"devDependencies": {
  "@babel/cli": "^7.12.10",
  "@babel/core": "^7.18.6",
  "babel-preset-expo": "~9.2.0",
  "jest": "^29.0.3",
  "typescript": "^4.6.3"
},
"private": true,
"name": "React",
"version": "1.0.0"
}

The cocoapods seem to install successfully.
Anyone know whats causing this error?

2

Answers


  1. Chosen as BEST ANSWER

    I was able to fix this issue by removing @react-native-firebase/app from the plugins section in my apps.json file and changing the useFrameworks flag to static:

    "plugins": [
      "@react-native-firebase/app", //remove this
      [
        "expo-build-properties",
          {
            "ios": {
               "useFrameworks": "static"
             }
          }
       ]
    ]
    

  2. yarn add expo-modules-core from this comment helped

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search