question

MrZabbah-1468 avatar image
0 Votes"
MrZabbah-1468 asked ms-juanca commented

Problem setting the GOOGLE_APPLICATION_CREDENTIALS for my app

Hello! My problem is that when I try to set the GOOGLE_APPLICATION_CREDENTIALS environment variable, if I print the path it is correct. But when I try to create the instance of the Database and exception unhandled appears with the next message:
Error readind credential file from location X. Could not find a part of the path X. Please check the value of the environtment variable. But the value is correct and is set to the path of the private key of google project.

I set it on the app.xaml.cs on my base xamarin form project with Environment.SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", "C:/Users/myuser/Downloads/projectname-319700-ae570902a804.json");

If I add it on the project properties debug, it does not recognize it. Also I tried to set it on my CMD and restarting visual, but it neither recognize it. If I use this last option the exception is: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials.

I'm trying to follow the next guide : https://cloud.google.com/docs/authentication/getting-started

I'm doing this to connect my app to a firebase firestore database

@WenyanZhang-MSFT

dotnet-xamarinazure-ad-verifiable-credentials
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I've got an update. I remove all dependencies to Google.CLoud.FIrestore and, instead of it, I used Plugin.CLoudFirestore nuget package. With this I've been able to upload data to the data base, but the problem now is I can't receive it back. With this package I don't need to use google_application_credentials
Here is the official documentation I looking: https://github.com/f-miyu/Plugin.CloudFirestore

0 Votes 0 ·

TThis question is not related to Azure AD verifiable credentials. I would recommend posting your new question using the right tags.

Thanks,

Juan

0 Votes 0 ·

0 Answers