eas build --platform ios fails in fastlane

I use bare workflow with eas-cli version 0.43.0.

expo run:ios works fine locally.

When running eas build --platform ios it fails on the step Run fastlane with the following logs:

Resolving Swift Package Manager dependencies...
$ xcodebuild -resolvePackageDependencies -workspace ./Smarto.xcworkspace -scheme Smarto -configuration Release
▸ Command line invocation:
▸     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./Smarto.xcworkspace -scheme Smarto -configuration Release
▸ User defaults from command line:
▸     IDEPackageSupportUseBuiltinSCM = YES
▸ Resolve Package Graph
▸ Fetching from https://github.com/tink-ab/tink-link-ios
▸ Fetching from https://github.com/johnxnguyen/Down
▸ Fetching from https://github.com/tink-ab/tink-core-ios
▸ Cloning local copy of package ‘tink-link-ios’
▸ Checking out 1.4.1 of package ‘tink-link-ios’
▸ Cloning local copy of package ‘tink-core-ios’
▸ Checking out 1.5.4 of package ‘tink-core-ios’
▸ Cloning local copy of package ‘Down’
▸ Checking out 0.11.0 of package ‘Down’
▸ Resolved source packages:
▸   TinkLink: https://github.com/tink-ab/tink-link-ios @ 1.4.1
▸   TinkCore: https://github.com/tink-ab/tink-core-ios @ 1.5.4
▸   Down: https://github.com/johnxnguyen/Down @ 0.11.0
....
...
 Compiling @sentry/react-native Pods/Sentry » NSData+SentryCompression.m
› Compiling @sentry/react-native Pods/Sentry » NSData+Sentry.m
› Compiling @sentry/react-native Pods/Sentry » NSArray+SentrySanitize.m
› Compiling @sentry/react-native Pods/Sentry » Container+SentryDeepSearch.m

❌  (../../Library/Developer/Xcode/DerivedData/Smarto-agolblfzguleygatquekdjgvrydq/SourcePackages/checkouts/tink-link-ios/Sources/TinkLink/Extensions/Error+TinkLinkError.swift:2:8)

  1 | import Foundation
> 2 | import TinkCore
    |        ^ no such module 'TinkCore'
  3 | 
  4 | extension Swift.Error {
  5 |     var tinkLinkError: Swift.Error {
› Creating  TinkLink/TinkLink_TinkLinkUI » TinkLink_TinkLinkUI.bundle
› Compiling react-native Pods/React-perflogger » React-perflogger-dummy.m
› Compiling react-native Pods/React-perflogger » BridgeNativeModulePerfLogger.cpp
› Compiling react-native Pods/React-perflogger » React-perflogger-dummy.m
....
› Packaging react-native Pods/React-jsinspector » libReact-jsinspector.a
› Compiling expo-updates-interface Pods/EXUpdatesInterface » EXUpdatesInterface-dummy.m
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ 	CompileSwift normal arm64 (in target 'TinkLink' from project 'TinkLink')
▸ 	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'TinkLink' from project 'TinkLink')
▸ (2 failures)
** ARCHIVE FAILED **
...

I use bare workflow because I need to use these iOS packages TinkLink and TinkCore. I don’t understand the error no such module 'TinkCore' while the package was installed (logs above) and the app works fine on locally.

I tried upgrading eas-cli from 0.41 to 0.43 but it didn’t help. I also tried to put “image”: “latest” in eas.json but it didn’t work: Error: eas.json is not valid [ValidationError: "build.production.image" is not allowed]

can you share your eas.json? can you also try doing a release build locally with expo run? (expo run:ios --configuration Release

also re: image - you should put that under the ios or android field

1 Like

Actually, specifying cli verson 0.43.0 in eas.json worked (it was 0.39.0 before)! Issue closed :slight_smile:

{
  "cli": {
    "version": ">= 0.43.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal"
    },
    "production": {
      "env": {
        "BACKEND_DOMAIN": "backend.com"
      }
    }
  }
}
1 Like

In fact, it seems to work only sometimes… Like 2 times out of 10.
expo run:ios --configuration Release works fine locally.

I tried adding "ios": { "image": "latest" } under production - doesn’t help.

@notbrent

Successful build: Build Details — 87d518de-5cb8-420b-9806-76242023dda0 — smarto — Expo

Unsuccessful build: Build Details — 7c3fbcff-b2eb-4689-9c37-c60aa8e53278 — smarto — Expo

The logs are almost identical except the app version and there’s no error in the in first build…

Finally found the solution: eas build --platform ios --clear-cache
Just had to remove cache…

It worked twice in a row but then failed again with the same error. I don’t understand it…

Finally I uninstalled the package from Swift Package Manager and added it in Podfile. This fixes the problem.
The package is TinkLink.