Closed
Description
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.