Git Product home page Git Product logo

firebase / firebase-cpp-sdk Goto Github PK

View Code? Open in Web Editor NEW
268.0 50.0 98.0 50.73 MB

Firebase C++ SDK

Home Page: http://firebase.google.com

License: Apache License 2.0

CMake 3.67% C++ 75.39% Objective-C 5.42% Objective-C++ 6.03% Java 3.40% Python 4.77% C 0.20% Shell 0.73% Batchfile 0.03% Ruby 0.15% Swift 0.15% Kotlin 0.03% JavaScript 0.02%
cpp firebase firebase-database firebase-auth firebase-authentication firebase-functions firebase-realtime-database firebase-storage firebase-sdk firebase-cloud-messaging

firebase-cpp-sdk's Introduction

Firebase C++ Open Source Development

The repository contains the Firebase C++ SDK source, with support for Android, iOS, and desktop platforms. It includes the following Firebase libraries:

Google Analytics for Firebase
Firebase Authentication Firebase Realtime Database
Firebase Dynamic Links Cloud Firestore
Cloud Functions for Firebase Firebase Invites
Firebase Cloud Messaging Firebase Remote Config
Cloud Storage for Firebase

Firebase is an app development platform with tools to help you build, grow and monetize your app. More information about Firebase can be found HERE.

  • More information about the Firebase C++ SDK can be found HERE
  • Samples on how to use the Firebase C++ SDK can be found HERE

Github Repo Size

Table of Contents

  1. Getting Started
  2. Prerequisites
  3. Building
  4. Including in Projects
  5. Contributing Guidelines
  6. License

Getting Started

You can clone the repo with the following command:

git clone https://github.com/firebase/firebase-cpp-sdk.git

Prerequisites

The following prerequisites are required for all platforms. Be sure to add any directories to your PATH as needed.

Note: Once python is installed you can use the following commands to install required packages:

  • python3 -m ensurepip --default-pip
  • python3 -m pip install --user absl-py

Prerequisites for Desktop

The following prerequisites are required when building the libraries for desktop platforms.

  • OpenSSL, needed for Realtime Database and Cloud Firestore

Prerequisites for Windows

Prebuilt packages for openssl can be found using google and if CMake fails to find the install path use the command line option -DOPENSSL_ROOT_DIR=[Open SSL Dir].

Prerequisites for Mac

Home brew can be used to install required dependencies:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
source $HOME/.rvm/scripts/rvm
brew install cmake python3
sudo chown -R $(whoami) /usr/local

Prerequisites for Android

The following prerequisites are required when building the libraries for Android.

  • Android SDK, Android NDK, and CMake for Android (version 3.10.2 recommended)
    • Download sdkmanager (either independently, or as a part of Android Studio) here
    • Follow these instructions to install the necessary build tools
  • (Windows only) Strings (from Microsoft Sysinternals)

    Important - Strings EULA
    You will have to run Strings once from the command line to accept the EULA before it will work as part of the build process.

Note that we include the Gradle wrapper, which if used will acquire the necessary version of Gradle for you.

Prerequisites for iOS/tvOS

The following prerequisites are required when building the libraries for iOS or tvOS.

Building

Building with CMake

The build uses CMake to generate the necessary build files, and supports out of source builds. The CMake following targets are available to build and link with:

Feature CMake Target
App (base library) firebase_app
Google Analytics for Firebase firebase_analytics
Firebase Authentication firebase_auth
Firebase Realtime Database firebase_database
Firebase Dynamic Links firebase_dynamic_links
Cloud Firestore firebase_firestore
Cloud Functions for Firebase firebase_functions
Firebase Invites firebase_invites
Firebase Cloud Messaging firebase_messaging
Firebase Remote Config firebase_remote_config
Cloud Storage for Firebase firebase_storage

For example, to build the Analytics library, you could run the following commands:

mkdir desktop_build && cd desktop_build
cmake ..
cmake --build . --target firebase_analytics

Note that you can provide a different generator on the configure step, for example to generate a project for Visual Studio 2017, you could run:

cmake -G “Visual Studio 15 2017” ..

More information on generators can be found at https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html.

By default, when building the SDK, the CMake process will download any third party dependencies that are needed for the build. This logic is in cmake/external_rules.cmake, and the accompanying cmake/external/CMakeLists.txt. If you would like to provide your own directory for these dependencies, you can override [[dependency_name]]_SOURCE_DIR and [[dependency_name]]_BINARY_DIR. If the binary directory is not provided, it defaults to the given source directory, appended with -build.

For example, to provide a custom flatbuffer directory you could run:

cmake -DFLATBUFFERS_SOURCE_DIR=/tmp/flatbuffers ..

And the binary directory would automatically be set to /tmp/flatbuffers-build.

Currently, the third party libraries that can be provided this way are:

Library
CURL
FLATBUFFERS
LIBUV
NANOPB
UWEBSOCKETS
ZLIB

Building with CMake for iOS

The Firebase C++ SDK comes with a CMake config file to build the library for iOS platforms, cmake/toolchains/ios.cmake. In order to build with it, when running the CMake configuration pass it in with the CMAKE_TOOLCHAIN_FILE definition. For example, to build the Auth library for iOS, you could run the following commands:

mkdir ios_build && cd ios_build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake ..
cmake --build . --target firebase_auth

Building with CMake for tvOS

The Firebase C++ SDK comes with a CMake config file to build the library for tvOS platforms, cmake/toolchains/apple.toolchain.cmake. In order to build with it, when running the CMake configuration pass it in with the CMAKE_TOOLCHAIN_FILE definition. For example, to build the Auth library for tvOS, you could run the following commands:

mkdir tvos_build && cd tvos_build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/apple.toolchain.cmake -DPLATFORM=TVOS ..
cmake --build . --target firebase_auth

Building XCFrameworks for both iOS and tvOS

The Firebase C++ SDK comes with a helper Python script to build XCFrameworks that work for both iOS and tvOS. This is helpful as we can use the same deliverable for both iOS and tvOS targets in the same XCode project.

# Install prereqs (like cocoapods)
./build_scripts/tvos/install_prereqs.sh
python3 scripts/gha/build_ios_tvos.py -s . -b ios_tvos_build

Building with Gradle for Android

When building the Firebase C++ SDK for Android, gradle is used in combination with CMake when producing the libraries. Each Firebase feature is its own gradle subproject off of the root directory. The gradle target to build the release version of each Firebase library is:

Feature Gradle Target
App (base library) :app:assembleRelease
Google Analytics for Firebase :analytics:assembleRelease
Firebase Authentication :auth:assembleRelease
Firebase Realtime Database :database:assembleRelease
Firebase Dynamic Links :dynamic_links:assembleRelease
Cloud Firestore :firestore:assembleRelease
Cloud Functions for Firebase :functions:assembleRelease
Firebase Invites :invites:assembleRelease
Firebase Cloud Messaging :messaging:assembleRelease
Firebase Remote Config :remote_config:assembleRelease
Cloud Storage for Firebase :storage:assembleRelease

For example, to build the release version of the Analytics library, you could run the following from the root directory:

./gradlew :analytics:assembleRelease

Proguard File Generation

Note that as part of the build process, each library generates a proguard file that should be included in your application. The generated file is located in each library’s build directory. For example, the Analytics proguard file would be generated to analytics/build/analytics.pro.

Testing

Each Firebase SDK in this repo includes a series of unit tests. These tests are built and executed by the CI system in order to validate changes and pull requests.

The provided test_windows_x32.bat, test_windows_x64.bat, test_linux.sh and test_mac_x64.sh scripts build the SDKs and execute the unit tests via ctest on Windows32, Windows64, Linux and MacOS hosts, respectively. These scripts reside in the base directory of the repository.

Known Issues

  • Mac
    • When executing tests you may be requested to unlock your Mac OS keychain. Please enter your keychain password and select Always Allow. If you still encounter repeated access request dialogs then you must unlock the keychain manually otherwise some tests will fail.
      • Open the Keychain access application on your Mac.
      • Under Keychains (upper left) select the login keychain.
      • Under Category select Passwords as a category (lower left) and find the entry not_a_real_project_id.{hashcode}. Right click it.
      • Select Get Info, select Access Control and enable the Allow all applications to access this item radio button.
      • Re-run the tests.

Including in Projects

Including in CMake Projects

Including the Firebase C++ SDK to another CMake project is fairly straightforward. In the CMakeLists.txt file that wants to include the Firebase C++ SDK, you can use add_subdirectory, providing the location of the cloned repository. For example, to add Analytics, you could add the following to your CMakeLists.txt file:

add_subdirectory( [[Path to the Firebase C++ SDK]] )
target_link_libraries( [[Your CMake Target]] firebase_analytics firebase_app)

Additional examples of how to do this for each library are available in the C++ Quickstarts.

Including in Android Gradle Projects

In order to link the Firebase C++ SDK with your gradle project, in addition to the CMake instructions above, you can use Android/firebase_dependencies.gradle to link the libraries, their dependencies, and the generated proguard files. For example, to add Analytics, you could add the following to your build.gradle file:

apply from: “[[Path to the Firebase C++ SDK]]/Android/firebase_dependencies.gradle”
firebaseCpp.dependencies {
  analytics
}

Additional examples of how to do this for each library are available in the C++ Quickstarts.

License

The contents of this repository is licensed under the Apache License, version 2.0.

Your use of Firebase is governed by the Terms of Service for Firebase Services.

firebase-cpp-sdk's People

Contributors

a-maurice avatar alexames avatar almostmatt avatar anonymous-akorn avatar arizigler avatar berile avatar borissoft avatar cherylenkidu avatar chkuang-g avatar cynthiajoan avatar dconeybe avatar dellabitta avatar ehsannas avatar firebase-workflow-trigger[bot] avatar hugo-syn avatar jonsimantov avatar milaggl avatar nakirekommula avatar pawelsnk avatar rosalyntan avatar ryanmeier avatar schmidt-sebastian avatar sunmou99 avatar tbarendt avatar tom-andersen avatar utkarsh006 avatar var-const avatar vimanyu avatar wilhuff avatar wu-hui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firebase-cpp-sdk's Issues

Auth: GetToken() generates invalid token (Firebase ID token has invalid signature)

This error is likely to be related to https://stackoverflow.com/questions/44014877/firebase-id-token-has-invalid-signature in 2017.

  • I am using the C++ client SDK, targetting Android platform
  • I properly get a token that contains good information (when checked with https://jwt.io/)
  • This token's provider is Google Sign In
  • As reported on the above StackOverflow question, Email & Password provider generates a proper token
  • I have an HTTPS Cloud Function that verifies this token using admin.auth().verifyIdToken()
  • An exception is generated when I verify any token from the client, with the following message: Firebase ID token has invalid signature. See https://firebase.google.com/docs/auth/admin/verify-id-tokens for details on how to retrieve an ID token.

I have tried to manually verify the token, and I could not verify the token to match any keys I could find. I have tried the following keys:

I believe this is a bug, not a temporary issue. And I also believe this is a supported use-case, so it needs to be fixed. As reported by the StackOverflow question, this also applies to Unity.

Thanks.

Getting unqualified-id when using standalone includes

Please fill in the following fields:

Firebase C++ SDK version: 6.7.0
Firebase plugins in use (Auth, Database, etc.): app
Additional SDKs you are using (Facebook, AdMob, etc.):
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Linux
Platform you are targeting (iOS, Android, and/or desktop): decktop

Please describe the issue here:

added include to project
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/firebase/)

Here is the code to reproduce
#include "firebase/app.h"

int main()
{

return 0;
}

firebase/firebase/variant.h:357:18: error: expected unqualified-id before numeric constant
static Variant False() { return Variant::FromBool(false); }
^
firebase/firebase/variant.h:362:18: error: expected unqualified-id before numeric constant
static Variant True() { return Variant::FromBool(true); }

Please answer the following, if applicable:

What's the issue repro rate? (eg 100%, 1/5 etc) 5

Need a way to list items in a storage bucket

Please fill in the following fields:

Pre-built SDK from the website or open-source from this repo: website, retrieved 10/Mar/2010
Firebase C++ SDK version: 6.12.0
Firebase plugins in use (Auth, Database, etc.): auth, storage
Additional SDKs you are using (Facebook, AdMob, etc.): n/a
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): iOS and desktop

Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

We use date-time stamps to create unique filenames, so it's very difficult to retrieve files afterwards without being able to list and iterate over the bucket contents.

All other APIs have storageRef.list() and storageRef.listAll() to list items in a storage bucket, except for C++. Getting a list of all items (rather than per "directory") would be fine, but there's currently no way to do this either.

It is possible to get some results by calling rootStorageRef.GetBytes(...)/GetFile(...), which returns a JSON listing. This isn't a full list though, because it has nextPageToken to get the next pagination but there is no way (as far as I can see) to use this token to get the next set of results in C++.

Another option would be to have the functionality to craft custom curl requests, so that missing C++ API methods could be worked around by adding things like nextPageToken into the endpoint call. If this functionality already exists I can't find it.

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?

Not applicable, because quickstarts doesn't exercise the requested functionality.

What's the issue repro rate? (eg 100%, 1/5 etc)

100% (missing/requested feature).

Duplicate symbol regression when interacting with cocos2d-x 3.17 prebuilt lib on MacOS

Please fill in the following fields:

Pre-built SDK from the website:
Firebase C++ SDK version: 6.8.0
Firebase plugins in use (Auth, Database, etc.): Analytics, Remote Config, Dynamic Links
Additional SDKs you are using (Facebook, AdMob, etc.): Cocos2d-x 3.17
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): Desktop

Please describe the issue here:

I am trying to upgrade Firebase in my Cocos2d-x project from version 5.6.0 to 6.8.0. Everything was building fine with 5.6.0 however after substituting Firebase sources with 6.8.0 ones and resolving missing dependencies I get the following symbol conflict with the prebuilt version of cocos2d-x static lib:

duplicate symbol 'flatbuffers::MakeCamel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)' in:
    /Applications/Cocos/Cocos2d-x/cocos2d-x-3.17/prebuilt/mac/libcocos2d Mac.a(idl_gen_general.o)
    /Users/user/Projects/Cocos/TileGame/external/firebase_cpp_sdk/frameworks/darwin/x86_64/firebase.framework/firebase(6eeb4ec1b7654fac8ff5c92573f1d7a3_idl_parser.o)
ld: 1 duplicate symbol for architecture x86_64

libcocos2d Mac.a includes flatbuffers verbatim and it seems that interaction with Firebase 5.6.0 was possible because of some kind of renaming scheme in place in the Firebase sources (note the namespace is f_b_flatbuffers in 5.6.0 vs flatbuffers in 6.8.0):

external/firebase_cpp_sdk-old/frameworks/darwin/universal/firebase.framework/firebase(bc365d2402c329b3ab8113d22eb92bb5_idl_parser.o):
0000000000000000 T f_b_flatbuffers::MakeCamel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)

In the 6.8.0 flatbuffers is included verbatim just like in cocos2d-x lib, causing the linker to report duplicate symbol when both libraries are used together:

external/firebase_cpp_sdk/frameworks/darwin/universal/firebase.framework/firebase(6eeb4ec1b7654fac8ff5c92573f1d7a3_idl_parser.o):
0000000000000000 T flatbuffers::MakeCamel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)

I was wondering in what version of Firebase was the renaming dropped and whether you guys plan on keeping it that way? I am not super familiar with Xcode's build system, do I need any additional flags to link against Firebase 6.8.0 framework on Mac OS to avoid these conflicts? I don't get this issue when targeting iOS while I also don't see any renaming in place on iOS in the 5.6.0, so I'm not sure what's happening.

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ? N/A

What's the issue repro rate? (eg 100%, 1/5 etc) 100%

Linking error with Desktop version

Hello team,

I'm trying to implement Firebase CPP SDK on the Desktop version following the steps on (https://github.com/firebase/quickstart-cpp). Unfortunately, I always get the linking error on Debug mode (Release mode is ok).

  • First, I used the latest prebuilt package(firebase_cpp_sdk_6.7.0) but it's failed with the linking error : "LNK1143 invalid or corrupt file: no symbol for COMDAT section 0x60FF \build\firebase_app.lib(3b90730b34b9dfb9de1097092477c56f_flatbuffers.dir_Debug_idl_parser.obj)"
    I'm using VS Studio 2019 to develop, your package is in VS2015 and maybe there is my problem.

  • Second, I follow the steps to build the source code. The thing I need is static libs in /MT format, so I changed a little big from CMake like:

if (MSVC)
  # Googletest requires MSVC to compile with the static version of the runtime
  # library, so define the appropriate runtime flag, before adding libraries.
  set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
  set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
endif()

When using these libs, i got a lot of linking error like:

Error	LNK2001	unresolved external symbol "public: virtual __cdecl firebase::rest::Request::~Request(void)" (??1Request@rest@firebase@@UEAA@XZ)	\build\firebase_auth-d.lib(secure_token_request.obj)

Error	LNK2001	unresolved external symbol "public: bool __cdecl flatbuffers::Parser::Parse(char const *,char const * *,char const *)" (?Parse@Parser@flatbuffers@@QEAA_NPEBDPEAPEBD0@Z)		\build\firebase_app-d.lib(app_options.obj)

Error	LNK2001	unresolved external symbol "public: virtual bool __cdecl firebase::rest::Response::ProcessHeader(char const *,unsigned __int64)" (?ProcessHeader@Response@rest@firebase@@UEAA_NPEBD_K@Z)	\build\firebase_auth-d.lib(user_desktop.obj)

Error	LNK2001	unresolved external symbol "public: virtual void __cdecl firebase::rest::Response::GetBody(char const * *,unsigned __int64 *)const " (?GetBody@Response@rest@firebase@@UEBAXPEAPEBDPEA_K@Z)	\build\firebase_auth-d.lib(user_desktop.obj

Could you please show me any wrong steps I made, and any thing I need to do to have the project linked correctly?

Thank you!

Please fill in the following fields:

Firebase C++ SDK version: v6.7.0. The same error with 6.6.1
Firebase plugins in use (Auth, Database, etc.): Auth, Analytics, Admob
Additional SDKs you are using (Facebook, AdMob, etc.): Firebase Admob
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Window
Platform you are targeting (iOS, Android, and/or desktop): Desktop

Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ? No

What's the issue repro rate? 100%

Disable in_app_purchase event

Feature request: disable auto logging of in_app_purchase. Now it logs prices with taxes. It breaks analytics and iTunes/Google has different in reports.

Include errors when compiling

Please fill in the following fields:

Pre-built SDK from the website or open-source from this repo: Pre-built SDK
Firebase C++ SDK version: 6.12.0
Firebase plugins in use (Auth, Database, etc.): Storage
Additional SDKs you are using (Facebook, AdMob, etc.): None
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Linux
Platform you are targeting (iOS, Android, and/or desktop): Desktop (Linux)

Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

When I include Firebase Storage in my program, the imported libraries can't find their own imports. I have put the firebase_cpp_sdk directory next to my source file in src/. This is the directory structure of my program:

├── CMakeLists.txt
├── README.md
├── src
│   ├── firebase_cpp_sdk
│   │   ├── Android, frameworks, include, libs etc
│   └── main.cpp

1115 directories, 4058 files

Here is the relevant bit of my main.cpp (nothing else in it relates to Firebase at all):

#include "iostream"
#include "firebase_cpp_sdk/include/app.h"
#include "firebase_cpp_sdk/include/storage.h"

int main(int, char**) {
    // Initialise the Firebase app
    firebase::App * firebaseApp = firebase::App::Create(firebase::AppOptions());
    firebase::storage::Storage* firebaseStorage = firebase::storage::Storage::GetInstance(firebaseApp);

    // Creates a reference to the bucket
    firebase::storage::StorageReference bucketReference = firebaseStorage->GetReferenceFromUrl("gs://arduino-project-234f5.appspot.com");

Here is my CMakeLists.txt, although the same error still occurs when just doing g++ main.cpp:

cmake_minimum_required(VERSION "3.17.0")

project("camera-software")

file(GLOB camera-software_SRC
    "src/*"
)


# Sets the flags to include OpenCV. Should probably remove the unused ones
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/opencv -lopencv_core -lopencv_highgui")

add_executable("${PROJECT_NAME}" "${camera-software_SRC}")

install(TARGETS "${PROJECT_NAME}" DESTINATION bin)
install(FILES "main.cpp" DESTINATION src)

Here is the error:

In file included from firebase_cpp_sdk/include/storage.h:23,
                 from main.cpp:4:
firebase_cpp_sdk/include/firebase/storage/controller.h:18:10: fatal error: firebase/storage/storage_reference.h: No such file or directory
   18 | #include "firebase/storage/storage_reference.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Build error on Android: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'

When I'm trying to build Firebase SDK 5.7.0 I'm receiving next error (with 5.6.1 everything works fine).

armeabi-v7a/gnustl

Android:GCC 4.8
Android: NDK 10e, Build Tools 23.0.2, Api Level 14

Log:

/opt/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/basic_string.h:878: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
collect2: error: ld returned 1 exit status

Cannot login facebook on Android 4.4.2 ( Galaxy S5 ) When updated Firebase Sdk to new version 6.2.0 ! Bad access token: {"code":190,"message":"Invalid OAuth access token."

Hello Firebase SDK Team !

In my game , I used Firebase Sdk V6.0.0 with Facebook Firebase Auth feature !

It works fine on all android versions !

Now, When I updated Firebase C++ Sdk to new version 6.2.0 , I found a bug on Android 4.4.2 ( Galaxy S5 ) ! I think it can also occur on older version ( 4.x ) !

I also tested the new sdk version on some devices with android 8.x ,5.x.. versions ! All works fine except android 4.4.2 ( Galaxy S5 ) !

Here is the log from firebase :

The supplied auth credential is malformed or has expired. [ Bad access token: {"code":190,"message":"Invalid OAuth access token."}

I/AuthChimeraService: Error description received from server: INVALID_IDP_RESPONSE : Bad access token: {"code":190,"message":"Invalid OAuth access token."}

I think this bug from firebase sdk because I checked the facebook login status , It was successful !

I tested on some facebook accounts , but it's the same ! It does not occur this problem on android 8.1 (Vivo V9) , android 5.x (LG F460) ...!

Does this problem only occurs on older versions ?

Eg : android 4.x

Could Firebase SDK Team help me consider this issue ?

Thanks !

qrash when I am trying to create App instance.

int main()
{

firebase::AppOptions app_options = firebase::AppOptions();
firebase::App* app = firebase::App::Create(app_options);
return 0;
}

below is the stack.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6eb519f in std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff6eb519f in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x0000555555750bbf in firebase::AppOptions::AppOptions(firebase::AppOptions const&) ()
#2 0x000055555575089a in firebase::App::Create(firebase::AppOptions const&, char const*) ()
#3 0x0000555555750817 in firebase::App::Create(firebase::AppOptions const&) ()
#4 0x0000555555714be4 in main (argc=1, argv=0x7fffffffdde8) at /home/lvv/src/main.cpp:29
(gdb)

ios - linking error

What library should be linked to fix below error?
xcode: 10.3
macos: 10.14.5

I would like to stay with command line and cmake and do not use CocoaPods and open xcode.

In documentation I see "Integrate without CocoaPods"
https://firebase.google.com/docs/ios/setup#frameworks

This is my cmake:

# Add Firebase libraries to the target using the function from the SDK.
add_subdirectory(${EXTERNAL_DIR}/firebase_cpp_sdk bin/ EXCLUDE_FROM_ALL)

# The core Firebase library (firebase_app) is required to use any Firebase product,
# and it must always be listed last.
target_link_libraries(${PROJECT_NAME}
    firebase_analytics
    firebase_remote_config
    firebase_app)

Error:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in firebase(app_ios_814e1620d4f88024cea4bade26623a67.o)
  "_OBJC_CLASS_$_FIRConfiguration", referenced from:
      objc-class-ref in firebase(log_ios_dd26aec5b8537064a4c15d38b58b4640.o)
  "_OBJC_CLASS_$_FIRRemoteConfigSettings", referenced from:
      objc-class-ref in firebase_remote_config(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "_OBJC_CLASS_$_FIRRemoteConfig", referenced from:
      objc-class-ref in firebase_remote_config(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in firebase(app_ios_814e1620d4f88024cea4bade26623a67.o)
  "_OBJC_CLASS_$_FIRAnalytics", referenced from:
      objc-class-ref in libfirebase_analytics.a(analytics_ios_d28a0e676a7367b8f2d91944bb505d87.o)
  "_FIRRemoteConfigThrottledEndTimeInSecondsKey", referenced from:
      ____ZN8firebase13remote_config5FetchEy_block_invoke in firebase_remote_config(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ASan does not like Variant

Address sanitizer (android x86, NDK19) reports an error in Variant's move constructor:

07-17 07:37:03.890 31772 31772 I fbuserapp: 
07-17 07:37:03.890 31772 31772 I fbuserapp: 0xa0f02b40 is located 0 bytes inside of 60-byte region [0xa0f02b40,0xa0f02b7c)
07-17 07:37:03.890 31772 31772 I fbuserapp: 
07-17 07:37:03.890 31772 31772 I fbuserapp: ==31772==AddressSanitizer CHECK failed: /usr/local/google/buildbot/src/android/llvm-toolchain/toolchain/compiler-rt/lib/asan/asan_descriptions.cc:176 "((id)) != (0)" (0x0, 0x0)

Any ideas of how to handle this?

This is the relevant backtrace:

********** Crash dump: **********
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:9/PSR1.180720.093/5456446:userdebug/dev-keys'
#00 0x00000b39 [vdso:ec404000] (__kernel_vsyscall+9)                                                                                                                                                                                                                                                          
#01 0x0001fdf8 /system/lib/libc.so (syscall+40)                                                                                                                                                                                                                                                               
#02 0x00022ed3 /system/lib/libc.so (abort+115)                                                                                                         
#03 0x0005d451 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)                                                                                                                                                                                      
                                                                                                         ??                                                                                                                                                                                                   
                                                                                                         ??:0:0
#04 0x0005c0bd /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)                     
                                                                                                         ??                              
                                                                                                         ??:0:0
#05 0x000dbb09 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)                                                                                                                                                                                      
                                                                                                         ??                                                                                                                                                                                                   
                                                                                                         ??:0:0
#06 0x0005c143 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)
                                                                                                         ??
                                                                                                         ??:0:0
#07 0x00071152 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)
                                                                                                         ??
                                                                                                         ??:0:0
#08 0x0007269d /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)
                                                                                                         ??
                                                                                                         ??:0:0
#09 0x000743c6 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)                                                                                                                                                                                      
                                                                                                         ??                                                                                                                                                                                                   
                                                                                                         ??:0:0
#10 0x000d98e4 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)
                                                                                                         ??
                                                                                                         ??:0:0
#11 0x000d72e5 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)
                                                                                                         ??
                                                                                                         ??:0:0
#12 0x000d929a /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000)                                                                                                                                                                                      
                                                                                                         ??                                                                                                                                                                                                   
                                                                                                         ??:0:0
#13 0x000d9f38 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libclang_rt.asan-i686-android.so (offset 0x52000) (__asan_report_store4+40)
                                                                                                         __asan_report_store4
                                                                                                         ??:0:0
#14 0x00338e66 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libFBUserApp.so (firebase::Variant::Variant(firebase::Variant&&)+118)
                                                                                          firebase::Variant::Variant(firebase::Variant&&)
                                                                                          ??:0:0
#15 0x007f182c /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libFBUserApp.so                                                                                                                                                                                                                      
??                                                                                                                                                                                                                                                                                                            
??:0:0                                                                                                                                                 
#16 0x007f0dad /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libFBUserApp.so (firebase::database::internal::JavaObjectToVariant(_JNIEnv*, _jobject*)+1037)                                                                 
                                                                                          firebase::database::internal::JavaObjectToVariant(_JNIEnv*, _jobject*)                                                                  
                                                                                          ??:0:0
#17 0x007f1c42 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libFBUserApp.so
??                     
??:0:0
#18 0x007f0ec4 /data/app/fbuserapp-tW8SRDlmxN88zZO-DIwvmQ==/lib/x86/libFBUserApp.so (firebase::database::internal::JavaObjectToVariant(_JNIEnv*, _jobject*)+1316)
                                                                                          firebase::database::internal::JavaObjectToVariant(_JNIEnv*, _jobject*)
                                                                                          ??:0:0

Segmentation fault of firebase while rotating orientation of IOS

Hey,
I had few cases of segmentation fault of Firebase on my ios crash log. Based on it, it was because of incorrect re-initalization of the firebase while screen was being rotated int he application.

Please fill in the following fields:

Firebase C++ SDK version: 6.7
Firebase plugins in use (Auth, Database, etc.): FirebaseAnalytics, FirebaseCore, FirebaseInstanceID
Additional SDKs you are using (Facebook, AdMob, etc.): qt 5.13.2 + qfirebase lib to use firebase with a qml https://github.com/Larpon/QtFirebase
Platform you are using the SDK on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): IOS

Please describe the issue here:

Looks like it is related to changing orientation of app, during that time firebase is re-initialised and mutex is not correctly handled

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [81193]
Triggered by Thread: 0

Thread 0 name:
Thread 0 Crashed:
0   libsystem_pthread.dylib       	0x0000000190a693fc pthread_mutex_lock$VARIANT$mp + 0 (pthread_mutex.c:1491)
1   app                           	0x00000001025fda80 std::__1::__tree_const_iterator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, flatbuffers::EnumVal*>, std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, flatbuffers::EnumVal*>, void*>*, long> std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, flatbuffers::EnumVal*>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, flatbuffers::EnumVal*>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, flatbuffers::EnumVal*> > >::find<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >+ 1694336 (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const + 12
2   app                           	0x0000000102601110 std::__1::enable_if<(__is_forward_iterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*>::value) && (is_constructible<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::iterator_traits<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*>::reference>::value), void>::type std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::assign<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*>+ 1708304 (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 36
3   app                           	0x00000001025fcc18 firebase::analytics::Initialize+ 1690648 (firebase::App const&) + 84
4   app                           	0x000000010252bb9c QtFirebaseAnalytics::init() + 834460 (qtfirebaseanalytics.cpp:0)
5   app                           	0x00000001034ca364 QQmlExpression::QQmlExpression+ 17212260 () + 2224
6   app                           	0x000000010252ab5c QtFirebase::requestInit() + 830300 (qtfirebase.cpp:0)
7   app                           	0x00000001034ca364 QQmlExpression::QQmlExpression+ 17212260 () + 2224
8   app                           	0x00000001034cec90 QWindowSystemInterfacePrivate::GeometryChangeEvent::GeometryChangeEvent+ 17230992 (QWindow*, QRect const&) + 120
9   app                           	0x00000001034c2e9c QObject::event+ 17182364 (QEvent*) + 80
10  app                           	0x00000001034a26f8 QObject::userData+ 17049336 (unsigned int) const + 124
11  app                           	0x00000001034a22cc QVector<QObjectUserData*>::resize+ 17048268 (int) + 204
12  app                           	0x00000001034e7bc4 QEucJpCodec::QEucJpCodec+ 17333188 () + 932
13  app                           	0x000000010353c9d8 QIPAddressUtils::parseIp4Internal+ 17680856 (unsigned int&, char const*, bool) + 620
14  CoreFoundation                	0x0000000190cd0e1c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28 (CFRunLoop.c:1766)
15  CoreFoundation                	0x0000000190cd0b58 __CFRunLoopDoTimer + 880 (CFRunLoop.c:2357)
16  CoreFoundation                	0x0000000190cd0228 __CFRunLoopDoTimers + 276 (CFRunLoop.c:2512)
17  CoreFoundation                	0x0000000190ccb364 __CFRunLoopRun + 1920 (CFRunLoop.c:0)
18  CoreFoundation                	0x0000000190cca8bc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
19  GraphicsServices              	0x000000019ab36328 GSEventRunModal + 104 (GSEvent.c:2246)
20  UIKitCore                     	0x0000000194d606d4 UIApplicationMain + 1936 (UIApplication.m:4753)
21  app                           	0x0000000102606df0 qt_main_wrapper + 820
22  libdyld.dylib                 	0x0000000190b55460 start + 4

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts (this GitHub project)? Crash happent to a user, but based on crash log it was during app being rotated and Fireabe was being reinitalized.

What's the issue repro rate? (eg 100%, 1/5 etc) Wasn't able to repro myself so would say "low".

SignInWithEmailAndPassword works differently depending on platform

I'm developing a desktop program with Firebase, and the following code makes different result in Windows and Ubuntu.

#include <firebase/database.h>
#include <firebase/auth.h>
#include <cstdio>

int main() {
    auto app = firebase::App::Create();
    auto email =  "...";
    auto pwd = "...";
    auto auth = firebase::auth::Auth::GetAuth(app);
    auto value = auth->SignInWithEmailAndPassword(email, pwd);
    
    while (value.status() == firebase::kFutureStatusPending);
    if (value.status() != firebase::kFutureStatusComplete) {
        printf("Invalid Result.\n");
        return 1;
    } else if (value.error() != firebase::database::kErrorNone) {
        printf("Error %d: %s\n",
               value.error(), value.error_message());
        return 1;
    } else {
        return 0;
    }
}

While in Windows, the program returns 0, in Ubuntu, the program prints Error 1: An internal error has occurred. google-services.json is in the working directory.

Arduino/ESP8266/ESP32 support

Do You plan to add official support for Arduino/ESP8266/ESP32?
There is library that is created by people from Google, but it isn't supported by Google - https://github.com/FirebaseExtended/firebase-arduino
Because database secrets are deprecated this library is missing new auth schema - FirebaseExtended/firebase-arduino#224

If this library would support Arduino/ESP8266/ESP32 then Firebase could be used widely with IOT devices.

Please consider this. The most important fearure is Realtime database support.

iOS: How to build universal libs

The release builds available at https://firebase.google.com/download/cpp contain universal builds for iOS, supporting both arm64 and x86_64, among others.

For easier debugging of a firebase-based app in the iOS simulator, I'd like to do an x86_64 or even better "universal" debug build of firebase-cpp-sdk. The iOS instructions in the README are using a CMake toolchain file that only builds for arm64. Trying to replace "arm64" by "x86_64" in the toolchain file already fails when building flatbuffers.

Could you please document how to compile firebase-cpp-sdk for iOS/x86_64?
Ideally I would like to be able to reproduce the iOS part of the official .zip, just with -DCMAKE_BUILD_TYPE=Debug

desktop workflow - macos linking error

What library should be linked to fix below error?
xcode: 10.3
macos: 10.14.5

I added libraries from here:
https://firebase.google.com/docs/cpp/setup#os_x_libraries

Undefined symbols for architecture x86_64:
  "_GSS_C_NT_HOSTBASED_SERVICE", referenced from:
      _f_b_Curl_auth_decode_spnego_message in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
  "_gss_delete_sec_context", referenced from:
      _f_b_Curl_auth_decode_spnego_message in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_auth_spnego_cleanup in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
  "_gss_display_name", referenced from:
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
  "_gss_display_status", referenced from:
      _f_b_check_gss_err in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
      _f_b_Curl_gss_log_error in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_curl_gssapi.o)
  "_gss_import_name", referenced from:
      _f_b_Curl_auth_decode_spnego_message in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
  "_gss_init_sec_context", referenced from:
      _f_b_Curl_gss_init_sec_context in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_curl_gssapi.o)
     (maybe you meant: _f_b_Curl_gss_init_sec_context)
  "_gss_inquire_context", referenced from:
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
  "_gss_release_buffer", referenced from:
      _f_b_Curl_auth_decode_spnego_message in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_auth_spnego_cleanup in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_auth_create_spnego_message in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
      _f_b_check_gss_err in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
      _f_b_Curl_gss_log_error in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_curl_gssapi.o)
  "_gss_release_name", referenced from:
      _f_b_Curl_auth_decode_spnego_message in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_auth_spnego_cleanup in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_spnego_gssapi.o)
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
  "_gss_unwrap", referenced from:
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
  "_gss_wrap", referenced from:
      _f_b_Curl_SOCKS5_gssapi_negotiate in libfirebase_app.a(33677b163c7b4eb0de6ea9393e320c84_socks_gssapi.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Precondition support on uploads

We are using Cloud Storage via the Firebase SDK and allow clients to upload files to certain paths in our bucket based on the rules we've set up. Additionally, we need to make sure that when a client overwrites a file, the overwrite happens only if the client's notion of which version it is overwriting matches that is on Cloud Storage (if the client tries to overwrite a version that is newer than what it knows about, it goes back and downloads the latest version, merges in its info, and then retries the upload).

Upload preconditions (https://cloud.google.com/storage/docs/generations-preconditions) seem like exactly what we need to solve this problem and avoid some of the race conditions, but we can't figure out how to do them via the Firebase C++ SDK.

My questions are:

  1. Are preconditions on uploads supported currently? If so, any pointers on how to use them would be most appreciated.
  2. If they aren't supported, is support planned?
  3. If they aren't supported yet, we'll need to add support for them ourselves - can anyone suggest a starting point of where might be a good place in the code to insert them? (I'm just looking for any guidance that will help speed us through the process of narrowing down a good spot)

Thanks!

Unable to compile the SDK on windows/Linux

Please fill in the following fields:

open-source from this repo:
Firebase C++ SDK version: master
Firebase plugins in use (Auth, Database, etc.): None
Additional SDKs you are using (Facebook, AdMob, etc.):None
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Windows
Platform you are targeting (iOS, Android, and/or desktop): Windows Desktop

Please describe the issue here:

I have downloaded the SDK from github and trying to compile it as per the mentioned instructions using Visual studio code .But I am facing compiler missing issue below

$ cmake ..
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:75 (enable_language):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/Users/shiva/Downloads/Sandeep/firebase-cpp-sdk-master/fcm_build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/shiva/Downloads/Sandeep/firebase-cpp-sdk-master/fcm_build/CMakeFiles/CMakeError.log".

Actually , I want to understand that Messaging can be used with Desktop applications in Linux or not. If yes, could you please share me the steps to compile the sdk and sample app to receive Firebase Cloud Messaging in linux.
Also let me know if this is not the SDK meant for Desktops ,how can I achieve Messaging for Desktops?

[Analytics] ParamName not displaying correctly

Hi! I having some issue with displaying correct parameter name in Firebase console.
Here of my code example: Link

That a free firebase analytics provider for Unreal Engine 4.
So. About issue:

After sending event to firebase i looking for streamview and see event structure:
Category -> Category -> ParamValue

Expected structure:
Category -> ParamName -> ParamValue

For some reason, parameter name replaced with my category. (i know that string Category != ParamName). Any ideas what went wrong?

Crash in Functions on MacOS when using authentication

Please fill in the following fields:

Pre-built SDK from the website
Firebase C++ SDK version: 6.12.0
Firebase plugins in use (Auth, Database, etc.): Auth, Firestore, Functions, Storage
Additional SDKs you are using (Facebook, AdMob, etc.): Qt 5.14.1 clang 64bit
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): desktop

Please describe the issue here:

My application crashes when trying to call a Firebase callable function in combination with authentication:

auto pFireBaseApp = firebase::App::Create();
// No crash when I comment out the following line
auto pAuth = firebase::auth::Auth::GetAuth(pFireBaseApp);
auto pFunctions = functions::Functions::GetInstance(pFireBaseApp);

auto ref = pFunctions->GetHttpsCallable("testFunction");
auto future = ref.Call();
future.OnCompletion([](const Future<functions::HttpsCallableResult> &result) {
    // Crash before this is reached but not when commenting out pAuth code
});

It does not crash, and behaves as expected, when not initializing Auth. Note that this behaves the same with a function that doesn't use authentication: testFunction is a very simple function that returns a fixed object.

This is the call stack of the crashed thread:

1 firebase::rest::BackgroundTransportCurl::PerformBackground(firebase::rest::Request *)                                                                       (x86_64) /Users/jdierckx/work/Bioracer Motion/Bioracer Aero/build-BioracerAero-Desktop_Qt_5_14_1_clang_64bit-Debug/build-output/BRMApplicationTest.app/Contents/Frameworks/libBRMData.1.dylib  0x10038143b    
2 firebase::rest::CurlThread::ProcessRequests()                                                                                                               (x86_64) /Users/jdierckx/work/Bioracer Motion/Bioracer Aero/build-BioracerAero-Desktop_Qt_5_14_1_clang_64bit-Debug/build-output/BRMApplicationTest.app/Contents/Frameworks/libBRMData.1.dylib  0x10038318e    
3 void * std::__thread_proxy<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ( *)(void *), void *>>(void *) (x86_64) /Users/jdierckx/work/Bioracer Motion/Bioracer Aero/build-BioracerAero-Desktop_Qt_5_14_1_clang_64bit-Debug/build-output/BRMApplicationTest.app/Contents/Frameworks/libBRMData.1.dylib  0x1003a0cec    
4 _pthread_start                                                                                                                                              (x86_64) /usr/lib/system/libsystem_pthread.dylib                                                                                                                                               0x7fff64a29e65 
5 thread_start                                                                                                                                                (x86_64) /usr/lib/system/libsystem_pthread.dylib                                                                                                                                               0x7fff64a2583b 

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ? Did not try (the quickstart example doesn't use Auth)

What's the issue repro rate? (eg 100%, 1/5 etc) 100%

Long-term Realtime Database connection with ChildListener

Please fill in the following fields:

Pre-built SDK from the website
Firebase C++ SDK version: 6.8.0
Firebase plugins in use (Auth, Database, etc.): App, Auth, Realtime Database
Additional SDKs you are using (Facebook, AdMob, etc.): Qt 5.12.5
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Windows 10
Platform you are targeting (iOS, Android, and/or desktop): Desktop

Please describe the issue here:

  1. Sign-in existing user with Auth (email + password)
  2. Get database reference for a selected root node
  3. Add ChildListener to this node
  4. Desktop application is running: ChildListener is triggered for every child nodes
  5. Add some child node from a mobile application: ChildListener is triggered for every new child nodes
  6. Both mobile and desktop applications are running for more than 1 hour in "idle state". (always connected, no sleep mode, no new child nodes are being sent from mobile app)
  7. Add some new child node from a mobile application: these nodes can be shown in Firebase web console but ChildListener is NOT triggered anymore on desktop! Re-login and new database reference is required in order to get them.

Q: What is the best practice to always get the new child nodes on desktop? How long is the connection alive?

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?
Did not tried.

What's the issue repro rate? (eg 100%, 1/5 etc)

Unable to find Method com/google/firebase/remoteconfig/FirebaseRemoteConfig.setDefaults. Please verify the AAR which contains the com/google/firebase/remoteconfig/FirebaseRemoteConfig class is included in your app.

When i run sample code remote_config in quickstart-cpp-master repository, i caught "A/firebase: Unable to find Method com/google/firebase/remoteconfig/FirebaseRemoteConfig.setDefaults (signature '(ILjava/lang/String;)V', instance). Please verify the AAR which contains the com/google/firebase/remoteconfig/FirebaseRemoteConfig class is included in your app." error.
Anyone have idea to fix that ? Tks

Load another ad on an interstitial fails with internal SDK error on iOS

The first interstitial (loaded after InitializeLastResult() completes) works fine, but if I try to load another ad on OnPresentationStateChanged(ad, kPresentationStateHidden) it fails with InternalSDKError

Only way I could make it work was by creating a new firebase::admob::InterstitialAd and load there, but it's a bit of a hassle. Is this intended behaviour?

undefined reference to `firebase::g_storage_initializer'

Please fill in the following fields:

Firebase C++ SDK version: 6.7.0
Firebase plugins in use (Auth, Database, etc.):Storage
Additional SDKs you are using (Facebook, AdMob, etc.):
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Linux
Platform you are targeting (iOS, Android, and/or desktop): decktop

Please describe the issue here:

after adding storage.h include getting linking error, but I am linking all libs to executable.
here is the code to reproduce the issue.
#include "firebase/storage.h"

int main()
{
return 0;
}

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?

What's the issue repro rate? (eg 100%, 1/5 etc)

FR: Email Link Authentication

I'm trying to use Firebase Authentication to sign in a user by sending them an email containing a link. The feature is supported and documented for Android, iOS and Web, but is nowhere to be found for the C++ SDK.

Is this possible with the C++ SDK?

AdMob (Android): Possible deadlock in destruction of BannerView on Android 9

We have increased ANR in our app for some time now. When executing the destructor of ~BannerView() there seems to be a deadlock in the mutex of BannerViewInternalAndroid

It is noticeable that these ANR only occur on Android 9.

Do you have any ideas on cause? How can we help you narrow down the problem?

We using firebase-cpp version 5.6.1

"qtMainLoopThread" prio=5 tid=14 Native
| group="main" sCount=1 dsCount=0 flags=1 obj=0x13000708 self=0xd2f08600
| sysTid=22096 nice=0 cgrp=default sched=0/0 handle=0xd2dff970
| state=S schedstat=( 9056905915 6631793329 5093 ) utm=737 stm=168 core=0 HZ=100
| stack=0xd2cfc000-0xd2cfe000 stackSize=1042KB
| held mutexes=
#00 pc 0000000000019e0c /system/lib/libc.so (syscall+28)
#1 pc 000000000001d527 /system/lib/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+86)
#2 pc 000000000006538b /system/lib/libc.so (NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+154)
#3 pc 00000000001c0f67 /data/app/de.bitspree.pico.islands-wctmlti9_uuQI6dNFFX5Hw==/lib/arm/libpico-islands.so (firebase::admob::internal::BannerViewInternalAndroid::~BannerViewInternalAndroid()+126)
#4 pc 00000000001c103d /data/app/de.bitspree.pico.islands-wctmlti9_uuQI6dNFFX5Hw==/lib/arm/libpico-islands.so (firebase::admob::internal::BannerViewInternalAndroid::~BannerViewInternalAndroid()+4)
#5 pc 00000000001c2a91 /data/app/de.bitspree.pico.islands-wctmlti9_uuQI6dNFFX5Hw==/lib/arm/libpico-islands.so (firebase::admob::BannerView::~BannerView()+24)
#6 pc 000000000014d07b /data/app/de.bitspree.pico.islands-wctmlti9_uuQI6dNFFX5Hw==/lib/arm/libpico-islands.so (Logic::FirebaseBanner::~FirebaseBanner()+278)
at org.qtproject.qt5.android.QtNative.startQtApplication (Native method)
at org.qtproject.qt5.android.QtNative$7.run (QtNative.java:374)
at org.qtproject.qt5.android.QtThread$1.run (QtThread.java:61)
at java.lang.Thread.run (Thread.java:764)

Support for maximum timeout for connection retry.

Please fill in the following fields:

Pre-built SDK from the website or open-source from this repo:
Firebase C++ SDK version:
Firebase plugins in use (Auth, Database, etc.):
Additional SDKs you are using (Facebook, AdMob, etc.):
Platform you are using the C++ SDK on (Mac, Windows, or Linux):
Platform you are targeting (iOS, Android, and/or desktop):

Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

Code to repro:

settings.set_persistence_enabled(false);
settings.set_host("Invalid gcp oneplatform host url");

Future<DocumentReference> doc_ref =
      db->Collection("users").Add({{"first", FieldValue::FromString("Ada")},
                                   {"last", FieldValue::FromString("Lovelace")},
                                   {"born", FieldValue::FromInteger(1815)}});
while(doc_ref.status() != firebase::kFutureStatusComplete) {
  absl::SleepFor(absl::Seconds(5));
  LOG(INFO) << "HAHA?";
}
// Never reach here.

Firestore SDK supports retry and exponential backoff when it fails to connect the backend. However, there is no limit on the total retry times or timeout. So when there is something wrong with the server side, e.g. backend is down, the end user will hang forever for the future completion callback. And this could cause OOM in the client side because client might keep adding more operations and callbacks. Could we set up a maximum retry timeout?

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?

What's the issue repro rate? (eg 100%, 1/5 etc) 100%

Can't compile for Android (gradle)

Please fill in the following fields:

Pre-built SDK from the website or open-source from this repo: repo
Firebase C++ SDK version: latest
Firebase plugins in use (Auth, Database, etc.):
Additional SDKs you are using (Facebook, AdMob, etc.): none
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Windows
Platform you are targeting (iOS, Android, and/or desktop): Android

Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

It must be something wrong with my setup, but I can't seem to compile the repo for Android using Gradle. When trying the following command: gradlew :app:assembleRelease I get the following build errors:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:externalNativeBuildRelease'.

Build command failed.
Error while executing process C:\Users\joscott\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe with arguments {--build C:\projects\firebase-cpp-sdk\app.externalNativeBuild\cmake\release\x86_64 --target firebase_app}
[1/50] Building CXX object external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o
FAILED: external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o
C:\Users\joscott\AppData\Local\Android\Sdk\ndk\20.1.5948944\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android21 --gcc-toolchain=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Iexternal/src/flatbuffers/include -Iexternal/src/flatbuffers/grpc -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -O2 -DNDEBUG -fPIC /Zc:__cplusplus -std=gnu++11 -MD -MT external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o -MF external\src\flatbuffers-build\CMakeFiles\flatbuffers.dir\src\idl_parser.cpp.o.d -o external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o -c external/src/flatbuffers/src/idl_parser.cpp
clang++: error: no such file or directory: '/Zc:__cplusplus'
[2/50] Building CXX object external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_gen_text.cpp.o
FAILED: external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_gen_text.cpp.o
C:\Users\joscott\AppData\Local\Android\Sdk\ndk\20.1.5948944\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android21 --gcc-toolchain=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Iexternal/src/flatbuffers/include -Iexternal/src/flatbuffers/grpc -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -O2 -DNDEBUG -fPIC /Zc:__cplusplus -std=gnu++11 -MD -MT external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_gen_text.cpp.o -MF external\src\flatbuffers-build\CMakeFiles\flatbuffers.dir\src\idl_gen_text.cpp.o.d -o external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/idl_gen_text.cpp.o -c external/src/flatbuffers/src/idl_gen_text.cpp
clang++: error: no such file or directory: '/Zc:__cplusplus'
[3/50] Building CXX object external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/code_generators.cpp.o
FAILED: external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/code_generators.cpp.o
C:\Users\joscott\AppData\Local\Android\Sdk\ndk\20.1.5948944\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android21 --gcc-toolchain=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Iexternal/src/flatbuffers/include -Iexternal/src/flatbuffers/grpc -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -O2 -DNDEBUG -fPIC /Zc:__cplusplus -std=gnu++11 -MD -MT external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/code_generators.cpp.o -MF external\src\flatbuffers-build\CMakeFiles\flatbuffers.dir\src\code_generators.cpp.o.d -o external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/code_generators.cpp.o -c external/src/flatbuffers/src/code_generators.cpp
clang++: error: no such file or directory: '/Zc:__cplusplus'
[4/50] Building CXX object external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/reflection.cpp.o
FAILED: external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/reflection.cpp.o
C:\Users\joscott\AppData\Local\Android\Sdk\ndk\20.1.5948944\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android21 --gcc-toolchain=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Iexternal/src/flatbuffers/include -Iexternal/src/flatbuffers/grpc -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -O2 -DNDEBUG -fPIC /Zc:__cplusplus -std=gnu++11 -MD -MT external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/reflection.cpp.o -MF external\src\flatbuffers-build\CMakeFiles\flatbuffers.dir\src\reflection.cpp.o.d -o external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/reflection.cpp.o -c external/src/flatbuffers/src/reflection.cpp
clang++: error: no such file or directory: '/Zc:__cplusplus'
[5/50] Building CXX object external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/util.cpp.o
FAILED: external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/util.cpp.o
C:\Users\joscott\AppData\Local\Android\Sdk\ndk\20.1.5948944\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android21 --gcc-toolchain=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/joscott/AppData/Local/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Iexternal/src/flatbuffers/include -Iexternal/src/flatbuffers/grpc -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -O2 -DNDEBUG -fPIC /Zc:__cplusplus -std=gnu++11 -MD -MT external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/util.cpp.o -MF external\src\flatbuffers-build\CMakeFiles\flatbuffers.dir\src\util.cpp.o.d -o external/src/flatbuffers-build/CMakeFiles/flatbuffers.dir/src/util.cpp.o -c external/src/flatbuffers/src/util.cpp
clang++: error: no such file or directory: '/Zc:__cplusplus'
[6/50] Building flatc (the FlatBuffer schema compiler)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/projects/firebase-cpp-sdk/app/.externalNativeBuild/cmake/release/x86_64/external/src/flatbuffers-build-flatc
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

flatc.vcxproj -> C:\projects\firebase-cpp-sdk\app\.externalNativeBuild\cmake\release\x86_64\external\src\flatbuffers-build-flatc\Debug\flatc.exe

ninja: build stopped: subcommand failed.

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?

What's the issue repro rate? (eg 100%, 1/5 etc)
100%

Firebase Realtime Database query is very slow on MAC OS 10.x

Please fill in the following fields:

Pre-built SDK from the website or open-source from this repo:
Firebase C++ SDK version: 6.12.0
Firebase plugins in use (Auth, Database, etc.): Auth, Realtime
Additional SDKs you are using (Facebook, AdMob, etc.): �Facebook
Platform you are using the C++ SDK on (Mac, Windows, or Linux): MAC
Platform you are targeting (iOS, Android, and/or desktop): MAC OS

Please describe the issue here:

Hi firebase team!

Currently, I'm querying the data on the MAC OS platform. I'm facing the problem as follows :

The query takes a long time (1 to 3 minutes) to return a response. So This affects the user experience of my app.

On the IOS, Android and Windows platforms all work very well. I only have this problem on MAC OS.

I also tested both link options x86_64 and universal. But this also could not help me solve this problem.

Here is the information regarding my project :

Xcode: 11.3.1

Firebase_cpp_sdk: [ as above ]

My query : ( same as on the IOS, Android and Windows platforms)

auto user = ap::Database::getInstance().getUserInfo();

firebase::database::DatabaseReference dbref = database->GetReference();

std::string path = cocos2d::StringUtils::format("users/%d/%s/", user._id, USER_REALTIME_VARIABLE);

auto result = dbref.Child(path).GetValue();

result.OnCompletion([callback](const Future<firebase::database::DataSnapshot>& result_data) {

	//my codes

});

As I know, MACOS doesn't officially support from firebase team, right?
Could the firebase team help me solve this issue?
Hopefully, I can get answers soon from your side.

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts? No, I have not tried.
What's the issue repro rate? 100%

Compiler Error in CMake project

Hello I am trying to compile my project with Firebase SDK integrated.

but getting these errors

error: no template named 'function' in namespace 'std' at the following code sections

this is from future_impl.h

#if defined(FIREBASE_USE_STD_FUNCTION) /// Register a callback that will be called when this future's status is set /// to Complete. /// /// If clear_existing_callbacksis true, then the new callback /// will replace any existing callbacks, otherwise it will be added to the /// list of callbacks. /// /// The future's result data will be passed back when the callback is /// called. /// /// @return A handle that can be passed toFutureBase::RemoveCompletion. virtual CompletionCallbackHandle AddCompletionCallbackLambda( FutureHandle handle, std::function<void(const FutureBase&)> callback, bool clear_existing_callbacks) = 0; #endif // defined(FIREBASE_USE_STD_FUNCTION)

and also at every place where std::function is used

I have made sure that we are using CXX STD greater than 11 and also we are including

There are some other errors like

/Users/Developer/MyProject/External/Firebase/iOS/firebase/internal/future_impl.h:303: error: variable has incomplete type 'void' inline void FutureBase::OnCompletion(std::function<void(const FutureBase&)> callback) const ^

Can you please help?

Authentication through service-account

Please fill in the following fields:

Pre-built SDK from the website or open-source from this repo:
Firebase C++ SDK version: latest
Firebase plugins in use (Auth, Database, etc.): Auth
Additional SDKs you are using (Facebook, AdMob, etc.):
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): Desktop

Please describe the issue here:

Currently the way to authenticate api access is to set api-key in AppOptions. Is it possible that we could also have support for initialization based on service account like Java, Go and python sdk?

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ?

Yes

What's the issue repro rate? (eg 100%, 1/5 etc)

100%

[ios] Crash on VerifyPhoneNumber

After I finally managed to build my Qt App for iOS (it works fine on Android already) with qmake (didn't know that I have to link to Analytics) the call to:

PhoneAuthProvider.VerifyPhoneNumber("+5511912344321", 2000, nullptr, listener);

Is crashing, is there a debug version of the CPP or IOS SDKs?
All I get is:

libc++abi.dylib: terminating with uncaught exception of type NSException

Any tips?

Unable to compile the c++ SDK with Cmake on Mac | target == iOS

Please fill in the following fields:

Pre-built SDK from the website or open-source from this repo:
Open source from: https://github.com/firebase/firebase-cpp-sdk.git

Firebase C++ SDK version: firebase_cpp_sdk_6.12.0
Firebase plugins in use (Auth, Database, etc.): Auth
Additional SDKs you are using (Facebook, AdMob, etc.): none
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): iOS

Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

I am trying to build firebase-cpp-sdk using CMake on MacOSX, targeting iOS.

When I run: cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake ..
I get the following error:

[100%] Built target protobuf
-- Failed to find LLVM FileCheck
-- git Version: v0.0.0
-- Version: 0.0.0
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_STD_REGEX -- compiled but failed to run
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- compiled but failed to run
CMake Error at ios_build/external/src/firestore-build/external/src/benchmark/CMakeLists.txt:251 (message):
Failed to determine the source files for the regular expression backend
From the CMakeError.log:

Run Build Command(s):/usr/bin/make cmTC_fe8f5/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_fe8f5.dir/build.make CMakeFiles/cmTC_fe8f5.dir/build
Building CXX object CMakeFiles/cmTC_fe8f5.dir/src.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -Wshorten-64-to-32 -fstrict-aliasing -Wno-deprecated-declarations -fno-exceptions -Wstrict-aliasing -DHAVE_CXX_FLAG_WD654 -wd654 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -wd654 -o CMakeFiles/cmTC_fe8f5.dir/src.cxx.o -c /Users/schramm/Desktop/firebase-cpp-sdk/ios_build/CMakeFiles/CMakeTmp/src.cxx
clang: error: unknown argument: '-wd654'
clang: error: unknown argument: '-wd654'
make[1]: *** [CMakeFiles/cmTC_fe8f5.dir/src.cxx.o] Error 1
make: *** [cmTC_fe8f5/fast] Error 2

Can anyone help me?

Inproper define "#if INTERNAL_EXPERIMENTAL" should be changed to "#ifdef INTERNAL_EXPERIMENTAL"

Please fill in the following fields:

Pre-built SDK from the website or open-source from this repo: prebuild
Firebase C++ SDK version: firebase_cpp_sdk_6.12.0
Firebase plugins in use (Auth, Database, etc.): Auth
Additional SDKs you are using (Facebook, AdMob, etc.): None
Platform you are using the C++ SDK on (Mac, Windows, or Linux): Any
Platform you are targeting (iOS, Android, and/or desktop): Any

Please describe the issue here:

MSVC compile with: /W4
compilation warning

firebase_cpp_sdk\include\firebase/app.h(232,5): warning C4668: 'INTERNAL_EXPERIMENTAL' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

This is regression compare to 6.2.0
Problem:
Below line

#if INTERNAL_EXPERIMENTAL

Should be replaced with

#ifdef INTERNAL_EXPERIMENTAL

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ? yes

What's the issue repro rate? 100%

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.