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]: 'expo run:ios' fails after installing onesignal-expo-plugin #79

Closed
1 task done
LukeV111 opened this issue Apr 8, 2022 · 5 comments
Closed
1 task done
Labels
Bug Something isn't working

Comments

@LukeV111
Copy link

LukeV111 commented Apr 8, 2022

What happened?

I have the latest version of expo-cli.

Using:

"onesignal-expo-plugin": "^1.0.0",
"react-native-onesignal": "^4.3.7",

Steps to reproduce?

Follow the documentation found here: https://github.com/OneSignal/onesignal-expo-plugin

What did you expect to happen?

Everything runs without any issues until I get to expo run:ios

Then I get the below error:

The following build commands failed:
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')

OneSignal Expo SDK version

1.0.0

Platform

No response

Relevant log output

2022-04-08 15:38:39.692 xcodebuild[73298:4604834] warning:  The file reference for "OneSignalNotificationServiceExtension" is a member of multiple groups ("Pods" and ""); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
** BUILD FAILED **


The following build commands failed:
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
        PhaseScriptExecution [CP-User]\ Generate\ Specs Library/Developer/Xcode/DerivedData/App-fspnqmnktjandhhdnfysxlewamvd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-BD7ACB0873CA1DBF901FF4818FC9757C.sh (in target 'FBReactNativeSpec' from project 'Pods')
(2 failures)
Build logs written to app/.expo/xcodebuild.log

Code of Conduct

  • I agree to follow this project's Code of Conduct
@LukeV111 LukeV111 added the Bug Something isn't working label Apr 8, 2022
@jkasten2
Copy link
Member

jkasten2 commented Apr 12, 2022

@LukeV111 Thanks for reporting. Could you provide the exact version of the expo and react dependencies? Share your package.json if you can. Please provide step by step or an example project if it require more than just starting a new project and adding these dependencies.

@LukeV111
Copy link
Author

LukeV111 commented Apr 13, 2022

Thanks for the reply @jkasten2

This happens if I build a completely new expo project and install the dependencies. No extra steps required.

Here is my package.json

{
  "name": "appName",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~44.0.0",
    "expo-status-bar": "~1.2.0",
    "onesignal-expo-plugin": "^1.0.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-onesignal": "^4.3.7",
    "react-native-web": "0.17.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

@sfurlaneudaimon
Copy link

sfurlaneudaimon commented Apr 14, 2022

Hi @jkasten2,
I confirm the bug reported by LukeV111, I am developing on a MacBook Pro (13-inch, M1, 2020) with Apple M1 chip

  1. Xcode version 13.0 and 13.3.1
  2. Cocoapods and gems installed: Gems/2.6.0/gems/cocoapods-1.11.3

Hope these steps and logs can help:

  1. expo init testOneSignalPlugin
  2. cd testOneSignalPlugin
  3. expo install onesignal-expo-plugin
  4. Add onesginal config in app.json
    {
    "expo": {
    "name": "testOneSignalPlugin",
    "slug": "testOneSignalPlugin",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
    "image": "./assets/splash.png",
    "resizeMode": "contain",
    "backgroundColor": "#ffffff"
    },
    "updates": {
    "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
    "**/*"
    ],
    "ios": {
    "supportsTablet": true
    },
    "android": {
    "adaptiveIcon": {
    "foregroundImage": "./assets/adaptive-icon.png",
    "backgroundColor": "#FFFFFF"
    }
    },
    "web": {
    "favicon": "./assets/favicon.png"
    },
    "plugins": [
    [
    "onesignal-expo-plugin",
    {
    "mode": "development"
    }
    ]
    ],
    "extra": {
    "oneSignalAppId": “my-onesginal-id”
    }
    }
    }

The package.json is like this

{
"name": "testonesignalplugin",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"expo": "~44.0.0",
"expo-status-bar": "~1.2.0",
"onesignal-expo-plugin": "^1.0.1",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-web": "0.17.1",
"expo-splash-screen": "~0.14.1"
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
"private": true
}

Then run expo run:ios with error:

Something went wrong running pod install in the ios directory.
Command pod install failed.
└─ Cause: Oh no, an error occurred.

Failed to build iOS project. "xcodebuild" exited with error code 65.
To view more error logs, try building the app with Xcode directly, by opening……/testOneSignalPlugin/iOS/testOneSignalPlugin.xcodeproj.

Command line invocation:
.......Xcode13.0.app/Contents/Developer/usr/bin/xcodebuild -project ......./testOneSignalPlugin/ios/testOneSignalPlugin.xcodeproj -configuration Debug -scheme testOneSignalPlugin -destination id=BEA6BA14-1FCE-4710-B876-50088675E9AA

User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Planning
Analyze workspace

Create build description
Build description signature: ec5b2a2fcb3540beba506ba2ea8f462e
Build description path: …./Library/Developer/Xcode/DerivedData/testOneSignalPlugin-cgxnkonryjakfedmscpzlknacshn/Build/Intermediates.noindex/XCBuildData/ec5b2a2fcb3540beba506ba2ea8f462e-desc.xcbuild

note: Build preparation complete
note: Building targets in parallel
......./testOneSignalPlugin/ios/Pods/Target Support Files/Pods-testOneSignalPlugin/Pods-testOneSignalPlugin.debug.xcconfig:1:1: error: unable to open file (in target "testOneSignalPlugin" in project "testOneSignalPlugin")
......./testOneSignalPlugin/ios/Pods/Target Support Files/Pods-testOneSignalPlugin/Pods-testOneSignalPlugin.debug.xcconfig:1:1: error: unable to open file (in target "testOneSignalPlugin" in project "testOneSignalPlugin")
......./testOneSignalPlugin/ios/Pods/Target Support Files/Pods-testOneSignalPlugin/Pods-testOneSignalPlugin.debug.xcconfig:1:1: error: unable to open file (in target "testOneSignalPlugin" in project "testOneSignalPlugin")
......./testOneSignalPlugin/ios/Pods/Target Support Files/Pods-testOneSignalPlugin/Pods-testOneSignalPlugin.debug.xcconfig:1:1: error: unable to open file (in target "testOneSignalPlugin" in project "testOneSignalPlugin")

The log of xcode

xcodebuild[13861:222702] warning: The file reference for "OneSignalNotificationServiceExtension" is a member of multiple groups ("Pods" and ""); this indicates a malformed project. Only the membership in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the same file in more than one group, please add another reference to the same path.
** BUILD FAILED **

Command line invocation:
.......Xcode13.0.app/Contents/Developer/usr/bin/xcodebuild -project .......testOneSignalPlugin/ios/testOneSignalPlugin.xcodeproj -configuration Debug -scheme testOneSignalPlugin -destination id=BEA6BA14-1FCE-4710-B876-50088675E9AA

User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES

note: Using new build system
note: Planning
Analyze workspace

Create build description
Build description signature: ec5b2a2fcb3540beba506ba2ea8f462e
Build description path: ....../Developer/Xcode/DerivedData/testOneSignalPlugin-cgxnkonryjakfedmscpzlknacshn/Build/Intermediates.noindex/XCBuildData/ec5b2a2fcb3540beba506ba2ea8f462e-desc.xcbuild

note: Build preparation complete
note: Building targets in parallel
.......testOneSignalPlugin/ios/Pods/Target Support Files/Pods-testOneSignalPlugin/Pods-testOneSignalPlugin.debug.xcconfig:1:1: error: unable to open file (in target "testOneSignalPlugin" in project "testOneSignalPlugin")
.......testOneSignalPlugin/ios/Pods/Target Support Files/Pods-testOneSignalPlugin/Pods-testOneSignalPlugin.debug.xcconfig:1:1: error: unable to open file (in target "testOneSignalPlugin" in project "testOneSignalPlugin")
.......testOneSignalPlugin/ios/Pods/Target Support Files/Pods-testOneSignalPlugin/Pods-testOneSignalPlugin.debug.xcconfig:1:1: error: unable to open file (in target "testOneSignalPlugin" in project "testOneSignalPlugin")
.......testOneSignalPlugin/ios/Pods/Target Support Files/Pods-testOneSignalPlugin/Pods-testOneSignalPlugin.debug.xcconfig:1:1: error: unable to open file (in target "testOneSignalPlugin" in project "testOneSignalPlugin")

I changed Xcode command line tools version to latest 13.3.1 but got the same error without logs
Something went wrong running pod install in the ios directory.
Command pod install failed.
└─ Cause: Oh no, an error occurred.

Thank you for your help!

@rgomezp
Copy link
Contributor

rgomezp commented Apr 14, 2022

Howdy,
Thanks for reporting. We'll take a look at what might be causing this issue and appreciate your patience. It also might be unrelated since there's just a warning.

I've found the following links that seem similar.
https://stackoverflow.com/questions/33395675/cocoapods-file-reference-is-a-member-of-multiple-groups
yonaskolb/XcodeGen#782

@rgomezp
Copy link
Contributor

rgomezp commented Apr 14, 2022

Duplicate of #71

@rgomezp rgomezp marked this as a duplicate of #71 Apr 14, 2022
@rgomezp rgomezp closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants