I also trying to authenticate for GCP using json file to use storage bucket but my code somehow not working on server but it working fine on my local machine
could you please help me?
I also trying to authenticate for GCP using json file to use storage bucket but my code somehow not working on server but it working fine on my local machine
could you please help me?
I’m facing an issue where my GoogleCredentials work perfectly fine on my local machine but don’t on the server. I’m using the following code:
InputStream credentialsStream = createJsonFile(keyFileStream);
GoogleCredentials credentials = GoogleCredentials.fromStream(credentialsStream)
.createScoped(
Collections.singletonList("https://www.googleapis.com/auth/devstorage.full_control")
);
Problem:
It works locally, but on the server, it doesn’t work. It gets stuck at this step without any error message. Anyone else faced this issue or have any solutions?
I have tried running the code on my local machine, and it works perfectly fine, so I assume that the credential file and API scopes are correctly configured in my local environment.
My expectation is that the code will work on both my local machine and the server in the same way, as they both use the same credentials and configuration.
Hi @manish.pal,
From the Java SDK, I’d say you’re probably not using Anvil, the Python web app development platform this forum is about! Anvil has its own built-in Google authentication integration, so I’m afraid you won’t find help here with the Java SDK.