expo-updates breaking iOS build on SDK 44 with Yarn 2

Please provide the following:

  1. SDK Version: 44
  2. Platforms(Android/iOS/web/all): iOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Issue

Installing expo-updates and expo-app-loading with Yarn 2 in a bare workflow project breaks the iOS build. I believe this to be another issue related to which versions of which libraries get installed directly under node_modules. This is the other issue of this nature that I have raised

The build breaks with

› Compiling expo-updates Pods/EXUpdates » ExpoUpdatesReactDelegateHandler.swift

❌  (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:39:24)

  37 |   }()
  38 | 
> 39 |   public override func createBridge(reactDelegate: ExpoReactDelegate, bridgeDelegate: RCTBridgeDelegate, launchOptions: [AnyHashable : Any]?) -> RCTBridge? {
     |                        ^ method does not override any method from its superclass
  40 |     if (!shouldEnableAutoSetup) {
  41 |       return nil
  42 |     }


❌  (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:59:24)

  57 |   }
  58 | 
> 59 |   public override func createRootView(reactDelegate: ExpoReactDelegate, bridge: RCTBridge, moduleName: String, initialProperties: [AnyHashable : Any]?) -> RCTRootView? {
     |                        ^ method does not override any method from its superclass
  60 |     if (!shouldEnableAutoSetup) {
  61 |       return nil
  62 |     }


❌  (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:5:14)

  3 | import ExpoModulesCore
  4 | 
> 5 | public class ExpoUpdatesReactDelegateHandler: ExpoReactDelegateHandler, EXUpdatesAppControllerDelegate, RCTBridgeDelegate {
    |              ^ cannot inherit from class 'ExpoReactDelegateHandler' because it has overridable members that could not be loaded
  6 |   private weak var reactDelegate: ExpoReactDelegate?
  7 |   private var bridgeDelegate: RCTBridgeDelegate?
  8 |   private var launchOptions: [AnyHashable : Any]?

Steps to reproduce

expo init expo-test -t bare-minimum
cd expo-test
yarn set version berry # Migrate to Yarn 2
yarn install
expo install expo-app-loading expo-updates
npx pod-install
yarn ios # Broken

Cause

I believe having both expo-app-loading and expo-updates installed tips the scales and forces expo-modules-auotlinking 0.4.0 to be installed at the top level of node_modules instead of expo-modules-autolinking 0.5.1.

Before running expo install expo-app-loading expo-updatesnode_modules/expo-modules-autolinking 0.5.1 is present (the version required by Expo) but after running the command it swaps to be 0.4.0 and 0.5.1 is moved to node_modules/expo/node_modules/.

Edit:
I have tried using resolutions in package.json to try and put 0.5.1 directly under node_modules and this doesn’t resolve the problem. No idea what the true cause is.

same issue for me, any idea?

› Compiling expo-updates Pods/EXUpdates » ExpoUpdatesReactDelegateHandler.swift

❌  (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:39:24)

  37 |   }()
  38 | 
> 39 |   public override func createBridge(reactDelegate: ExpoReactDelegate, bridgeDelegate: RCTBridgeDelegate, launchOptions: [AnyHashable : Any]?) -> RCTBridge? {
     |                        ^ method does not override any method from its superclass
  40 |     if (!shouldEnableAutoSetup) {
  41 |       return nil
  42 |     }

❌  (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:59:24)

  57 |   }
  58 | 
> 59 |   public override func createRootView(reactDelegate: ExpoReactDelegate, bridge: RCTBridge, moduleName: String, initialProperties: [AnyHashable : Any]?) -> RCTRootView? {
     |                        ^ method does not override any method from its superclass
  60 |     if (!shouldEnableAutoSetup) {
  61 |       return nil
  62 |     }

❌  (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesReactDelegateHandler.swift:5:14)

  3 | import ExpoModulesCore
  4 | 
> 5 | public class ExpoUpdatesReactDelegateHandler: ExpoReactDelegateHandler, EXUpdatesAppControllerDelegate, RCTBridgeDelegate {
    |              ^ cannot inherit from class 'ExpoReactDelegateHandler' because it has overridable members that could not be loaded
  6 |   private weak var reactDelegate: ExpoReactDelegate?
  7 |   private var bridgeDelegate: RCTBridgeDelegate?
  8 |   private var launchOptions: [AnyHashable : Any]?
▸ ** ARCHIVE FAILED **

1 Like

Running into similar but slightly different issues as well also using Yarn v2.

1 Like

Yeah this one is a pain. Even my workarounds using resolutions in package.json to force expo-modules-autolinking 0.5.1 to live directly under node_modules don’t work this time. It feels like a race condition.

The build in Xcode throws exactly the same error… but there doesn’t seem to be any good reason why ExpoReactDelegateHandler can’t be inherited from.

hi there! we’ve published new expo-splash-screen to deal with the issue. please try again after updating the latest expo-splash-screen. from a new init project, we included the update already and i can confirm it work. thanks for reporting this issue to us with the super helpful root cause analysis. if you still encounter the problem, please let us know.

Thank you for this fix @kudochien, can confirm this fixes the iOS issue on Expo 43 and Expo 44 projects :slight_smile:

I’m still encountering the Android build issue on Expo 43, but my workaround still works.

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