Closed arikshik closed 7 years ago
Is your "Game" directly under the root node? If not you will need to specify the path to the Game node. For example if your node structure is root -> tournament -> Game you will need to modify the code to be:
PushResponse response = await client.PushAsync("tournament\Game", new Game
{
ID = "456",
Name = "Birds"
});
Tried it, doesn't work. It seems like any request I make fails on the same error, even a simple Get. Could it be something with the authentication?
Assuming you got the BasePath and AuthSecret right I don't think it is an authentication problem. Can you post your db structure from the Firebase console? you can hide the values, i'm only interested in the keys.
Sure, simple JSON which corresponds to the test example: { "tournament" : { "Game" : { "ID" : "a", "Name" : "b" } } }
The code for GET: public static async void WriteToFirebase() { IFirebaseConfig config = new FirebaseConfig { AuthSecret = "**", BasePath = "**" };
IFirebaseClient client = new FirebaseClient(config);
FirebaseResponse response = await client.GetAsync("tournament/Game");
Game g = response.ResultAs<Game>();
}
The error: FirebaseException: An error occured while execute request. Path : tournament/Game , Method : GET
BTW tried it with both right/left slash. Same error.
ISSUE CAN BE CLOSED: I figured out this is a network issue, some proxy in my office preventing the REST calls from going out properly. The same code works good on a VM on Google cloud. Thanks.
Hi - I'm new to Firebase, please advise what I'm doing wrong. I'm getting "An error occured while execute request. Path : Game , Method : POST" BTW - just making sure - I put the legacy database secret (from console) I have in the AuthSecret. Thanks.
The code: