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

[Bug]: Build fails with OneSignalXCFramework (< 4.0, >= 3.0) error #142

Open
1 task done
tquinlan1992 opened this issue Nov 15, 2022 · 25 comments
Open
1 task done
Assignees

Comments

@tquinlan1992
Copy link

tquinlan1992 commented Nov 15, 2022

What happened?

Running any profile with the eas build eas build -p ios locally on a M1 laptop results in the following error. The build in the expo.dev cloud build is successful

[INSTALL_PODS] [!] CocoaPods could not find compatible versions for pod "OneSignalXCFramework":
[INSTALL_PODS]   In Podfile:
[INSTALL_PODS]     OneSignalXCFramework (< 4.0, >= 3.0)
[INSTALL_PODS] 
[INSTALL_PODS]     react-native-onesignal (from `../../../node_modules/react-native-onesignal`) was resolved to 4.4.1, which depends on
[INSTALL_PODS]       OneSignalXCFramework (= 3.11.2)
[INSTALL_PODS] 
[INSTALL_PODS] Specs satisfying the `OneSignalXCFramework (< 4.0, >= 3.0), OneSignalXCFramework (= 3.11.2)` dependency were found, but they required a higher minimum deployment target.
[INSTALL_PODS] 
Error: pod exited with non-zero code: 1

Steps to reproduce?

1. Use an expo app
2. Go through the steps of using the onesignal-expo-plugin using version `"^1.2.0"`
3. Run `eas build -p ios` with any profile.  In my case I'm using this simulator profile 

{
  "build": {
    "simulator": {
      "developmentClient": true,
      "ios": {
        "simulator": true
      }
    },
  }

Plugin Config

"plugins": [
      [
        "onesignal-expo-plugin",
        {
          "mode": "development",
          "devTeam": "{devTeam}"
        }
      ]
]

What did you expect to happen?

The build to succeed

OneSignal Expo SDK version

1.2.0

Platform

iOS

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tquinlan1992 tquinlan1992 changed the title [Bug]: [Bug]: Build fails with OneSignalXCFramework (< 4.0, >= 3.0) error Nov 15, 2022
@tquinlan1992 tquinlan1992 changed the title [Bug]: Build fails with OneSignalXCFramework (< 4.0, >= 3.0) error [Bug]: Build fails with OneSignalXCFramework (< 4.0, >= 3.0) error Nov 15, 2022
@rgomezp
Copy link
Contributor

rgomezp commented Nov 15, 2022

Hey,
Could you please provide the full log message (it gets cut off there at the end)?

Do you have the actual error message as well?

Also, please provide the plugin config in your app.json file

@tquinlan1992
Copy link
Author

Apologies, I'll provide that soon

@tquinlan1992
Copy link
Author

Hey, I've updated the issue above with the full log message for where the error occurs and provided the plugins section for the app.json

Also I noted that the build is failing on my m1 laptop, but succeeds in the expo.dev build

@rgomezp
Copy link
Contributor

rgomezp commented Nov 17, 2022

Howdy,
Try adding iPhoneDeploymentTarget to your plugin props.

@tquinlan1992
Copy link
Author

Thanks for the note. Could you share an example of that set up? I couldn't find relevant docs

@tquinlan1992
Copy link
Author

Apologies, found the doc right here https://github.com/OneSignal/onesignal-expo-plugin#plugin-prop

@tquinlan1992
Copy link
Author

Setting it like so didn't seem to do the trick

      [
        "onesignal-expo-plugin",
        {
          "mode": "development",
          "devTeam": "devteam",
          "iPhoneDeploymentTarget": "12.0"
        }
      ]

@rgomezp
Copy link
Contributor

rgomezp commented Nov 17, 2022

Some things I would try:

  • building to a different profile / perhaps not simulator and seeing what happens
  • prebuilding the project and opening the xcworkspace in the ios directory to see if Xcode gives better error visibility

@tquinlan1992
Copy link
Author

Appreciated 👍 I have tried all the other profiles I believe and same issue

I'm going to try to doing the prebuild. Is that just "expo prebuild", I'll look for the docs as well. And anything in particular should I look for? I know it points to a dependency version issue and saw threads about changing android specific docs via pure react native, though wasn't sure if I would be able to make those same changes through the expo managed project

@rgomezp
Copy link
Contributor

rgomezp commented Nov 18, 2022

Howdy,
Yes, we have a section on prebuilding in our main README. You can make use of your .gitignore to prevent from actually turning your project into a non-managed build.

I'm not completely following what you mean with regards to Android.

@tquinlan1992
Copy link
Author

Thank you! And no worries, I'm not exactly sure myself what I mean either... once I find time to try out the expo prebuild maybe I'll have something more

@Eigilak
Copy link

Eigilak commented Dec 5, 2022

I fixed this by setting my iPhoneDeploymentTarget to 13

...expo,
plugins: [
      [
        'onesignal-expo-plugin',
        {
          iPhoneDeploymentTarget: '13.0',
        },
      ],
],

@ilgiapa
Copy link

ilgiapa commented Dec 9, 2022

HI all,
I tried with iPhoneDeploymentTarget but nothing, same error.

  • Expo 47 (Managed Workflow).
  • "onesignal-expo-plugin": "^1.3.0",
  • "react-native-onesignal": "^4.5.0",

11 Days ago EAS Build worked well.

Thanks

@rgomezp
Copy link
Contributor

rgomezp commented Jan 4, 2023

hey @ilgiapa ,
sorry for the delay. Were you able to resolve the error?

@weichiangko
Copy link

weichiangko commented Jan 12, 2023

Hi All,

I fixed the issue by follwing the "Install pods" fail instruction:

  1. cd ios
  2. pod install --repo-update
  3. pod update OneSignalXCFramework

For anyone who bump into this issue

@croshim
Copy link

croshim commented Jun 8, 2023

Still getting this issue while working with EAS. Any updates on this?

@yernandus
Copy link

Still getting this issue while working with EAS. Any updates on this?

try 14.0

@ShaunPep
Copy link

ShaunPep commented Sep 2, 2023

Hi Everyone,

I am currently facing the same issue, currently I have my app.json file setup as follows for the plugins.

"plugins": [
      [
        "onesignal-expo-plugin",
        {
          "mode": "production",
          "iPhoneDeploymentTarget": "15.0"
        }
      ],
      ["expo-build-properties", {"ios": {"deploymentTarget": "15.0", "extraPods": [{"name": "OneSignalXCFramework", "version": "5.0"}]}}]
    ]

When I run the command eas build -p ios --clear-cache --profile preview.
I get the following error back - iOS build failed:
Compatible versions of some pods could not be resolved.
You are seeing this error because either:

  • Some of the pods used in your project depend on different versions of the same pod. See logs for more information.
  • If you are caching Podfile.lock using "cache" field in eas.json, then versions there might not match required values in Podspecs of some installed libraries. To fix this, you can re-run build command with "--clear-cache" option, or select "Clear cache and retry build" on the build page.

I have tried running with clear-cache as well but still get the same error.

Any help would really be appreciated.

@K3nn4
Copy link

K3nn4 commented Sep 5, 2023

Same problem, if you find a way to fix this plz, tell me ;)

@rgomezp
Copy link
Contributor

rgomezp commented Sep 11, 2023

@ShaunPep ,
You shouldn't need to include the OneSignalXCFramework pod as the plugin does this for you.

For anyone else seeing this issue, perhaps try deleting your ios directory and starting fresh in a managed build.

@s-troupis
Copy link

Try updating onesignal-expo-plugin to 2.0.0

@imwexpex
Copy link

For some reason after upgrading onesignal-expo-plugin to ^2.0.2 and running npx expo prebuild the OneSignalNotificationServiceExtension inside Podfile is not updated

To solve this issue you can manually remove:

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
  use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
end

And run npx expo prebuild.

@hasanaktas
Copy link

hasanaktas commented Nov 1, 2023

eas build --platform ios --local

I don't want to prebuild.

I get this error when I want to create it with eas.
If I remove the Onesignal libraries, it builds without any problems.

"expo": "^49.0.16"
"onesignal-expo-plugin": "^2.0.2"
"react-native-onesignal": "^5.0.2"

bug report

[RUN_EXPO_DOCTOR] Running "expo doctor"
[RUN_EXPO_DOCTOR] Running 10 checks on your project...
[RUN_EXPO_DOCTOR] ✔ Check Expo config for common issues
[RUN_EXPO_DOCTOR] ✔ Check package.json for common issues
[RUN_EXPO_DOCTOR] ✔ Check dependencies for packages that should not be installed directly
[RUN_EXPO_DOCTOR] ✔ Check for common project setup issues
[RUN_EXPO_DOCTOR] ✔ Check npm/ yarn versions
[RUN_EXPO_DOCTOR] ✔ Check Expo config (app.json/ app.config.js) schema
[RUN_EXPO_DOCTOR] ✔ Check that packages match versions required by installed Expo SDK
[RUN_EXPO_DOCTOR] ✔ Check that native modules do not use incompatible support packages
[RUN_EXPO_DOCTOR] ✔ Check for legacy global CLI installed locally
[RUN_EXPO_DOCTOR] ✔ Check that native modules use compatible support package versions for installed Expo SDK
[RUN_EXPO_DOCTOR] Didn't find any issues with the project!
[PREBUILD] $ /private/var/folders/rg/x3mc29zj5yg1dj0c0n3d7xhh0000gn/T/eas-build-local-nodejs/0c41f1bd-a202-428e-a491-b4787daab40a/build/node_modules/.bin/expo prebuild --no-install --platform ios
[PREBUILD] - Creating native project directories (./ios and ./android) and updating .gitignore
[PREBUILD] ✔ Created native project | gitignore skipped
[PREBUILD] - Updating your package.json scripts, dependencies, and main file
[PREBUILD] ✔ Updated package.json and added index.js entry point for iOS and Android
[PREBUILD] - Config syncing
[PREBUILD] Using node to generate images. This is much slower than using native packages.
[PREBUILD] › Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.
[PREBUILD] - Config syncing
[PREBUILD] ✔ Config synced
[PREBUILD] Running "yarn install" in /var/folders/rg/x3mc29zj5yg1dj0c0n3d7xhh0000gn/T/eas-build-local-nodejs/0c41f1bd-a202-428e-a491-b4787daab40a/build directory
[PREBUILD] [1/4] Resolving packages...
[PREBUILD] success Already up-to-date.
[INSTALL_PODS] Using Expo modules
[INSTALL_PODS] [Expo] Enabling modular headers for pod ExpoModulesCore
[INSTALL_PODS] [Expo] Enabling modular headers for pod ReactCommon
[INSTALL_PODS] [Expo] Enabling modular headers for pod React-Core
[INSTALL_PODS] [Expo] Enabling modular headers for pod React-RCTAppDelegate
[INSTALL_PODS] [Expo] Enabling modular headers for pod expo-dev-menu-interface
[INSTALL_PODS] [Expo] Enabling modular headers for pod EXManifests
[INSTALL_PODS] [Expo] Enabling modular headers for pod EXUpdatesInterface
[INSTALL_PODS] [Expo] Enabling modular headers for pod expo-dev-menu
[INSTALL_PODS] [Expo] Enabling modular headers for pod RCT-Folly
[INSTALL_PODS] [Expo] Enabling modular headers for pod expo-dev-launcher
[INSTALL_PODS] [Expo] Enabling modular headers for pod SDWebImage
[INSTALL_PODS] [Expo] Enabling modular headers for pod SDWebImageWebPCoder
[INSTALL_PODS] [Expo] Enabling modular headers for pod SDWebImageAVIFCoder
[INSTALL_PODS] [Expo] Enabling modular headers for pod SDWebImageSVGCoder
[INSTALL_PODS] [Expo] Enabling modular headers for pod EXStructuredHeaders
[INSTALL_PODS] [Expo] Enabling modular headers for pod EASClient
[INSTALL_PODS] [Expo] Enabling modular headers for pod ReachabilitySwift
[INSTALL_PODS] [Expo] Enabling modular headers for pod ASN1Decoder
[INSTALL_PODS] Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/hasanaktas/.nvm/versions/node/v18.18.0/bin/node
[INSTALL_PODS] Auto-linking React Native modules for target `hipicondev`: RNCAsyncStorage, RNFlashList, RNGestureHandler, RNGoogleSignin, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-adjust, react-native-date-picker, react-native-netinfo, react-native-onesignal, react-native-safe-area-context, and react-native-webview
[INSTALL_PODS] Framework build type is static library
[INSTALL_PODS] [Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[INSTALL_PODS] Analyzing dependencies
[INSTALL_PODS] Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[INSTALL_PODS] [Codegen] Found FBReactNativeSpec
[INSTALL_PODS] Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[INSTALL_PODS] [Codegen] Found rncore
[INSTALL_PODS] Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
[INSTALL_PODS] Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[INSTALL_PODS] Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[INSTALL_PODS] [Hermes] Using the release tarball from Maven Central
[INSTALL_PODS] [!] CocoaPods could not find compatible versions for pod "OneSignalXCFramework":
[INSTALL_PODS]   In Podfile:
[INSTALL_PODS]     OneSignalXCFramework (< 6.0, >= 5.0)
[INSTALL_PODS]     react-native-onesignal (from `../node_modules/react-native-onesignal`) was resolved to 5.0.2, which depends on
[INSTALL_PODS]       OneSignalXCFramework (= 5.0.2)
[INSTALL_PODS] Specs satisfying the `OneSignalXCFramework (< 6.0, >= 5.0), OneSignalXCFramework (= 5.0.2)` dependency were found, but they required a higher minimum deployment target.
[INSTALL_PODS] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `5F376399E74A4BB692B74A7F` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
[INSTALL_PODS] 
Error: pod install exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:632:26)
    at ChildProcess.emit (node:events:517:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:303:5)
    ...
    at spawnAsync (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawn (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/turtle-spawn/dist/index.js:16:47)
    at installPods (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/ios/pod.js:11:38)
    at /Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:70:41
    at BuildContext.runBuildPhase (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/context.js:101:34)
    at buildAsync (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:69:19)
    at async runBuilderWithHooksAsync (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
    at async Object.iosBuilder (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:29:16)
    at async buildIosAsync (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/ios.js:66:12)
    at async buildAsync (/Users/hasanaktas/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/build.js:54:29)

Build failed
Unknown error. See logs of the Install pods build phase for more information.
npx exited with non-zero code: 1

@newme616
Copy link

newme616 commented Jan 4, 2024

same problem here!

I hope this will be fixed soon

@Czarczynski
Copy link

bump here, any news?

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

No branches or pull requests