iOS Store Submit fails due to ITMS-90562: Invalid Bundle

I have succesfully built and uploaded to Android Play Store and the app is approved and live. Same code base it’s not getting submitted to iOS. The one native module I use is react-native-mlkit-ocr. It builds custom dev client, for android store perfectly fine, without a config plugin.

Did anyone get this error when doing eas submit after doing eas build -p ios ?

ITMS-90562: Invalid Bundle - The app cannot be processed because options not allowed to be embedded in bitcode are detected in the submission. It is likely that you are not building the app with the toolchain provided in Xcode. Rebuild your entire app with the latest GM Xcode and submit the app again. 

Something interesting was when build was ready the URL it gave had “undefined” in it - https://appstoreconnect.apple.com/apps/undefined/appstore/ios

I have also tried by adding “image” latest to my eas config, as some other topics here said, but it didn’t work:

{
  "build": {
    "release": {
      "ios": {
        "image": "latest"
      }
    },
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    }
  }
}

And my app.json:

{
  "expo": {
    "name": "Quizleter",
    "slug": "quizleter",
    "version": "22.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "androidStatusBar": {
      "barStyle": "light-content",
      "translucent": true,
      "backgroundColor": "#0000008C"
    },
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#401455"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "org.reactjs.native.quizleter",
      "buildNumber": "22.0.0",
      "infoPlist": {
        "UIStatusBarStyle": "UIStatusBarStyleLightContent",
        "NSCameraUsageDescription": "To take a photo of a question to search for it without typing."
      }
    },
    "backgroundColor": "#401455",
    "primaryColor": "#401455",
    "android": {
      "package": "com.quizleter",
      "versionCode": 22,
      "adaptiveIcon": {
        "foregroundImage": "./assets/icon.png",
        "backgroundColor": "#401455"
      },
      "permissions": ["CAMERA"]
    },
    "web": {
      "favicon": "./assets/favicon.png",
      "themeColor": "#ffffff"
    },
    "plugins": ["sentry-expo"],
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "organization": "deeds",
            "project": "quizleter-mobile",
            "authToken": "REMOVED"
          }
        }
      ]
    }
  }
}

And my package.json:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@expo-google-fonts/pridi": "^0.2.0",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/native-stack": "^6.1.0",
    "expo": "~42.0.1",
    "expo-app-loading": "^1.1.2",
    "expo-application": "~3.2.0",
    "expo-asset": "~8.3.3",
    "expo-camera": "~11.2.2",
    "expo-constants": "~11.0.1",
    "expo-dev-client": "^0.4.7",
    "expo-device": "~3.3.0",
    "expo-font": "~9.2.1",
    "expo-gl": "~10.4.2",
    "expo-image-manipulator": "~9.2.2",
    "expo-intent-launcher": "~9.1.0",
    "expo-localization": "~10.2.0",
    "expo-status-bar": "~1.0.4",
    "expo-updates": "~0.8.2",
    "fuse.js": "^6.4.6",
    "jsdom-jscore-rn": "^0.1.8",
    "lodash": "^4.17.21",
    "lottie-react-native": "4.0.2",
    "moment": "^2.29.1",
    "moti": "^0.11.0",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-mlkit-ocr": "^0.2.2",
    "react-native-reanimated": "~2.2.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.4.0",
    "react-native-web": "~0.13.12",
    "recyclerlistview": "^3.0.5",
    "sentry-expo": "^4.0.0",
    "urijs": "^1.19.7",
    "uuid": "^8.3.2"
  },
  "devDependencies": {
    "@babel/core": "^7.9.0",
    "@types/lodash": "^4.14.172",
    "@types/react": "~16.9.35",
    "@types/react-native": "~0.63.2",
    "typescript": "~4.0.0"
  },
  "private": true
}
1 Like

Gentle bump here folks. I still can’t figure it out.

I had run expo prebuild but then I undid it, I never committed it.

the undefined issue is fixed here: [ENG-755] drop support for `eas submit` CLI configuration params by dsokal · Pull Request #590 · expo/eas-cli · GitHub

Not sure about the error from Apple though, but unlikely that it’s due to EAS Build (more likely it has to do with the new library or some configuration problem with it)

1 Like

Ah thank you for the reply. I’m totally stumped :frowning: I’m not sure why custom client builds and then when building for store it’s not going through. :frowning: It built fine and shipped to android store.

The custom module I’m using is this one - GitHub - agoldis/react-native-mlkit-ocr: Google on-device MLKit Text Recognition for React Native - may I get some help from someone identifying if it need’s custom config? I can write a tutorial to share with others after I learn to identify if custom config needed.

I looked through the logs from your last build and I saw dev client logic included there, can you try removing dev client, running release build and submitting that?

EDIT: After talking with someone working on dev client, it seems that it’s expected that those file will be compiled even for release builds but they shouldn’t be included, but either way It’s still worth to check that just in case, you might also try expo upgrade to make sure you are using correct package versions for the sdk

1 Like

Thanks so way much for taking a deep look! I was totally stumped. I will try this out and share back what happens!

I have the same issue (and use the same react-native-mlkit-ocr module). I tried removing dev client from my package.json and expo upgrade but neither worked. I submitted my app to the app store using Transporter, but will try eas submit now (although I’m not hopeful that’ll make a difference).

One thing is when I run eas build I see this warning:

ios: mods.ios.infoPlist: Failed to find Info.plist linked to Xcode project.

Could this be anything? App runs perfectly fine for internal distribution using expo-dev-client.

Thanks!

1 Like

Just finished trying eas submit. Still seeing the same error :frowning_face:

1 Like

don’t worry about the warning, that is just the result of some harmless logs leaking through when they should be silenced. will be resolved in an upcoming release.

i’m not sure what is causing this particular warning, this could be related to mlkit (it looks like it’s not pinned to any specific version in react-native-mlkit-ocr - so maybe it’s pulling in a version that is incompatible with xcode 12.5 and requires xcode 13 now). you could try using patch-package to pin the version in the podspec to a version that was around when this wrapper package was last published. for example: pod 'GoogleMLKit/TextRecognition','2.2.0'. see the release notes here: এমএল কিট রিলিজ নোট  |  ML Kit  |  Google Developers

alternatively, you could try disabling bitcode. you’ll need to write a config plugin to do that. but you probably don’t want to disable bitcode.

1 Like

Thank you Brent! That did the trick for me and it’s working on TestFlight now.

FYI as part of that fix, I also had to invalidate the cache in my eas.json to get eas build working after the pinned the MLKit version.

2 Likes

For anyone who stumbles upon this in the future, here’s what I did step by step:

  • Get set up with patch-package
  • Edit node_modeules/react-native-mlkit-ocr/react-native-mlkit-ocr.podspec:
    • Specifically, edit s.dependency "GoogleMLKit/TextRecognition" to s.dependency "GoogleMLKit/TextRecognition", "2.2.0"
  • Run yarn patch-package react-native-mlkit-ocr (or npx patch-package react-native-mlkit-ocr)
  • Edit my eas.json to have build.release.cache.key = "clear" (This might be unnecessary for others, but resolved an eas build issue for me; also “clear” is arbitrary, the key can be any non-empty string)
  • Ran eas build and eas submit successfully!
1 Like

Thanks @lakshayakula that’s so cool you use this package too!

Thanks Brent, is the steps Lakshaykula took look right? I havent written a config before, is it possible to show example using Lakshaykula’s work? Thanks and sorry to ask so much detail.

Yes, @lakshayakula’s instructions look right to me. I believe you’ll need to commit the patch etc.

1 Like

Thanks wodin! Is this process what is known as a config? Sorry for the so many questions

I’m not quite sure what you mean by “a config”. This is not a “Config Plugin” if that’s what you mean, but the concept is similar.

Basically, patch-package is a way to make changes to a dependency before it is used during the build process. i.e. the changes are made in node_modules.

Config plugins are for making changes to native code files under the android and/or ios directories.

1 Like

Ahh I got it. Thanks learning a ton from you.

1 Like

an aside - it may be worth opening a pr to react-native-mlkit-ocr to pin the mlkit version.

also, you can run eas build --clear-cache to avoid having to set a cache key

2 Likes

Confirming! The patch-package way worked!! Thanks all and majorly @lakshayakula for such detailed steps I could never have figured that out!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.