wizpanda / cordova-plugin-firebase-lib

This repository is moving & merging to https://github.com/wizpanda/cordova-plugin-firebase-lib to avoid confusion to developers.
https://www.wizpanda.com/
MIT License
68 stars 38 forks source link

Cordova platform add fails with 5.0.0 #27

Closed paulstelzer closed 5 years ago

paulstelzer commented 5 years ago

Describe the bug

If I want to run cordova platform add ios it failes with "Error: pod: Command failed with exit code 31"

Steps to reproduce

Run cordova platform add ios

Console Logs

Failed to install 'cordova-plugin-firebase-lib': Error: pod: Command failed with exit code 31
    at ChildProcess.whenDone (/Users/vsts/agent/2.153.2/work/1/s/packages/app/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:606:12)

Plugin Version

5.0.0

Using cordova cli 9.0.0

alvaro-octal commented 5 years ago

Try upgrading pod to version 1.7.2 by running:

sudo gem install cocoapods
sagrawal31 commented 5 years ago

Use v5.1.0 to make it work. Make sure you have at least 1.5.0 of Cocoapod. Please reopen the issue if you are still getting an error due to this plugin.

paulstelzer commented 5 years ago

Thank you! It's still not working (build with Azure Devops) with the same error. I have another cordova plugin with pods in it (pods installing via cordova) and that's working without problems. Btw, you guys doing a great job to maintain the firebase cordova lib - 1000 thumbs up!

I will try it in around three weeks on my personal mac

willmero commented 5 years ago

Currently seeing this build error as well running pod --version 1.7.2 cordova --version 9.0 iOS 5.0.1

Birowsky commented 5 years ago

Same here. pod --version 1.7.3 cordova -v 9.0.0 (cordova-lib@9.0.1) ios 5.0.1

I'm up for a remote session if you think it'd help. Hit me up anytime.

sagrawal31 commented 5 years ago

@willmero @Birowsky which version of this plugin you guys are using?

Birowsky commented 5 years ago

I’m at 5.1.0

Birowsky commented 5 years ago

After some research, I ran pod setup --verbose before cordova platform add ios@5.0.1, and the platform got successfully added. However, it had this warning:

[!] The мојЧоек [Release] target overrides the LD_RUNPATH_SEARCH_PATHS build setting defined in `Pods/Target Support Files/Pods-мојЧоек/Pods-мојЧоек.release.xcconfig'. This can lead to problems with the CocoaPods installation

  • Use the $(inherited) flag, or
  • Remove the build settings from the target.

I believe that's coming from the build.json config, documented here.

After that, I tried cordova build ios --verbose --stacktrace, and got an error:

ld: warning: directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/FirebaseAuth'
ld: warning: directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/FirebaseInstanceID'
ld: warning: directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/FirebaseMessaging'
ld: warning: directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/GTMSessionFetcher'
ld: warning: 
directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: warning: directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/Protobuf'
ld: warning: directory not found for option '-F/Users/Birowsky/Library/Developer/Xcode/DerivedData/мојЧоек-cmbqhisandqjzzfjnoezgoeadqop/Build/Products/Debug-iphonesimulator/nanopb'
ld: framework not found Pods________
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
        Ld /Users/{obfuscated project path}/cordova/platforms/ios/build/emulator/мојЧоек.app/мојЧоек normal x86_64
(1 failure)
Command finished with error code 65: xcodebuild -workspace,мојЧоек.xcworkspace,-scheme,мојЧоек,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone Xʀ,build,CONFIGURATION_BUILD_DIR=/Users/{obfuscated project path}/cordova/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/{obfuscated project path}/cordova/platforms/ios/build/sharedpch,EMBEDDED_CONTENT_CONTAINS_SWIFT = YES,ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO,LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"
xcodebuild: Command failed with exit code 65
Error: xcodebuild: Command failed with exit code 65
    at ChildProcess.whenDone (/Users/{obfuscated project path}/cordova/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:160:13)
    at maybeClose (internal/child_process.js:943:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
sagrawal31 commented 5 years ago

Can you provide me a repo reproducing this?

Birowsky commented 5 years ago

@sagrawal31 no, it's a private repo.

sagrawal31 commented 5 years ago

@Birowsky I wanted to say that can you create one blank cordova app, add different plugins which are using and share that repository

l3ender commented 4 years ago

Regarding the error for Failed to install 'cordova-plugin-firebase-lib': Error: pod: Command failed with exit code 31, I was getting the same until I ran pod repo update.

I am seeing the same warning about LD_RUNPATH_SEARCH_PATHS, but am able to build successfully. In our scenario, I believe that option is coming from cordova-plugin-add-swift-support.

sagrawal31 commented 4 years ago

@l3ender we don't use cordova-plugin-add-swift-support plugin. We'll try to fix this issue.