How to fix Firebase Analytics Plugin install error - firebase

I am trying to install firebase analytics plugin in my ionic project using
sudo ionic cordova plugin add cordova-plugin-firebase-analytics
But i get this as my error and the plugin isnt installed. I have tried pod install and pod update but it still gives the same error
> cordova plugin add cordova-plugin-firebase-analytics
Installing "cordova-plugin-firebase-analytics" for ios
Failed to install 'cordova-plugin-firebase-analytics': undefined
CordovaError: Promise rejected with non-error: '/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /Users/villifixinc/Documents/TravelApp in PATH, mode 040777\n/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:439:in `help!\': \u001b[31m[!] You cannot run CocoaPods as root.\u001b[39m (CLAide::Help)\n\n\u001b[4mUsage:\u001b[24m\n\n $ \u001b[32mpod\u001b[39m \u001b[32mCOMMAND\u001b[39m\n\n CocoaPods, the Cocoa library package manager.\n\n\u001b[4mCommands:\u001b[24m\n\n \u001b[32m+ cache\u001b[39m Manipulate the CocoaPods cache\n \u001b[32m+ env\u001b[39m Display pod environment\n \u001b[32m+ init\u001b[39m Generate a Podfile for the current directory\n \u001b[32m+ install\u001b[39m Install project dependencies according to versions from a\n Podfile.lock\n \u001b[32m+ ipc\u001b[39m Inter-process communication\n \u001b[32m+ lib\u001b[39m Develop pods\n \u001b[32m+ list\u001b[39m List pods\n \u001b[32m+ outdated\u001b[39m Show outdated project dependencies\n \u001b[32m+ repo\u001b[39m Manage spec-repositories\n \u001b[32m+ setup\u001b[39m Setup the CocoaPods environment\n \u001b[32m+ spec\u001b[39m Manage pod specs\n \u001b[32m+ update\u001b[39m Update outdated project dependencies and create new Podfile.lock\n\n\u001b[4mOptions:\u001b[24m\n\n \u001b[34m--silent\u001b[39m Show nothing\n \u001b[34m--version\u001b[39m Show the version of the tool\n \u001b[34m--verbose\u001b[39m Show more debugging information\n \u001b[34m--no-ansi\u001b[39m Show output without ANSI codes\n \u001b[34m--help\u001b[39m Show help banner of specified command\n\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:47:in `run\'\n\tfrom /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>\'\n\tfrom /usr/local/bin/pod:22:in `load\'\n\tfrom /usr/local/bin/pod:22:in `<main>\'\n'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:29:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.
cordova plugin add cordova-plugin-firebase-analytics exited with exit
code 1.
Re-running this command with the --verbose flag may provide more
information.

try installing the older version of the plugin. version 2.0.3 should fix your problem.

Related

How to fix cloud firestore package not installing in flutter project?

Adding firebase cloud firestore to my project dependency packages crashes my apps. I first observed the problem when I was coding along with a youtube tutorial. Now even creating a new flutter project and adding the cloud firestore dependency package then trying to build the app won't work. How to I fix this problem?
Example below is for the app built by flutter on creating a new project with the addition of a cloud firestore dependency package. Any help is appreciated.
Pubspec.yaml
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
cloud_firestore: ^0.13.7
dev_dependencies:
flutter_test:
sdk: flutter
added cloud_firestore: ^0.13.7 to dependencies.
Debug console log
Running pod install... 478.2s (!)
CocoaPods' output:
↳
Invalid plugin specification: DART_DEFINES=flutter.inspector.structuredErrors=true
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
-> Fetching podspec for `cloud_firestore_web` from `.symlinks/plugins/cloud_firestore_web/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
-> Fetching podspec for `firebase_core_web` from `.symlinks/plugins/firebase_core_web/ios`
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
A BoringSSL-GRPC
A Firebase
A FirebaseAnalytics
A FirebaseCore
A FirebaseCoreDiagnostics
A FirebaseFirestore
A FirebaseInstallations
A Flutter
A GoogleAppMeasurement
A GoogleDataTransport
A GoogleUtilities
A PromisesObjC
A abseil
A cloud_firestore
A cloud_firestore_web
A firebase_core
A firebase_core_web
A gRPC-C++
A gRPC-Core
A leveldb-library
A nanopb
Downloading dependencies
[!] Error installing gRPC-Core
[!] /usr/local/bin/git -C /var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v submodule update --init --recursive
Submodule path 'third_party/abseil-cpp': checked out 'b832dce8489ef7b6231384909fd9b68d5a5ff2b7'
Submodule path 'third_party/benchmark': checked out '090faecb454fbd6e6e17a75ef8146acb037118d4'
Submodule path 'third_party/bloaty': checked out '73594cde8c9a52a102c4341c244c833aa61b9c06'
Submodule path 'third_party/boringssl-with-bazel': checked out '1c2769383f027befac5b75b6cedd25daf3bf4dcf'
Submodule path 'third_party/cares/cares': checked out 'e982924acee7f7313b4baa4ee5ec000c5e373c30'
Submodule path 'third_party/envoy-api': checked out '0487bbb43c3e8b54c7332f74ba7344d8265774f7'
Submodule path 'third_party/gflags': checked out '28f50e0fed19872e0fd50dd23ce2ee8cd759338e'
Submodule path 'third_party/gflags/doc': checked out '8411df715cf522606e3b1aca386ddfc0b63d34b4'
Submodule path 'third_party/googleapis': checked out '80ed4d0bbf65d57cc267dfc63bd2584557f11f9b'
Submodule path 'third_party/googletest': checked out 'c9ccac7cb7345901884aabf5d1a786cfa6e2f397'
Submodule path 'third_party/libuv': checked out '15ae750151ac9341e5945eb38f8982d59fb99201'
Submodule path 'third_party/protobuf': checked out 'fe1790ca0df67173702f70d5646b82f48f412b99'
Submodule path 'third_party/protobuf/third_party/benchmark': checked out '5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8'
Submodule path 'third_party/protobuf/third_party/googletest': checked out '5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081'
Submodule path 'third_party/protoc-gen-validate': checked out 'c0a080f4bea50bc087cdd8551143ee538cf3459e'
Submodule path 'third_party/udpa': checked out 'db4b343e48c1264bb4d9ff491b059300701dc7c7'
Submodule path 'third_party/zlib': checked out 'cacf7f1d4e3d44d871b605da3b647f07d718623f'
Submodule 'third_party/abseil-cpp' (https://github.com/abseil/abseil-cpp.git) registered for path 'third_party/abseil-cpp'
Submodule 'third_party/benchmark' (https://github.com/google/benchmark) registered for path 'third_party/benchmark'
Submodule 'third_party/bloaty' (https://github.com/google/bloaty.git) registered for path 'third_party/bloaty'
Submodule 'third_party/boringssl-with-bazel' (https://github.com/google/boringssl.git) registered for path 'third_party/boringssl-with-bazel'
Submodule 'third_party/cares/cares' (https://github.com/c-ares/c-ares.git) registered for path 'third_party/cares/cares'
Submodule 'third_party/envoy-api' (https://github.com/envoyproxy/data-plane-api.git) registered for path 'third_party/envoy-api'
Submodule 'third_party/gflags' (https://github.com/gflags/gflags.git) registered for path 'third_party/gflags'
Submodule 'third_party/googleapis' (https://github.com/googleapis/googleapis.git) registered for path 'third_party/googleapis'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/googletest'
Submodule 'third_party/libuv' (https://github.com/libuv/libuv.git) registered for path 'third_party/libuv'
Submodule 'third_party/protobuf' (https://github.com/google/protobuf.git) registered for path 'third_party/protobuf'
Submodule 'third_party/protoc-gen-validate' (https://github.com/envoyproxy/protoc-gen-validate.git) registered for path 'third_party/protoc-gen-validate'
Submodule 'third_party/udpa' (https://github.com/cncf/udpa.git) registered for path 'third_party/udpa'
Submodule 'third_party/zlib' (https://github.com/madler/zlib) registered for path 'third_party/zlib'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/abseil-cpp'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/benchmark'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/boringssl-with-bazel'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/cares/cares'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/envoy-api'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/gflags'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/googleapis'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/googletest'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/libuv'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protoc-gen-validate'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/udpa'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/zlib'...
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/bloaty/third_party/googletest'
Submodule 'third_party/libFuzzer' (https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer) registered for path 'third_party/bloaty/third_party/libFuzzer'
Submodule 'third_party/re2' (https://github.com/google/re2) registered for path 'third_party/bloaty/third_party/re2'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/googletest'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer'. Retry scheduled
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/re2'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer' a second time, aborting
Submodule 'doc' (https://github.com/gflags/gflags.git) registered for path 'third_party/gflags/doc'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/gflags/doc'...
Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'third_party/protobuf/third_party/benchmark'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/protobuf/third_party/googletest'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf/third_party/benchmark'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf/third_party/googletest'...
Failed to recurse into submodule path 'third_party/bloaty'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:142:in `rescue in execute_command'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:139:in `execute_command'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:166:in `block in executable'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:153:in `target_git'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:114:in `update_submodules'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:101:in `block in clone'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:173:in `block in ui_sub_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:172:in `ui_sub_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:98:in `clone'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:66:in `download!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:82:in `block in download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:157:in `block in ui_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:156:in `ui_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:80:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:108:in `download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:75:in `download_request'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:171:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:154:in `block in uncached_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:181:in `in_tmpdir'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:153:in `uncached_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:42:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer/pod_source_installer.rb:118:in `download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:561:in `install_source_of_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:512:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:511:in `block in install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:494:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:494:in `install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:253:in `block in download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:252:in `download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
Cloning into '/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v'...
Note: checking out 'e122aae3cecae0e6be11b62fbe81eda55e662a02'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
Submodule 'third_party/re2' (https://github.com/google/re2) registered for path 'third_party/bloaty/third_party/re2'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/googletest'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer'. Retry scheduled
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/re2'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer' a second time, aborting
Submodule 'doc' (https://github.com/gflags/gflags.git) registered for path 'third_party/gflags/doc'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/gflags/doc'...
Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'third_party/protobuf/third_party/benchmark'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/protobuf/third_party/googletest'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf/third_party/benchmark'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf/third_party/googletest'...
Failed to recurse into submodule path 'third_party/bloaty'
[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone 11 Pro.
Exited (sigterm)
flutter doctor -v results
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.4 19E287, locale en-ZM)
• Flutter version 1.17.5 at /Users/Silokas_Mac/Developer/flutter
• Framework revision 8af6b2f038 (4 weeks ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/Silokas_Mac/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Xcode 11.6, Build version 11N700h
• CocoaPods version 1.10.0.beta.1
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (2 available)
• sdk gphone x86 • emulator-5554 • android-x86 • Android
10 (API 29) (emulator)
• iPhone 11 Pro • 659FF369-2ED5-4E0D-B5F8-3D19BE86B98F • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
• No issues found! ```
**Pod file**
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
end
generated_key_values
end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENA`enter code here`BLE_BITCODE'] = 'NO'
end
end
end
To use any of the flutterfire plugins it's necessary to include firebase_core as well.
Add
firebase_core: ^0.4.5
to your dependencies. Or find the most recent version on pub.dev.
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^0.13.7 // move to here
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
OR
Try installing Pubspec Assist plugin in your editor for not getting any error.
I ran into this issue today and worked around it by downgrading git from a 2.31.1 variation to version 2.30.1 (Apple Git-130). See the output of git --version.
For a simple reproducible example of the underlying git issue: git clone --verbose https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer
In the log above see
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer'. Retry scheduled
UPDATE: The 2.31.1 git version now works after the owners of https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer ran git gc

How to know which version of Google Firebase plugin to use in Flutter app?

I've been stuck with Gradle not building (working on iOS fine). I struggled because Gradle was giving a generic error, finally got this today:
FAILURE: Build failed with an exception.
* What went wrong: Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[18.0. 0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:18.0.0 -> com.google.firebase:firebase-iid#[18.0.0], but fire base-iid version was 17.1.2.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends on project 'firebase_messaging' which depends onto com.google.firebase:firebase-messaging#18.0. 0
-- Project 'app' depends on project 'firebase_core' which depends onto com.google.firebase:firebase-core#16.0.9 -- Project 'app' depends on project 'firebase_analytics' which depends onto com.google.firebase:firebase-analytics#16.5. 0 -- Project 'app' depends on project 'firebase_remote_config' which depends onto com.google.firebase:firebase-config#16.4 .1 -- Project 'app' depends onto com.google.firebase:firebase-core#16.0.9
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
This was after I took out the version numbers from my pubspec to see if that would help. I don't understand Google's version numbering and I'm not sure which versions of plugins I should be installing as it has caused conflicts in the past:
dependencies:
flutter:
sdk: flutter
http:
cached_network_image:
flutter_cache_manager:
carousel_pro:
cloud_firestore:
firebase_core:
firebase_remote_config:
dynamic_theme:
flutter_signin_button:
shared_preferences:
share:
flutter_search_bar:
google_sign_in:
#flutter_facebook_login:
flutter_html:
requests:
webview_flutter:
flutter_webview_plugin:
firebase_analytics:
flutter_app_badger: #for launcher badge icon (notifications)
uuid:
font_awesome_flutter:
device_info:
carousel_slider:
flutter_spinkit:
flutter_typeahead:
firebase_messaging:
html_unescape:
flutter_masked_text:
configurable_expansion_tile:
stripe_payment:
square_in_app_payments:
Google doesn't seem to maintain consistent version numbering and by taking out the version numbers I thought it would at least take the latest version of the plugins which theoretically should work. So, how can I solve this?
You should begin by putting the version number back in there.
This is an issue with firebase / play services versions being mismatched so you know for sure the other plugins in your pubspec.yaml are fine.
The dependancy which is failing is firebase messaging.
It's using many words to tell you
com.google.firebase:firebase-messaging:18.0.0 package depends on com.google.firebase:firebase-iid#[18.0.0]
but it's only finding 17.1.2.
You need
com.google.firebase:firebase-core#16.0.9
com.google.firebase:firebase-analytics#16.5.0
com.google.firebase:firebase-config#16.4.1
in the future, if you are having version issues check the specific packages GitHub issues to see if there's anything currently wrong with the version you're on. This will save you a lot of time.
I wouldn't recommend removing version numbers from your pubsepc.yaml but if you type
firebase_messaging: any
It will get a compatible version for you.
The error you are getting is not necessarily from the packages you have listed in pubspec.yaml. It is referring to the dependencies on build.gradle.
Google has no issue with the version numbers. There is a difference between the versions of packages i.e what you have listed on pubspec.yaml and the dependencies on app/build.gradle. It would be wise to reconsider the number of packages you use as every package has a dependency and you may end up in a sticky situation where multiple packages are conflicting. In addition you end up with a bloated solution for minimal functionality.
Removing version numbers will not help as some packages are incompatible. I would suggest you start with the packages you require i.e the firebase which from experience have no issues then incrementally add if necessary.

Ionic3 Execution failed for task ':app:transformClassesWithDexBuilderForDebug'

I have been dealing with this for the past 2 weeks now.I'm building an application with Ionic3. Everything worked fine, Untill I install phonegap push plugin. Then I start to get this error
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'. > com.android.build.api.transform.TransformException: java.lang.IllegalStateExce ption: Dex archives: setting .DEX extension only for .CLASS files
I have made research about this and none of the solution seemed to work for me. I have done below to app level build.gradle
defaultConfig {
multiDexEnabled true
}
i also added below code
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
Then I started gettin below error
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> java.io.IOException: Can't write
[C:\ionic\brinmiz\platforms\android\app\build
\intermediates\multi-dex\debug\componentClasses.jar] (Can't read
[C:\ionic\brinmiz\platforms\android\app\build\intermediates\transforms\desugar\debug\17.jar(;;;;;;**.class)] (Duplicate zip entry [17.jar:android/support/v4/media/RatingCompat$1.class]))
This is my Ionic info
cli packages:
#ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.0.2
Node : v6.10.2
npm : 3.10.10
OS : Windows 8
Environment Variables:
ANDROID_HOME : C:\Users\Dd\AppData\Local\Android\sdk
Misc:
backend : legacy
Like I said, I have been on this for the past 2 weeks. I really need your solution
As explained here by the official documentation of Push Plugin, there is a known incompatibility between Push Plugin and another plugins that "are using an outdated way to declare dependencies such as android-support or play-services-gcm".
You can try to install cordova-android-support-gradle-release that will align various versions of the Android Support libraries specified by other plugins to a specific version.
cordova plugin add cordova-android-support-gradle-release --fetch
Also you can try to downgrade your cordova-android from 7.0.0 to 6.3.0 because there are also known issues with 7.x+. Delete your plugin folder(make sure you have all of them declared in config.xml) and run:
cordova platforms rm android
cordova platforms add android#6.3.0
If nothing do the job, update your answer with all the plugins used by your application using the next command and I will try to debug for you.
cordova plugin ls

CordovaError: Platform ios already added

I am running on OS X El Capitan. I am working with VSTS and have the TACO plug installed and also have an ios agent running.
I am following these steps trying to build for IOS.
https://www.visualstudio.com/en-us/docs/build/apps/mobile/cordova-build
I have an agent running in interatice mode:
https://www.visualstudio.com/en-us/docs/build/admin/agents/v2-osx
However, the Cordova build step is failing and I cannot understand why after checking all the steps a few times. See bolded error.
***************************************************************************** Finishing: npm install
****************************************************************************** Starting: Cordova Build ios
============================================================================== Task : Cordova Build Description : Build a hybrid app project
based on the Cordova CLI, Ionic CLI, TACO CLI, or other
Cordova-compliant CLI Version : 1.3.9 Author : Microsoft
Corporation Help : More
Information
============================================================================== DEVELOPER_DIR was undefined DEVELOPER_DIR for build set to
/Applications/Xcode8.0.app/Contents/Developer Input to
determineIdentity:
1 valid identities found
XXX
(YGKU7EWJD4)","keychain":"/Users/jordanmc/Documents/repos/myApp/1/s/_tasktmp.keychain"}
Input to determineProfile:
XXX Got rid of som sensitive info
Module cache at /Users/jordanmc/.taco_home/node_modules cordova
already installed. Adding Xcconfig update hook Module cache at
/Users/jordanmc/.taco_home/node_modules cordova already installed.
Adding support plugin. cp: no such file or directory:
/Users/jordanmc/Documents/repos/myApp/resources/ios/icon/icon-40#3x.png
cp: no such file or directory:
/Users/jordanmc/Documents/repos/myApp/resources/ios/icon/icon-83.5#2x.png
Removing Xcconfig update hook { CordovaError: Platform ios already
added.
at /Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/cordova-lib/src/cordova/platform.js:130:31
at _fulfilled (/Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:749:13)
at /Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:557:44
at flush (/Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7) Task failed
> at process._tickCallback (internal/process/next_tick.js:98:9) name: 'CordovaError', message: 'Platform ios already added.',
code: 0, context: undefined }
****************************************************************************** Finishing: Cordova Build ios
****************************************************************************** Starting: Post Job Cleanup
****************************************************************************** Cleaning any cached credential from repository: XXX
****************************************************************************** Finishing: Post Job Cleanup
****************************************************************************** Finishing: Build
I have this configured:
Any help would be great!

EXC_BAD_ACCESS code=2 on including Firebase/Auth in Podfile

I am getting EXC_BAD_ACCESS after including 'Firebase/Auth' in Podfile. This happens without adding any line of firebase code. I am using swift3 on xcode 8 and the resultant pods are -
Installing Firebase (3.8.0)
Installing FirebaseAnalytics (3.5.1)
Installing FirebaseAuth (3.0.6)
Installing FirebaseCore (3.4.4)
Installing FirebaseInstanceID (1.0.8)
Using GTMOAuth2 (1.1.4)
Using GTMSessionFetcher (1.1.7)
Using GoogleAppUtilities (1.1.2)
Installing GoogleInterchangeUtilities (1.2.2)
Using GoogleSignIn (4.0.1)
Using GoogleSymbolUtilities (1.1.2)
Installing GoogleToolboxForMac 2.1.0 (was 2.1.0)
Using Localize-Swift (1.6)
Using ProtocolBuffers-Swift (3.0.6)
Using QorumLogs (0.9)
The error comes in Thread 1 in [UIViewController(FIRAScreenClassName) fira_viewDidAppear:]:
This happens only if the pod target is itself a framework which is embedded in an app eventually.
I do have Google analytics as well. Is it because ARC is not enabled? How do I do that on xcode-8?
Any other options to try?
There appears to be a problem in the latest Firebase/Core (3.8.0) release. Even #IBDesignable was crashing with a recursive call to the method signature you mentioned.
You have a couple of options:
In Info.plist (app), set FirebaseAutomaticScreenReportingEnabled to NO (bool). This solved the problem for my running application, but IBDesignable resources caused this error on build:
file:///path/to/project/Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for UIViewController (svZ-78-1Mn): The agent crashed
You may want to temporarily downgrade to 3.7.1, for example,
pod 'Firebase/Core', '~> 3.7.1'
pod 'Firebase/Auth'
pod 'Firebase/Database'
The rest of the dependencies should take care of themselves when you run pod update.
I made a silly mistake. Never turned on Google under Authentication -> Sign in methods on Firebase
I am suspecting that the Podfile is not correct. I got into similar problem by adding Firebase dependency into a framework and I ran into the problem like this
objc[12345]: Class FIRAAppEnvironmentUtil is implemented in both
/Users/...Build/Products/Debug-iphonesimulator/SomeFramework.framework/SomeFramework
(0x105ef7fc8) and /Users/.../CurrentProject.app/CurrentProject
(0x105945108). One of the two will be used. Which one is undefined.
As mentioned in this post, you might have duplicate dependencies in different targets which could lead to weird bug like this. Adding Firebase pod into the main target and removing the Firebase pod from the framework fixed the problem for me.

Resources