-
Notifications
You must be signed in to change notification settings - Fork 289
Closed
1 / 11 of 1 issue completedClosed
1 / 11 of 1 issue completed
Copy link
Labels
Description
I'm using the following code to initialize the firebase admin sdk:
GoogleCredentials credentials = GoogleCredentials.fromStream(credentialsStream, () -> transport)
.createScoped(myProperties.getScopes());
FirebaseOptions options = FirebaseOptions.builder()
.setCredentials(credentials)
.setHttpTransport(transport)
.build();
The credentialsStream I'm injecting is read from a service account file.
This code, which worked fine in 9.4.1, now fails in 9.4.2 with the followin error:
java.lang.NoClassDefFoundError: com/google/auth/CredentialTypeForMetrics
As far as I can tell, this issue is caused by a dependency conflict between the following libs:
- google-api-client:2.7.0
- google-auth-library-credentials:1.23.0
- google-auth-library-oauth2-http:1.29.0
- google-auth-library-credentials:1.29.0
maven selects google-auth-library-credentials:1.23.0 which causes the ServiceAccountCredentials class to fail to load due to the CredentialTypeForMetrics class only existing since google-auth-library-credentials version 1.28.0.
Adding an explicit dependency to google-auth-library-credentials:1.29.0 in my maven project seems to workaround the issue.
rahulpopuri, seabamirum, gdgenchev, matheuscsant and euan-maciver