Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS][Old Arch][Codegen] - Codegen breaks pod install #46862

Open
gladiuscode opened this issue Oct 7, 2024 · 12 comments
Open

[iOS][Old Arch][Codegen] - Codegen breaks pod install #46862

gladiuscode opened this issue Oct 7, 2024 · 12 comments

Comments

@gladiuscode
Copy link

gladiuscode commented Oct 7, 2024

Description

Hi everyone! 👋

We are currently upgrading our application from version .73.8 to .75.4 and we've noticed something weird.
With the new version, if we run pod install, now Codegen gets executed differently than before.

This would be fine if we actually enabled the new architecture, but we didn't and it breaks the pods install phase because some libraries are compatible with the new architecture but present issues in the Spec file that Codegen refers to.

So we can't install pods using the old architecture with libraries that present issues on Spec files because Codegen can't properly parse them (I guess)

I took the time to look into the changes between version .73.x and .75.x and I've noticed that this commit was included: Defragment Codegen in OSS between Old and New Architecture and it changes the following file: codegen.rb by removing the new_arch_enabled check in the run_codegen function.

Doing so means that if we run the same project on version .73 it works fine, but if we run it from version .74 onward it breaks on the old architecture with any library that has a Spec file that is broken

I don't have a complete overview of how Codegen gets executed, by I think that we should revert this check for the sake of any project that can't migrate right away due to lock-ins: may them be by libraries or vendor code such as third party sdks.

Steps to reproduce

  1. Init a new project with npx @react-native-community/cli@latest init RN75 --version 0.74 --pm npm;
  2. Install any library such as npm install --save-dev react-native-webview;
  3. Break the Spec file in any way, in our case we can break: react-native-webview's Spec file by adding a Tuple that isn't supported yet; (Example down below)
  4. Run pod install;
  5. See Codegen error;

Example:

// node_modules/react-native-webview/src/NativeRNCWebViewModule.ts

import type { TurboModule } from 'react-native';
import { TurboModuleRegistry } from 'react-native';
import { Double } from 'react-native/Libraries/Types/CodegenTypes';

export interface Spec extends TurboModule {
  isFileUploadSupported(): Promise<boolean>;
  shouldStartLoadWithLockIdentifier(
    shouldStart: boolean,
    lockIdentifier: [Double] // We change this type from Double to [Double]
  ): void;
}

export default TurboModuleRegistry.getEnforcing<Spec>('RNCWebViewModule');

React Native Version

0.74.0+

Affected Platforms

Build - MacOS

Output of npx react-native info

System:
  OS: macOS 14.6
  CPU: (8) arm64 Apple M3
  Memory: 108.92 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.8.0
    path: ~/.nvm/versions/node/v22.8.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v22.8.0/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v22.8.0/bin/npm
  Watchman:
    version: 2024.09.09.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/user/.gem/ruby/3.3.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2412.12266719
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 3.3.5
    path: /Users/user/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.5
    wanted: 0.74.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

info React Native v0.75.4 is now available (your project is running on v0.74.5).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.75.4
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.5
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Stacktrace or Logs

/Users/user/Documents/Projects/ReactNative/RN74/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/concern/deprecation.rb:1: warning: logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add logger to your Gemfile or gemspec to silence this warning.
/Users/user/Documents/Projects/ReactNative/RN74/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8.4/lib/active_support/core_ext/big_decimal.rb:3: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add bigdecimal to your Gemfile or gemspec to silence this warning.
/Users/user/Documents/Projects/ReactNative/RN74/vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8.4/lib/active_support/notifications.rb:4: warning: mutex_m was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add mutex_m to your Gemfile or gemspec to silence this warning.
(node:64099) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Auto-linking React Native module for target `RN74`: react-native-webview
Framework build type is static library
[Codegen] Adding script_phases to React-Codegen.
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json

[!] Invalid `Podfile` file: [!] /Users/user/.nvm/versions/node/v22.8.0/bin/node ./../node_modules/react-native/scripts/generate-codegen-artifacts.js -p /Users/user/Documents/Projects/ReactNative/RN74/ios/.. -o /Users/user/Documents/Projects/ReactNative/RN74/ios -t ios

[Codegen] Analyzing /Users/user/Documents/Projects/ReactNative/RN74/package.json
[Codegen] Searching for codegen-enabled libraries in the app.
[Codegen] The "codegenConfig" field is not defined in package.json. Assuming there is nothing to generate at the app level.
[Codegen] Searching for codegen-enabled libraries in the project dependencies.
[Codegen] Found react-native
[Codegen] Found react-native-webview


[Codegen] >>>>> Searching for codegen-enabled libraries in react-native.config.js
[Codegen] Processing FBReactNativeSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing rncore
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing RNCWebViewSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, visionos for RNCWebViewSpec
[Codegen] Done.
UnsupportedTypeAnnotationParserError: Module NativeRNCWebViewModule: TypeScript type annotation 'TSTupleType' is unsupported in NativeModule specs.
    at translateTypeAnnotation (/Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/typescript/modules/index.js:376:15)
    at /Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:373:11
    at guard (/Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
    at translateFunctionTypeAnnotation (/Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:367:25)
    at buildPropertySchema (/Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:484:7)
    at /Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:705:24
    at guard (/Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
    at /Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:702:14
    at Array.map (<anonymous>)
    at buildModuleSchema (/Users/user/Documents/Projects/ReactNative/RN74/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:699:6) {
  nodes: [
    Node {
      type: 'TSTupleType',
      start: 342,
      end: 350,
      loc: [SourceLocation],
      elementTypes: [Array]
    }
  ],
  typeAnnotationType: 'TSTupleType'
}
.

 #  from /Users/user/Documents/Projects/ReactNative/RN74/ios/Podfile:20
 #  -------------------------------------------
 #  
 >    use_react_native!(
 #      :path => config[:reactNativePath],
 #  -------------------------------------------

[!] [Codegen] warn: using experimental new codegen integration

Reproducer

https://github.com/gladiuscode/codegen-breaks-pod-install-on-old-arch

Screenshots and Videos

No response

@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.74.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cipolleschi
Copy link
Contributor

@gladiuscode Thanks for the issue but why should you

Break the Spec file in any way, in our case we can break: react-native-webview's Spec file by adding a Tuple that isn't supported yet; (Example down below)
??

Even if Codegen gets executed, it is executed by your version of react-native and it is ensured to build properly. There are many people using react-native-webview in 0.75 on the Old Architecture and they don't have issues with that.

In order to make sure that everything work, please try to clean your project:

  • run bundle exec pod deintegrate
  • remove the iod/build folder
  • reintall yarn
  • reinstall pods with bundle exec pod install.

Everything should work just fine.

@gladiuscode
Copy link
Author

w version, if we run pod install, now Codegen gets executed differently than before.

This would be fine if we actually enabled the new architecture, but we didn't and it breaks the pods install phase because some libraries are compatible with the new architecture but present issues in the Spec file that Codegen refers to.

Hi @cipolleschi, thanks for your reply.

I did break react-native-webview just to showcase that currently, running the old architecture, codegen breaks pods install anytime there is a library that has issues in the Spec file and that's our case.

We've got a library that we can't patch ourself, it is compatibile with the new architecture, but has issues in the Spec file itself: so when we migrate from .73.x to .75.x it breaks the pods installation phase for the old architecture as well.
This shouldn't happen because if we stay in the old architecture it shouldn't even check out the Spec file itself for reference since we are not using TurboModules or the new architecture setup.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Oct 7, 2024
@cipolleschi
Copy link
Contributor

Even in the old architecture, we generate Codegen. The reason is to minimize the differences between the two architectures to simplify the migration.
The version of codegen that is generated is linked to the version of React Native. If you updated React Native the code generated should work in boht architecture.
Notice that there are libraries that, starting from 0.74, are shipping the generated code in the npm package. In that case, breaking changes in the Codegen will break the those libraries.

What's the library that is breaking in your case?

@gladiuscode
Copy link
Author

gladiuscode commented Oct 10, 2024

Even in the old architecture, we generate Codegen. The reason is to minimize the differences between the two architectures to simplify the migration. The version of codegen that is generated is linked to the version of React Native. If you updated React Native the code generated should work in boht architecture. Notice that there are libraries that, starting from 0.74, are shipping the generated code in the npm package. In that case, breaking changes in the Codegen will break the those libraries.

What's the library that is breaking in your case?

Ok, now I understand it a little bit better, thank you.

In our case we are using a third party library that Cleafy provided us: this library supports both the old and new architecture and it has got an issue in the Spec file, it uses Tuples that aren't supported yet.

If we stay on version 73.x, with the old architecture, no issues arise, we can run pod install and everything works.
If we move on version 75.x, with the old architecture, one issue arise, we can't run pod install because Codegen runs, finds that Cleafy's lib is compatibile with the new architecture, tries to read the Spec file to generate all the required code and it breaks because it sees that the Spec file uses types that aren't supported yet.

So taking what you said, there is a subtle issue for everyone who stays in the old architecture: anytime a library updates and makes changes that aren't supported yet by Codegen, it breaks both architecture, right?

Given that everyone should move to the new one, not everyone can actually do so immediately, due to lock-ins, such our case, so what's the best course of action?
Surely we can contact Cleafy or any library author to ask for a patch, but in the meantime I suppose we need to get by using patch-package or yarn patch.

Thank you for you time!

@cortinico cortinico removed the Needs: Attention Issues where the author has responded to feedback. label Oct 10, 2024
@Mihai-github
Copy link

I'm encountering the same issue while attempting to upgrade from React Native 0.73.7 to ^0.75.4. After following all the necessary steps for the upgrade, the process fails when trying to install the pods, resulting in the following error:

[!] Invalid `Podfile` file: [!] /Users/user/.nvm/versions/node/v20.16.0/bin/node ./../node_modules/react-native/scripts/generate-codegen-artifacts.js -p /Users/user/Work/project_name/ios/.. -o /Users/user/Work/project_name/ios -t ios

[Codegen] Analyzing /Users/user/Work/project_name/package.json
[Codegen] Searching for codegen-enabled libraries in the app.
[Codegen] The "codegenConfig" field is not defined in package.json. Assuming there is nothing to generate at the app level.
[Codegen] Searching for codegen-enabled libraries in the project dependencies.
[Codegen] Found @react-native-async-storage/async-storage
[Codegen] Found @react-native-camera-roll/camera-roll
[Codegen] Found @react-native-clipboard/clipboard
[Codegen] Found @react-native-community/blur
[Codegen] Found @react-native-picker/picker
[Codegen] Found react-native
[Codegen] Found react-native-avoid-softinput
[Codegen] Found react-native-blob-util
[Codegen] Found react-native-date-picker
[Codegen] Found react-native-document-picker
[Codegen] Found react-native-gesture-handler
[Codegen] Found react-native-image-picker
[Codegen] Found react-native-localization-settings
[Codegen] Found react-native-localize
[Codegen] Found react-native-permissions
[Codegen] Found react-native-safe-area-context
[Codegen] Found react-native-screens
[Codegen] Found react-native-simple-toast
[Codegen] Found react-native-svg
[Codegen] Found react-native-vector-icons


[Codegen] >>>>> Searching for codegen-enabled libraries in react-native.config.js
[Codegen] Processing rnasyncstorage
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos, visionos for rnasyncstorage
[Codegen] Processing rncameraroll
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for rncameraroll
[Codegen] Processing rnclipboard
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos, visionos for rnclipboard
[Codegen] Processing rnblurview
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, tvos, visionos for rnblurview
[Codegen] Processing rnpicker
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos for rnpicker
[Codegen] Processing FBReactNativeSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing rncore
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing rnavoidsoftinput
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for rnavoidsoftinput
[Codegen] Processing ReactNativeBlobUtilSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for ReactNativeBlobUtilSpec
[Codegen] Processing RNDatePickerSpecs
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for RNDatePickerSpecs
[Codegen] Processing rndocumentpicker
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for rndocumentpicker
[Codegen] Processing rngesturehandler_codegen
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos, visionos for rngesturehandler_codegen
[Codegen] Processing RNImagePickerSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for RNImagePickerSpec
[Codegen] Processing RNLocalizationSettingsSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for RNLocalizationSettingsSpec
[Codegen] Done.
UnsupportedModulePropertyParserError: Module NativeLocalizationSettings: TypeScript interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's or non nullable 'EventEmitter's. Property 'language' refers to a 'TSStringKeyword'.
    at throwIfModuleTypeIsUnsupported (/Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/error-utils.js:205:11)
    at buildPropertySchema (/Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:523:3)
    at /Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:856:22
    at guard (/Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/utils.js:31:14)
    at /Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:836:14
    at Array.map (<anonymous>)
    at buildModuleSchema (/Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:818:6)
    at /Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:633:9
    at guard (/Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/utils.js:31:14)
    at buildSchemaFromConfigType (/Users/user/Work/project_name/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:632:22) {
  nodes: [ undefined ]
}
.

 #  from /Users/user/Work/project_name/ios/Podfile:54
 #  -------------------------------------------
 #  
 >    use_react_native!(
 #      :path => config[:reactNativePath],
 #  -------------------------------------------

@cipolleschi
Copy link
Contributor

This error points to a misaligned version of Codegen for RNLocalizationSettingsSpec.

Is this coming from a library? Can you point out which one?

I suggest to run pod deintegrate, to delete node_modules and rerun yarn install and bundle exec pod install.

@mpanac
Copy link

mpanac commented Jan 1, 2025

@Mihai-github I have the same issue and i am stuck for weeks. Have you find a solution please?

@mpanac
Copy link

mpanac commented Jan 1, 2025

Please help me out, I have the same issue when running pod install. I have tried pod deintegrate, removing node_modules, clearing/invalidating caches, pod update whatever and i am still stuck here:

[!] Invalid Podfile file: [!] /Users/martin/.nvm/versions/node/v22.3.0/bin/node ./../node_modules/react-native/scripts/generate-codegen-artifacts.js -p /Users/martin/Documents/GitHub/PoleApp/ios/.. -o /Users/martin/Documents/GitHub/PoleApp/ios -t ios

[Codegen] Analyzing /Users/martin/Documents/GitHub/PoleApp/package.json
[Codegen] Searching for codegen-enabled libraries in the app.
[Codegen] The "codegenConfig" field is not defined in package.json. Assuming there is nothing to generate at the app level.
[Codegen] Searching for codegen-enabled libraries in the project dependencies.
[Codegen] Found @bam.tech/react-native-image-resizer
[Codegen] Found @react-native-async-storage/async-storage
[Codegen] Found @react-native-community/blur
[Codegen] Found @react-native-google-signin/google-signin
[Codegen] Found @sentry/react-native
[Codegen] Found lottie-react-native
[Codegen] Found react-native
[Codegen] Found react-native-gesture-handler
[Codegen] Found react-native-google-mobile-ads
[Codegen] Found react-native-pager-view
[Codegen] Found react-native-permissions
[Codegen] Found react-native-reanimated
[Codegen] Found react-native-safe-area-context
[Codegen] Found react-native-screens
[Codegen] Found react-native-svg
[Codegen] Found react-native-vector-icons

[Codegen] >>>>> Searching for codegen-enabled libraries in react-native.config.js
[Codegen] Processing RNImageResizerSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for RNImageResizerSpec
[Codegen] Processing rnasyncstorage
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos, visionos for rnasyncstorage
[Codegen] Processing rnblurview
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, tvos, visionos for rnblurview
[Codegen] Processing RNGoogleSignInCGen
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for RNGoogleSignInCGen
[Codegen] Processing RNSentrySpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos, visionos for RNSentrySpec
[Codegen] Processing lottiereactnative
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos for lottiereactnative
[Codegen] Processing FBReactNativeSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing rncore
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing rngesturehandler_codegen
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos, visionos for rngesturehandler_codegen
[Codegen] Processing RNGoogleMobileAdsSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for RNGoogleMobileAdsSpec
[Codegen] Done.
UnsupportedModulePropertyParserError: Module NativeGoogleMobileAdsNativeModule: TypeScript interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's. Property 'onAdEvent' refers to a 'TSTypeReference'.
at throwIfModuleTypeIsUnsupported (/Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/error-utils.js:163:11)
at buildPropertySchema (/Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:472:3)
at /Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:705:24
at guard (/Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
at /Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:702:14
at Array.map ()
at buildModuleSchema (/Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:699:6)
at /Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:522:9
at guard (/Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/utils.js:26:14)
at buildSchemaFromConfigType (/Users/martin/Documents/GitHub/PoleApp/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:521:22) {
nodes: [ undefined ]
}
.

from /Users/martin/Documents/GitHub/PoleApp/ios/Podfile:51

-------------------------------------------

use_react_native!(

:path => config[:reactNativePath],

-------------------------------------------

@cipolleschi
Copy link
Contributor

@mpanac have you tried to bump the Google Mobile Ads SDK and React Native?
The module that is failing is NativeGoogleMobileAdsNativeModule, which I suppose is part of the Google SDK. From what I'm seeing in the logs, it looks like that the the NativeGoogleMobileAdsNativeModule is using a feature of Codegen that is not supported by your version of React Native.

If you can prepare a reproducer using this template with the Google Mobile Ads version you are using, I can try to investigate the issue more deeply.

@nicooo91
Copy link

nicooo91 commented Jan 6, 2025

@Mihai-github I have the same issue and i am stuck for weeks. Have you find a solution please?

Hi! I face exactly the same problem, did you manage to solve it? Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants