-
Notifications
You must be signed in to change notification settings - Fork 139
"You need to pass auth instance to use gRPC-fallback client in browser. Use OAuth2Client from google-auth-library." #489
Comments
Sorry for the trouble, Yannick. Are you able to do the analyzing on the backend portion of the app, and use a service account JSON key file? Those can be downloaded in the same place as the OAuth-format client_secrets.json. |
Hello stephen, But i got the same error again. To feed you with some information about my project, here is a short summary: Looking forward to your replies! |
Interesting! That article links to the authentication guide that shows how to generate an API key, which is the name for a string token-like code, as opposed to a “key file”. They didn’t actually use an “API key”, but a service account key file. Did you try getting a key file like they show in this guide:? https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account You would store that file locally, then pass it as “keyFilename” in the constructor. Alternatively, you can create an environment variable, “GOOGLE_APPLICATION_CREDENTIALS” that is a path to the file and our library will pick it up automatically. |
@stephenplusplus @Zanyy browser-side support for our gRPC clients is possible, but experimental. Our peer Alex documents the approach here: |
Good Morning Stephen and Benjamin! @stephenplusplus I found this Issue_Thread: @bcoe I will give it a try, seems interesting! |
A little supplement : |
@Zanyy with Electron, I believe there are two parts to the application, one that runs browser-side (which would require the fallback) and one that runs in Node.js. I think you could potentially start up a server when your application starts that the browser then talks to, this server would not require the gRPC fallback, and might be the better design; You're being bitten by the fact that our libraries are designed primarily to run on Node.js not in the browser. |
Hello all, |
👍 awesome @Zanyy. Let us know if you end up having any more questions. |
Hello Guys,
i'm currently working in Node.js and Electron to program a desktop application that extracts information from an image. ( with help from Google Cloud Vision)
So far so good, but if I now try to authorize myself :
I get the Error mentioned in the title.
I've been trying to find a solution to this (simple) problem for two days. The proposed solutions on Github to this issue did not lead to any improvement.
I would be happy to receive your suggestions
Best Regards,
Yannick
The text was updated successfully, but these errors were encountered: