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

Could not compile on IOS - InAppMessagingDisplayResources.bundle missing #326

Closed
sebastian-zarzycki-apzumi opened this issue Mar 4, 2020 · 74 comments
Labels
bug Something isn't working properly build issue An issue related to build process Firebase SDK Relates to the Firebase SDK library which this plugin wraps ios relates to iOS platform

Comments

@sebastian-zarzycki-apzumi
Copy link

sebastian-zarzycki-apzumi commented Mar 4, 2020

Bug Report

Current behavior:

When creating a prod build (Ionic), it crashes with:

error: Resource "/Users/rattkin/Library/Developer/Xcode/DerivedData/driverhood-fdggvwggwpvrhxbzlvxxdbhztdnu/Build/Products/Debug-iphonesimulator/FirebaseInAppMessaging/InAppMessagingDisplayResources.bundle" not found. Run 'pod install' to update the copy resources script.

The following build commands failed:
	PhaseScriptExecution [CP]\ Copy\ Pods\ Resources /Users/rattkin/Library/Developer/Xcode/DerivedData/driverhood-fdggvwggwpvrhxbzlvxxdbhztdnu/Build/Intermediates.noindex/driverhood.build/Debug-iphonesimulator/driverhood.build/Script-53D89128D701315A18804F16.sh

xcodebuild: Command failed with exit code 65

I did pod install in platforms/ios but it didn't change anything. Also did pod repo update.

Looks like a problem with Firebase/InAppMessaging pod?

Expected behavior:
It should compile properly.

Steps to reproduce:
ionic cordova build ios --prod

Environment information

  • Cordova CLI version
    9.0.0 (cordova-lib@9.0.1)
  • Cordova platform version
Installed platforms:
  android 8.1.0
  browser 6.0.0
  ios 5.1.1
Available platforms: 
  electron ^1.0.0
  osx ^5.0.0
  windows ^7.0.0
  • Plugins & versions installed in project (including this plugin)
call-number 0.0.2 "Cordova Call Number Plugin"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-facebook4 6.3.0 "Facebook Connect"
cordova-plugin-firebasex 8.1.1 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-googleplus 8.4.0 "Google SignIn"
cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
cordova-plugin-market 1.2.0 "Market"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-sign-in-with-apple 0.0.1 "cordova-plugin-sign-in-with-apple"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-x-socialsharing 5.6.4 "SocialSharing"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-deeplinks 1.0.20 "Ionic Deeplink Plugin"
uk.co.workingedge.phonegap.plugin.launchnavigator 5.0.4 "Launch Navigator"
  • Dev machine OS and version, e.g.
    mac OS 10.15.3 Catalina

iOS build issue:

  • Node JS version
    v10.18.1
  • XCode version
    11.3.1
@sebastian-zarzycki-apzumi
Copy link
Author

Works when I revert cordova-plugin-firebasex version to 8.0.1. In-app messaging support in recent releases must have broken something.

@jrista
Copy link

jrista commented Mar 4, 2020

Also encountering the same issue. Tried running pod repo update and pod install in the cocoapods preparation phase of my CI build as well, to no avail:

      - run:
          name: Ionic - Prepare Cordova iOS & CocoaPods Dependencies
          command: |
            ionic cordova prepare ios --confirm --no-build
            cd platforms/ios/
            pod dependencies
            ionic cordova plugin rm cordova-plugin-firebasex
            ionic cordova plugin add cordova-plugin-firebasex
            ionic cordova prepare ios --confirm --no-build
            pod repo update
            pod install

Getting this plugin working is, as you can see above, a major chore. CocoaPods' pod dependencies cannot be run unless the plugin is present, however the initial install of the plugin fails because CocoaPods is not installed properly. So one must first prep the cordova platform and install the plugin (in a failed state), do pod dependencies, then remove the plugin, add it back, re-prepare the platform, and now it seems also pod repo update and then run pod install...

There has got to be an easier way to get this plugin working... O-o

In the full error report:

PhaseScriptExecution [CP]\ Copy\ Pods\ Resources /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/Script-4C9A577E4E098CD9C9C43025.sh (in target 'WICShopper' from project 'WICShopper')
    cd /Users/distiller/project/platforms/ios
    /bin/sh -c /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/Script-4C9A577E4E098CD9C9C43025.sh
error: Resource "/Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Products/Release-iphonesimulator/FirebaseInAppMessaging/InAppMessagingDisplayResources.bundle" not found. Run 'pod install' to update the copy resources script.

Running the recommended command, pod install, does not seem to have any effect. I've looked for the specified .bundle file, and I cannot find it anywhere. The plugin does seem to have broken in the latest release.

@sebastian-zarzycki-apzumi
Copy link
Author

sebastian-zarzycki-apzumi commented Mar 4, 2020

The bundle is there, in the platforms/ios/build directory, but it's "flat", instead of sitting in a subdirectory called FirebaseMessaging or something like that. It's like either the referencing script has the wrong path, or the bundle isn't landing in the right spot.

@jrista
Copy link

jrista commented Mar 4, 2020

I've tried to move back to version 8.0.1, but I am still having build problems. The current build error is this, which occurs whether I run pod install or not:

PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/Script-6CDB74AC9D91AFB94F3486DA.sh (in target 'WICShopper' from project 'WICShopper')
    cd /Users/distiller/project/platforms/ios
    /bin/sh -c /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/Script-6CDB74AC9D91AFB94F3486DA.sh
diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

This issue has left us dead in the water and unable to progress with our development. Any chance we could get some insight from the plugin authors?

@sebastian-zarzycki-apzumi
Copy link
Author

Clean and reset the whole project, I suppose?

@jrista
Copy link

jrista commented Mar 4, 2020

Every build in our CI is from a clean slate. We pull the repo, then run the necessary ionic/cordova commands to prepare, install plugins, etc. from scratch. We don't check in our platforms or plugins directories (one of the reasons we've stuck with Cordova, rather than move to Capacitor, as Capacitor usually requires that you fiddle with low-level native code and you end up having to check it all in...bleh. :P)

@sebastian-zarzycki-apzumi
Copy link
Author

Are you using the modern build system for XCode, or legacy build system? Do you still have cordova-plugin-cocoapodsx in your project? It was dropped some time ago and maybe it clashes with something, if it's still left.

@jrista
Copy link

jrista commented Mar 4, 2020

This is a relatively new project, started late last year with Ionic 4 and Cordova 9. It doe snot use cocoapodsx.

The project worked fine until last week, then it suddenly broke. We've been developing and deploying builds for several months, until maybe mid-week last week. The only change appears to be FirebaseX.

@jrista
Copy link

jrista commented Mar 4, 2020

I have now tried several previous versions of the plugin. I restored our CI build script to what it used to be, before I started fiddling with it to try and resolve this issue. We originally started with v7.0.1 of this plugin back in November last year. I've tried 7.0.1, 7.0.2, 8.0.0 and 8.0.1. All of these versions result in this same error:

CompileC /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/Objects-normal/x86_64/FirebasePlugin.o /Users/distiller/project/platforms/ios/WICShopper/Plugins/cordova-plugin-firebasex/FirebasePlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'WICShopper' from project 'WICShopper')
    cd /Users/distiller/project/platforms/ios
    export LANG=en_US.US-ASCII
    /Applications/Xcode-11.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios11.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/distiller/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/distiller/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wunreachable-code -Wno-implicit-atomic-properties -Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode-11.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/WICShopper-generated-files.hmap -I/Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/WICShopper-own-target-headers.hmap -I/Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/WICShopper-all-target-headers.hmap -iquote /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/WICShopper-project-headers.hmap -I/Users/distiller/project/platforms/ios/build/emulator/include -I/Users/distiller/project/platforms/ios/build/emulator/usr/local/lib/include -I/Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/UninstalledProducts/include -I/Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/UninstalledProducts/iphonesimulator/include -I/Users/distiller/project/platforms/ios/build/emulator -I/Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/DerivedSources-normal/x86_64 -I/Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/DerivedSources/x86_64 -I/Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/DerivedSources -F/Users/distiller/project/platforms/ios/build/emulator -include /Users/distiller/project/platforms/ios/build/sharedpch/SharedPrecompiledHeaders/749132040139485224/WICShopper-Prefix.pch -MMD -MT dependencies -MF /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/Objects-normal/x86_64/FirebasePlugin.d --serialize-diagnostics /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/Objects-normal/x86_64/FirebasePlugin.dia -c /Users/distiller/project/platforms/ios/WICShopper/Plugins/cordova-plugin-firebasex/FirebasePlugin.m -o /Users/distiller/Library/Developer/Xcode/DerivedData/WICShopper-bvrgbdzwowyexyasjjjdflehrghx/Build/Intermediates.noindex/WICShopper.build/Release-iphonesimulator/WICShopper.build/Objects-normal/x86_64/FirebasePlugin.o
/Users/distiller/project/platforms/ios/WICShopper/Plugins/cordova-plugin-firebasex/FirebasePlugin.m:4:9: fatal error: 'Firebase.h' file not found
#import "Firebase.h"
        ^~~~~~~~~~~~

If I run pod install, I get the error I previously reported, about Podfile.lock and Manifest.lock missing.

We are completely dead in the water here.

@dpa99c
Copy link
Owner

dpa99c commented Mar 4, 2020

Upon investigation, it seems this error only occurs when building from the CLI (via the xcodebuild tool) - building from Xcode works fine (hence - since I always build in Xcode - this issue was missed).
For comparison here's the (failed) CLI build console output) vs the (successful) Xcode build console output.

As to why this error should occur, I currently have no idea.
The Inapp Messaging component was added by merging PR #312 and on the face of it is a simple addition - just the addition of a Firebase SDK component via its Cocoapods reference with no associated plugin code changes.
The CLI build fails because InAppMessagingDisplayResources.bundle was not found. This seems be be an implicit component of the Firebase SDK (vs something which is explicitly specified by this plugin).
Hence there doesn't seem to be much that can be done from the plugin to resolve this short of removing the Inapp Messaging component of the Firebase SDK from this plugin, which of course will lose that associated functionality.

In the meantime, the workaround is to build from Xcode rather than the CLI.

@dpa99c
Copy link
Owner

dpa99c commented Mar 4, 2020

I tried updating the podspecs to reference the latest v6.18.0 release of the Firebase SDK for iOS but the issue still occurs when building from the CLI 😞

@jrista
Copy link

jrista commented Mar 4, 2020

We don't have the option of building with XCode in our CI (Continuous Integration) build. It has to be command line. So that cannot be the recommended solution. Both old versions, and the current version, are currently broken. I don't know if that is because of a Firebase SDK update that has broken all versions prior to 8.1.1, or something else...but we use Firebase Analytics and Cloud Messaging, and currently our development is halted because of the changes here.

Is there some way to get the previous version, 8.0.1, working without running into either of the errors I've posted above? We don't need In-App Messaging, but it doesn't seem as though 8.0.1 builds at the command line any better than 8.1.1...

@jrista
Copy link

jrista commented Mar 4, 2020

I tried updating the podspecs to reference the latest v6.18.0 release of the Firebase SDK for iOS but the issue still occurs when building from the CLI 😞

Would it be possible to reference a previous version? Any chance we could get an 8.0.2 that references the same version of the SDK that worked prior to 8.1.1?

@dpa99c
Copy link
Owner

dpa99c commented Mar 4, 2020

v8.0.1 builds fine from the CLI - see this console output from my build.

It's the addition of the Inapp Messaging component that has caused the issue with CLI builds on iOS.

@jrista
Copy link

jrista commented Mar 4, 2020

Ok. I had to find and update all version references to the firebasex plugin and set them to 8.0.1, and explicitly reference 8.0.1 when I reinstall the plugin, after uninstalling it (because the first install of the plugin fails due to pods not being installed, but pods can't be installed until the plugin is installed...), before updating the pods, to get everything to work. Once I had all the version numbers configured explicitly to 8.0.1 in all places, the build finally started to work.

@dpa99c
Copy link
Owner

dpa99c commented Mar 5, 2020

TL;DR: if building using the CLI, pin version 8.0.1 until such time as a patch release can be done to fix this issue with 8.1.x
If building with Xcode, you should be fine to update to latest v8.1.1

@dpa99c dpa99c added build issue An issue related to build process Firebase SDK Relates to the Firebase SDK library which this plugin wraps investigate Issue requires investigation ios relates to iOS platform labels Mar 5, 2020
@dpa99c
Copy link
Owner

dpa99c commented Mar 6, 2020

It seems this issue is not specific to this plugin or to the particular version of the Inapp Messaging SDK component it references:
I am able to reproduce the issue with cordova-plugin-firebase-inappmessaging (which pulls in Firebase/InAppMessagingDisplay v6.3.0) using the following commands:

cordova create test && cd test
cordova plugin add cordova-plugin-firebase-inappmessaging
cordova platform add ios
cordova build ios

which (as this console output demonstrates) fails with the same error:

error: Resource "/Users/dave/Library/Developer/Xcode/DerivedData/HelloCordova-gvppvcmxenjfsnfvmssmvbuwhnay/Build/Products/Debug-iphonesimulator/FirebaseInAppMessagingDisplay/InAppMessagingDisplayResources.bundle" not found. Run 'pod install' to update the copy resources script.

as with this plugin, building in Xcode is successful

@Javinator9889
Copy link

I have pinned version 8.0.1 but I still have errors - the problem is that FirebaseCore.h is not found (as mentioned in #330)
Looks like it is a problem with headers or something similar. The command I am running is:

xcodebuild -j "$(sysctl -n hw.ncpu)" \
           -project "platforms/ios/app.xcodeproj" \
           -scheme "app-scheme" \
           -configuration Release clean archive \
           -archivePath "platforms/ios/app.xcarchive" \
           PROVISIONING_PROFILE="$uuid_dbg" \
           CODE_SIGN_IDENTITY="$identity_dbg"

Any hint on how can I solve this problem?

@dpa99c
Copy link
Owner

dpa99c commented Mar 6, 2020

@Javinator9889 looks like you are invoking xcodebuild directly?

Rather than via the Cordova CLI which generates something like:

xcodebuild -workspace FirebaseTest.xcworkspace -scheme FirebaseTest -configuration Debug -sdk iphonesimulator -destination platform=iOS Simulator,name=iPhone 11 Pro Max build CONFIGURATION_BUILD_DIR=/Users/dave/Documents/projects/@scratch/cordova-plugin-firebasex-test/platforms/ios/build/emulator SHARED_PRECOMPS_DIR=/Users/dave/Documents/projects/@scratch/cordova-plugin-firebasex-test/platforms/ios/build/sharedpch

Direct invocation of xcodebuild isn't something I can directly support in the context of this plugin as there's too many potential variations.

All I can say is that the example project builds fine with v8.0.1 via the Cordova CLI and fine with v8.1.1 via Xcode, so use that as a working reference.

@Javinator9889
Copy link

@dpa99c I will have a look at using Cordova CLI - thanks in advance :)

@Javinator9889
Copy link

@dpa99c I'm getting into Cordova for the first time - I've been working on a project for a time.

Would you mind if I ask you to guide me on how to create an xcarchive using Cordova CLI?

@dpa99c
Copy link
Owner

dpa99c commented Mar 6, 2020

cordova build ios --device --release
stat platforms/ios/<YourAppName>.xcarchive

@Javinator9889
Copy link

@dpa99c It worked 😮

Thank you so much <3

@maxtacco
Copy link

@dpa99c Hi, it looks like InAppMessaging and GoogleTagManager were merged back into 9.0.3-cli branch from master in b21213f. As a result we started to get this error again.

@Phrensoua
Copy link

Phrensoua commented Apr 27, 2020

@dpa99c, @maxtacco, I do too.

`cd [MYPATH]/platforms/ios
/bin/sh -c [MYPATH]/Library/Developer/Xcode/DerivedData/[APPNAME]-aanowkqndskebrfkxmvdfhcnksye/Build/Intermediates.noindex/[APPNAME].build/Debug-iphonesimulator/[APPNAME].build/Script-2DD7BADC130A1BDEF45FCB72.sh
error: Resource "[MYPATH]/Library/Developer/Xcode/DerivedData/[APPNAME]-aanowkqndskebrfkxmvdfhcnksye/Build/Products/Debug-iphonesimulator/FirebaseInAppMessaging/InAppMessagingDisplayResources.bundle" not found. Run 'pod install' to update the copy resources script.

** BUILD FAILED **

The following build commands failed:
PhaseScriptExecution [CP]\ Copy\ Pods\ Resources [MYPATH]/Library/Developer/Xcode/DerivedData/[APPNAME]-aanowkqndskebrfkxmvdfhcnksye/Build/Intermediates.noindex/[APPNAME].build/Debug-iphonesimulator/[APPNAME].build/Script-2DD7BADC130A1BDEF45FCB72.sh
(1 failure)
xcodebuild: Command failed with exit code 65`

I am using a cordova webpack plugin and I prefer to use CLI.

Cheers!

*** edit ***

I did @orenagiv 's trick and it worked. Looks like backtracking to cordova-plugin-firebasex@9.0.1-cli did it form me. Thanks!

@Phrensoua
Copy link

@jh-gh Did you get it to compile faster? For me, on my Macbook Air 2012 it takes 23 mins with CLI (cordova run ios) to start!! And it always seem to rebuild all.

Cheers.

@jh-gh
Copy link

jh-gh commented Apr 28, 2020

@Phrensoua No, I have not found any way to make it compile faster on the 9.X stream. I am still staying with 8.0.1 for now as that version still builds in a reasonable amount of time for ios whereas the 9.0.1-cli version takes 4 times as long to build (haven't tried any later 9.X versions).

@ilclaudio
Copy link

I noticed a comment above from @patrickchoi suggesting that the jump in build times came with between 8.0.1 and 8.1.0. I tried downgrading to 8.0.1 and indeed this builds successfully and dramatically faster. For now I will go with this version (8.0.1) as I don't need any of the features in later releases and the increased build times are a big issue, especially in our CI environment where we use relatively underpowered mac minis.

Excuse me @jh-gh did you solve the problem just removing the plugin and installing it again in this way?

cordova plugin add cordova-plugin-firebasex@8.0.1

@ilclaudio
Copy link

cordova platform remove ios;
cordova platform add ios@latest;
cordova plugin remove cordova-plugin-firebasex;
cordova plugin add cordova-plugin-firebasex@9.0.1-cli;

Thank you @orenagiv this worked for me.

@Phrensoua
Copy link

@jh-gh, thank you for your reply. On my side, I have resolved to execute into Xcode for now. It doesn't rebuild all every time at least...

Cheers

@jh-gh
Copy link

jh-gh commented Apr 30, 2020

I noticed a comment above from @patrickchoi suggesting that the jump in build times came with between 8.0.1 and 8.1.0. I tried downgrading to 8.0.1 and indeed this builds successfully and dramatically faster. For now I will go with this version (8.0.1) as I don't need any of the features in later releases and the increased build times are a big issue, especially in our CI environment where we use relatively underpowered mac minis.

Excuse me @jh-gh did you solve the problem just removing the plugin and installing it again in this way?

cordova plugin add cordova-plugin-firebasex@8.0.1

@ilclaudio I updated the dependency version in package.json and did a clean build (rm node_modules, npm install, rm platforms/plugins, (ionic) cordova build ios).

@Crypt0Graphic
Copy link

Crypt0Graphic commented May 11, 2020

I had similar problems and solved them by switching to version 9.0.1-cli.

However, this caused the IOS build time to increase by over 400% (compared to version 6.1.0 of the plugin). I verified a similar increase when compiling the sample app with these two versions.

I noticed a comment above from @patrickchoi suggesting that the jump in build times came with between versions 8.0.1 and 8.1.0. I tried downgrading to 8.0.1 and indeed this builds successfully and dramatically faster. For now I will go with this version (8.0.1) as I don't need any of the features in later releases and the increased build times are a big issue, especially in our CI environment where we use relatively underpowered mac minis.

Does anybody know if there is any way to mitigate the build time slowdown in the latest versions of the plugin? I realise this is probably not an issue with the plugin itself ... more with Firebase sdk components (??) Is there any way to tweak this at build time (and ideally drive this from a setting/script/cli)?

I got build problem with 9.1.1 also but build with 9.1.1-cli was successful. These versions have same build time problem. It tooks maybe 15-20 minutes. So i downgraded 8.0.1 and built in 2-3 minutes. Thank you for test and 8.0.1 tip.

@simmunoz
Copy link

@orenagiv
THNKS!
ionic cordova plugin add cordova-plugin-firebasex@9.0.1-cli

it worked perfect, compilation time is the only problem currently

@sebastian-zarzycki-apzumi
Copy link
Author

Protip: don't pin it like so:
"cordova-plugin-firebasex": "^9.1.1-cli"
as it will default to the non-cli. Use it directly.
"cordova-plugin-firebasex": "9.1.1-cli"

Seems obvious, but I've lost some time today scratching my head, why it still throws the old error.

@sboudouk
Copy link

sboudouk commented Jun 4, 2020

Is there a difference between building by using CLI cordova run ios --device and by Xcode ?

@dpa99c
Copy link
Owner

dpa99c commented Jun 4, 2020

@sboudouk yes, currently building a pod that contains subfolders (such as Google Tag Manager or Firebase Inappmessaging) fails using the Cordova CLI (as documented here) whereas it works fine when building in Xcode, hence the need for a -cli branch of this plugin.

@zdm
Copy link

zdm commented Jul 14, 2020

Is it possible to provide package with the "latest-cli" tag?

@astromatrix
Copy link

Hi

I have a big issue with this plugin on ios when compiling. I didnt want to start a new thread as i dont think its an issue with the plugin but with the pods library. It creates a build error saying disk full on various stages of the build. I am using a remote mac server and their support cant help me apart from creating a new server which i could do but i feel it maybe the same problem. I think its a ram disk full issue as this pod library is massive and makes the compile time take alot longer. I have searched online for something to fix this issue cleaning up the xcode build etc but i am still unable to create this build. Is there someone who can direct me to a solution to why its giving this error and what i can do to fix it? The build works fine and fast without this plugin

Here is an example
error: accessing build database
"/Users/user915171/Library/Developer/Xcode/DerivedData/Astra-albjvigcqvqixkbzncjokuhaaees/Build/Intermediates.noindex/XCBuildData/build.db": database or disk is full

@kingkarki
Copy link

Anyone having this issue please add following plugin with same version:
cordova-plugin-androidx-adapter 1.1.1
cordova-plugin-androidx 1.0.2
cordova-plugin-firebasex 9.0.1-cli

cordova-plugin-androidx and cordova-plugin-androidx-adapter are needed for this plugin.

@hcassar93
Copy link

Hey

Having similar issues building with the cordova cli. However I have not been able to resolve them by changing to any -cli version of the plugin. Or by downgrading to 8.0.1 which was previously working for me.

My builds always fails with the following message regardless of which version of the plugin I use now. If i remove the plugin completely the build succeeds.

Not sure how these pods are still sneaking into my build even when using the -cli plugin or the 8.0.1 plugin. Will post if I find a solution. If anyone has seen this issue please let me know.


While building module 'nanopb' imported from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
In file included from :1:
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:13:9: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb.h"
^~~~~~
<pb.h>
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:14:9: error: double-quoted include "pb_common.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb_common.h"
^~~~~~~~~~~~~
<pb_common.h>
While building module 'nanopb' imported from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
In file included from :1:
In file included from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:14:
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/nanopb/pb_common.h:8:10: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#include "pb.h"
^~~~~~
<pb.h>
While building module 'nanopb' imported from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
In file included from :1:
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:15:9: error: double-quoted include "pb_decode.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb_decode.h"
^~~~~~~~~~~~~
<pb_decode.h>
While building module 'nanopb' imported from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
In file included from :1:
In file included from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:15:
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/nanopb/pb_decode.h:9:10: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#include "pb.h"
^~~~~~
<pb.h>
While building module 'nanopb' imported from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
In file included from :1:
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:16:9: error: double-quoted include "pb_encode.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb_encode.h"
^~~~~~~~~~~~~
<pb_encode.h>
While building module 'nanopb' imported from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
In file included from :1:
In file included from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:16:
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/nanopb/pb_encode.h:9:10: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#include "pb.h"
^~~~~~
<pb.h>
While building module 'nanopb' imported from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:
In file included from :1:
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:17:9: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb.h"
^~~~~~
<pb.h>
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:18:9: error: double-quoted include "pb_decode.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb_decode.h"
^~~~~~~~~~~~~
<pb_decode.h>
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:19:9: error: double-quoted include "pb_common.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb_common.h"
^~~~~~~~~~~~~
<pb_common.h>
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:20:9: error: double-quoted include "pb.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb.h"
^~~~~~
<pb.h>
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:21:9: error: double-quoted include "pb_encode.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb_encode.h"
^~~~~~~~~~~~~
<pb_encode.h>
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/Target Support Files/nanopb/nanopb-umbrella.h:22:9: error: double-quoted include "pb_common.h" in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import "pb_common.h"
^~~~~~~~~~~~~
<pb_common.h>
13 errors generated.
In file included from /Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.c:20:
/Users/haydencassar/Code/AppTemplate/frontend/platforms/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:10: fatal error: could not build module 'nanopb'
#include <nanopb/pb.h>

14 errors generated.

** ARCHIVE FAILED **


The following build commands failed:
   CompileC /Users/haydencassar/Library/Developer/Xcode/DerivedData/Vita_Plan-adyddjnjkyhpbddfhgtvyhypkbaq/Build/Intermediates.noindex/ArchiveIntermediates/Vita\ Plan/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/GoogleDataTransport.build/Objects-normal/armv7/cct.nanopb.o GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.c normal armv7 c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
       
       cordova build ios --debug --device --buildConfig ./platforms/ios/build.json exited with exit code 65.

@jh-gh
Copy link

jh-gh commented Oct 15, 2020

@hcassar93 I have seen similar problems. I suggest that you try upgrading your cocoapods installation to the pre-release version (see https://stackoverflow.com/questions/63646607/xcode-12-using-firebase-pods-lexical-or-preprocessor-issue-pb-h-file-not-fou/63648164#63648164). That fixed it for me.

@hcassar93
Copy link

@jh-gh Thanks so much. Really appreciate your help. Fixed it for me too.

@maswerdna
Copy link

Pinning the plugin version at 8.0.1 works for me too. Building from the CLI and CI.

@sebastian-zarzycki-apzumi
Copy link
Author

@EinfachHans
Copy link

I'm trying to follow the thread here, can anyone answer me: Using the CLI branch don't include the Firebase Inapp Messaging and Google Tag Manager SDK components. What does this result in? Any features lost in the final app hen in compare to the not cli version?

@maswerdna
Copy link

I'm trying to follow the thread here, can anyone answer me: Using the CLI branch don't include the Firebase Inapp Messaging and Google Tag Manager SDK components. What does this result in? Any features lost in the final app hen in compare to the not cli version?

@EinfachHans it means that both features would not be available in your app but you do not have to worry about this if you do not use either of those features. Your app would still work fine.

Inappmessaging is used to deliver interactive popups or notifications to your app users while they're on the app and GTM is used to maintain tracking across your apps and websites.

@tzappia
Copy link

tzappia commented Dec 6, 2022

@dpa99c interestingly, as of v15.0.0 of this plugin, I no longer need to use the -cli branch to get my builds working from the CLI. I had been using the -cli branch and accidentally installed the main branch when upgrading and noticed my builds were still successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly build issue An issue related to build process Firebase SDK Relates to the Firebase SDK library which this plugin wraps ios relates to iOS platform
Projects
None yet
Development

No branches or pull requests