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

Fix Firebase version to avoid compilation freeze on iOS #460

Closed
wants to merge 1 commit into from

Conversation

damien-blanchet
Copy link

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation changes
  • Other... Please describe:

PR Checklist

For bug fixes / features, please check if your PR fulfills the following requirements:

  • Testing has been carried out for the changes have been added
  • Regression testing has been carried out for existing functionality
  • Docs have been added / updated

What is the purpose of this PR?

Fix Firebase version to avoid compilation freeze on iOS

Does this PR introduce a breaking change?

  • Yes
  • No

What testing has been done on the changes in the PR?

resolve freeze issue on ios compilation

What testing has been done on existing functionality?

Other information

<pod name="Firebase/Performance" spec="6.28.1"/>
<pod name="Firebase/RemoteConfig" spec="6.28.1"/>
<pod name="Firebase/InAppMessaging" spec="6.28.1"/>
<pod name="Firebase/Firestore" spec="6.28.1"/>
Copy link
Owner

@dpa99c dpa99c Jul 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pre-compiled version of Firestore needs to be kept as it significantly reduces build times

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pre-compiled version of Firestore needs to be kept as it significantly reduces build times

The pre-compiler firestore version freeze the ios compilation on my side.

Ionic:

Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.2.3
@angular-devkit/build-angular : 0.1000.3
@angular-devkit/schematics : 10.0.3
@angular/cli : 10.0.3
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, electron 1.1.1, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 8 other plugins)

Utility:

cordova-res (update available: 0.15.1) : 0.14.0
native-run : 1.0.0

System:

ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.13.4
OS : macOS Catalina
Xcode : Xcode 11.6 Build version 11E708

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example project builds fine for me with cordova-plugin-firebasex@10.1.2 in Xcode 11.5 and Xcode 12.0 Beta 2.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I follow the readme :

git clone https://github.com/dpa99c/cordova-plugin-firebasex-test.git && cd cordova-plugin-firebasex-test
npm install

cordova platform add ios
cordova run ios

I obtain a build failed on the same step i'm freeze on my project :

PhaseScriptExecution [CP]\ Copy\ Pods\ Resources /Users/damienblanchet/Library/Developer/Xcode/DerivedData/FirebaseTest-cqjrdjtdzlwcmiehwgvhhflbbajx/Build/Intermediates.noindex/FirebaseTest.build/Debug-iphonesimulator/FirebaseTest.build/Script-71CBF5A57D83BC59C2384146.sh (in target 'FirebaseTest' from project 'FirebaseTest')
    cd /Users/damienblanchet/Sources/cordova-plugin-firebasex-test/platforms/ios
    /bin/sh -c /Users/damienblanchet/Library/Developer/Xcode/DerivedData/FirebaseTest-cqjrdjtdzlwcmiehwgvhhflbbajx/Build/Intermediates.noindex/FirebaseTest.build/Debug-iphonesimulator/FirebaseTest.build/Script-71CBF5A57D83BC59C2384146.sh
/Users/damienblanchet/Sources/cordova-plugin-firebasex-test/platforms/ios/Pods/FirebaseFirestore/FirebaseFirestore/Resources/gRPCCertificates-Cpp.bundle
error: Resource "/Users/damienblanchet/Library/Developer/Xcode/DerivedData/FirebaseTest-cqjrdjtdzlwcmiehwgvhhflbbajx/Build/Products/Debug-iphonesimulator/FirebaseInAppMessaging/InAppMessagingDisplayResources.bundle" not found. Run 'pod install' to update the copy resources script.

** BUILD FAILED **

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I applied the modifications of this paragraph and I got a build success. I will investigate on my side to try to identify the issue

dpa99c added a commit that referenced this pull request Jul 16, 2020
@dpa99c dpa99c closed this in 9f2b5ce Jul 16, 2020
@dpa99c
Copy link
Owner

dpa99c commented Jul 16, 2020

Fixed in 10.1.2

@Younghun-Jung
Copy link

Younghun-Jung commented Jul 19, 2020

@dpa99c
I updated plugin version 10.1.2.
when I execute command 'cordova build ios --emulator',
Build process does not proceed to the next step. It stopped...

PhaseScriptExecution [CP]\ Prepare\ Artifacts /Users/jung-younghun/Library/Developer/Xcode/DerivedData/buildthing_IAQ_Admin_App-aptazjsnrxneemflbzesnykikyzo/Build/Intermediates.noindex/ArchiveIntermediates/buildthing\ IAQ\ Admin\ App/IntermediateBuildFilesPath/buildthing\ IAQ\ Admin\ App.build/Debug-iphoneos/buildthing\ IAQ\ Admin\ App.build/Script-D580E1C7A00E1D53EEBEBA4D.sh
    cd /Users/jung-younghun/buildit/projects/build_thing/buildthing-iaq-admin-mobile/src-cordova/platforms/ios
    /bin/sh -c \"/Users/jung-younghun/Library/Developer/Xcode/DerivedData/buildthing_IAQ_Admin_App-aptazjsnrxneemflbzesnykikyzo/Build/Intermediates.noindex/ArchiveIntermediates/buildthing\ IAQ\ Admin\ App/IntermediateBuildFilesPath/buildthing\ IAQ\ Admin\ App.build/Debug-iphoneos/buildthing\ IAQ\ Admin\ App.build/Script-D580E1C7A00E1D53EEBEBA4D.sh\"

cordova plugin lists are below.

cordova-android-firebase-gradle-release 4.0.0 "cordova-android-firebase-gradle-release"
cordova-android-play-services-gradle-release 4.0.0 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release"
cordova-plugin-androidx 2.0.0 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.1 "cordova-plugin-androidx-adapter"
cordova-plugin-background-mode 0.7.3 "BackgroundMode"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-ble-central 1.2.5 "BLE"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-firebasex 10.1.2-cli "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-keyboard 1.2.0 "Keyboard"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
cordova-plugin-splashscreen 6.0.0 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
es6-promise-plugin 4.2.2 "Promise"

After remove cordova-plugin-firebasex plugin, I can see build succeed..
I cannot resolve this issue. Can I get a advice?

@jh-gh
Copy link

jh-gh commented Aug 3, 2020

@Younghun-Jung Yes I have the same problem when trying to build with the command line (using firebasex@10.1.2-cli). The build just hangs. It looks like it may be a cocoapods issue that others have reported elsewhere:

https://sugeul.github.io/2020-06-02-xcodebuild-hang-on-CP-Prepare-artifacts/
CocoaPods/CocoaPods#9857

Unfortunately there doesn't seem to be any official fix available at this point.

I have tried editing the generated "Pods--artifacts.sh file and changing this line:
cat > $ARTIFACT_LIST_FILE
to
:> $ARTIFACT_LIST_FILE

I can then run cordova build ios and it works.

However, as this is a generated file, my change will get overwritten any time cordova recreates the project.

I may consider trying to come up with a cordova hook to do this edit automatically ... but hoping somebody else has a better idea.

@tzappia
Copy link

tzappia commented Aug 21, 2020

I upgraded to CocoaPods latest beta, 1.10.0.beta.2 with sudo gem install cocoapods --pre and the issue was solved. I was previously running 1.9.3 and the line with cat > $ARTIFACT_LIST_FILE was present and causing the hang (cat with no arguments just sits there.) @dpa99c I don't know when the pod issue was introduced, but if you were running an older version of CocoaPods that could be why you were not able to reproduce this.

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

Successfully merging this pull request may close these issues.

6 participants