google-signin: Getting Cannot find type 'ExpoAppDelegateSubscriber' in scope after upgrade v7.2.0

Expected Behavior

It was working fine in version 7.1.0 and after the upgrade Getting an error while ios build. Cannot find type 'ExpoAppDelegateSubscriber' in scope

I am using google-signin only for Android and don’t want to link for ios. So, I included google-signin in react-native.config.js. But still not able to build after an upgrade.

module.exports = {
  dependencies: {
    '@react-native-google-signin/google-signin': {
      platforms: {
        ios: null,
      },
    },
  },
};

Screenshot 2022-03-15 at 8 21 11 AM

Environment

Please provide

  • react-native version: 0.67.3
  • @react-native-google-signin/google-signin version: “^7.2.1”,
  • your Podfile, output of running pod install and cocoapods version (if applicable): 1.11.2
  • version of Android, gradle, android plugin for gradle, play-services-auth and version of the Google Play Services app on your phone (if applicable)
  • version of iOS (if applicable)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 19 (1 by maintainers)

Most upvoted comments

Hi @saravanakumargn, could you run yarn why expo-modules-core and post the output here? I guess you have the old version of Expo SDK that doesn’t have the ExpoAppDelegateSubscriber class 🤔

i found better solution while working with bare expo workflow, disable autolinking adding the following to your package.json

"expo": {
    "autolinking": {
      "exclude": [
        "@react-native-google-signin/google-signin"
      ]
    }
  },

expo-modules-core should never be installed directly in the app’s project

Yes, of course. But if he doesn’t want to upgrade all modules, just pin the version of expo-modules-core to at least 0.5.0 to fix the issue. I have checked the CHANGELOG of the expo-modules-core and there is no breaking change, So I think its safe for workaround temporarily. Until he is ready to upgrade. 😉

  "resolutions": {
    "expo-modules-core": "^0.5.0"
  }

Oh wow, 0.4.10 is definitely too old. ExpoAppDelegateSubscriber is available as of SDK44, so I would recommend upgrading to this version.

@giautm: Or just installing the latest version of expo-modules-core will resolve your issue.

expo-modules-core should never be installed directly in the app’s project. It’s intended to be the transitive dependency for apps and devDependency for modules using it. Its version should be in expo package hands 😉

Hi @saravanakumargn, could you run yarn why expo-modules-core and post the output here? I guess you have the old version of Expo SDK that doesn’t have the ExpoAppDelegateSubscriber class 🤔

npx npm-why expo-modules-core

npx: installed 149 in 19.953s

  Who required expo-modules-core:

  my-apps > expo > expo-constants > expo-modules-core@0.4.10
  my-apps > expo > expo-file-system > expo-modules-core@0.4.10
  my-apps > expo > expo-modules-core@0.4.10

expo packages

    "expo": ">=43.0.0-* <44.0.0",
    "expo-calendar": "^10.1.1",
    "expo-constants": "^13.0.2",
    "expo-contacts": "^10.1.1",
    "expo-permissions": "^13.1.1",
    "expo-print": "^11.1.1",
    "expo-sharing": "^10.1.1",
    "expo-web-browser": "^10.1.1",

Sorry about this issue, It can be resolved by installing expo-modules-core in your project.

We will discuss internally for the plugin support without breaking anyone don’t use Expo.

Hello and thanks for reporting, please use 7.1.0 for now and we’ll attempt to fix this or revert the expo support until a better approach is available.