This repository was archived by the owner on Dec 3, 2023. It is now read-only.
This repository was archived by the owner on Dec 3, 2023. It is now read-only.
Closed
@vladimir-lu

Description

On line

this.quotaProjectId = ((ServiceAccountCredentials) credentials).getQuotaProjectId();
the check is instanceof QuotaProjectIdProvider but the cast is to ServiceAccountCredentials therefore you get

class com.google.auth.oauth2.UserCredentials cannot be cast to class com.google.auth.oauth2.ServiceAccountCredentials (com.google.auth.oauth2.UserCredentials and com.google.auth.oauth2.ServiceAccountCredentials are in unnamed module of loader 'app')

The cast needs to be changed. google-cloud-core version 1.92.0