Comments (8)
As a follow-up for those interested: I tried a lot of things:
- Compile master in MacOS --> same crash (memmove operation in the Curl background thread)
- Compile master in Windows --> same crash
This made me realize it was probably not a dependency issue, as it behaves exactly the same on MacOS and Windows, in both the binary release and compiled from source (master).
The quickstart example did not crash.
After a lot of testing, I figured out there is no crash when waiting for the future to be complete (like in the quickstart example) instead of using the OnCompleted callback.
It still works if I do use the OnCompleted callback, but wait for the future to be complete after Call'ing the function.
So that is what I am doing now. It is not a bad workaround in my case because I call the function from the logon completed callback anyway, so I don't block the main thread.
from firebase-cpp-sdk.
Was running into the exact same issue.
In my case I resolved the issue by ensuring the HttpsCallableReference
was not destroyed until the future had resolved. The destructor for this class releases the future and calls rest::CleanupTransportCurl()
which I imagine is the cause of the problem.
from firebase-cpp-sdk.
Another strange thing that could help:
It also crashes when using auto pFirestore = firestore::Firestore::GetInstance(pFireBaseApp);
before the function call, even when not using Auth.
Even stranger: when I move the auto pFirestore = firestore::Firestore::GetInstance(pFireBaseApp);
after the function call, the completed callback is never reached. At shutdown, I then get this error:
WARNING: Auth object 0x5d786ce0 should be deleted before the App 0x5d78b790 it depends upon.
When I put the auto pAuth = firebase::auth::Auth::GetAuth(pFireBaseApp);
line after the function call, or both pAuth and pFirestore lines, the OnCompleted callback is never reached but no complaints at shutdown.
from firebase-cpp-sdk.
Hi @OpenJeDi !
So first, it would really help if you were able to reproduce this issue in the quickstart. Here's the Firestore one and here's the Auth one. This helps get us much closer to the source of the issue much faster.
Further, it might help if you switch to the open source SDK in this repository. I cover a little bit about the differences between the two here, but the TLDR is that the source release is identical to the binary one. It will just be easier to track any bugs and there's a small chance that one or more of the binaries we ship won't work in your configuration (Firebase ships a C++ SDK, and as you may know, the ABI isn't always stable between even different versions of the same operating system. I haven't seen this cause an issue on MacOS, but occasionally it crops up in Linux).
If you cannot repro it here and going to the open source sdk doesn't help, I see that you're using Qt. The next most useful thing may be to get steps from a new Qt project (I assume you're using QMake or are you on CMake?) to an error state.
Let me know how this all goes!
--Patrick
from firebase-cpp-sdk.
Also, can you share the full stack trace (including the exception message)?
from firebase-cpp-sdk.
Thanks, I will take all the steps you propose.
We are still using qmake although the transition to cmake has been on my list for a long time. Transitioning to a different cloud system is a big task though, so I'm not going to overcomplicate it with combining those efforts now.
Also, note that I was using Auth, Firestore (and before that Database) and Storage successfully already. It is only Functions that is not working.
I'll try the Auth, Firestore and Functions quickstart examples with the latest tag from GitHub anyway. Or should I use the master branch?
from firebase-cpp-sdk.
I tried the functions quickstart example with the current master of the cpp SDK (d0fc238). This is the output:
Initialized Firebase App.
Initializing Firebase Auth and Cloud Functions.
Attempt to initialize Firebase Auth.
Attempt to initialize Cloud Functions.
Successfully initialized Firebase Auth and Cloud Functions.
ERROR: Could not sign in anonymously. Error 1: An internal error has occurred.
Ensure your application has the Anonymous sign-in provider enabled in Firebase Console.
Attempting to connect to Cloud Functions anyway. This may fail depending on the function.
Calling addNumbers
FAILED!
Error 13: INTERNAL
Shutting down the Functions library.
SUCCESS: Reference was invalidated on library shutdown.
Signing out from anonymous account.
Shutting down the Auth library.
Shutting down Firebase App.
I did enable anonymous login though.
The application hangs at that last line, it doesn't actually shut down.
I will try the source version of the cpp SDK with my application to see if there is any change in behviour.
from firebase-cpp-sdk.
Thanks for the investigation and workaround!
from firebase-cpp-sdk.
Related Issues (20)
- [Question] Is it possible to use firebase_cpp_sdk in NDK code and com.google.firebase:firebase-analytics in java code HOT 1
- [Bug] Deadlock in firebase::auth::IdTokenRefreshThread HOT 1
- [Bug] MemoryLeak
- Firebase C++ SDK - Windows 10 - Build Error HOT 10
- [Bug] ld: symbol(s) not found for architecture arm64
- [FR] Add Windows Arm64 support HOT 2
- [Bug] Firestore Returning Snapshots For Documents That Do Not Exist HOT 5
- [FR] Missing claims on GetToken HOT 1
- [Question] Linking of prebuilt vs local build HOT 2
- [Bug] Firestore Can't Connect To Internet And Goes Offline Errantly HOT 4
- [Bug] HOT 2
- [Question] Best Way To Modify Firebase's storage directory for testing HOT 2
- [FR] Linux - Yocto support HOT 4
- [Bug] Bad minSdkVersion in firebase_messaging_cpp.aar HOT 6
- [Question] Can Firebase C++ 11.7.0 be used with Firebase Apple SDK 10.20.0? HOT 2
- [Bug] Auth Emulator Support Doesn't Seem To Work On Windows HOT 7
- [Bug]
- [Bug]
- [Bug] Windows Server 2016+2019 missing icu.dll HOT 2
- [FR] Add support to realtime database for Variants containg Blobs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebase-cpp-sdk.