Unable to build 5.3.1-SNAPSHOT - Junit fails

162 views
Skip to first unread message

Kabilan B

unread,
Aug 14, 2017, 3:52:57 PM8/14/17
to Firebase Google Group
Hi All,

I have tried to build  java firebase-admin 5.3.1-SNAPSHOT using maven 3.5.0.

1) mvn validate works fine
2) mvn test fails and thowing below error message. Could you please help me to get rid of this.

Thanks in advance

Running com.google.firebase.auth.FirebaseAuthTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
Tests run: 36, Failures: 0, Errors: 3, Skipped: 7, Time elapsed: 0.763 sec <<< FAILURE! - in com.google.firebase.auth.FirebaseAuthTest
testAppWithAuthVariableOverrides[2](com.google.firebase.auth.FirebaseAuthTest)  Time elapsed: 0.016 sec  <<< ERROR!
java.util.concurrent.ExecutionException: java.io.IOException: The Application Default Credentials are not available. They are available if running on Google App Engine, Google Compute Engine, or Google Cloud Shell. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
        at com.google.firebase.auth.FirebaseAuthTest.testAppWithAuthVariableOverrides(FirebaseAuthTest.java:242)
Caused by: java.io.IOException: The Application Default Credentials are not available. They are available if running on Google App Engine, Google Compute Engine, or Google Cloud Shell. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

Kato Richardson

unread,
Aug 14, 2017, 6:49:14 PM8/14/17
to Firebase Google Group
Are you running this in App Engine or some other GCE? If not, then I think the most likely cause is that you need to call initializeApp() as described here.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/6b9d848f-ab5a-4e54-9ad5-6d01bb9f2d05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Hiranya Jayathilaka

unread,
Aug 14, 2017, 9:48:44 PM8/14/17
to fireba...@googlegroups.com
It seems this particular test case requires application default credentials. We can fix the test case to not require that. In the meantime you can follow the instructions given in the above error message, and get the issue resolved temporarily.


For more options, visit https://groups.google.com/d/optout.



--

Hiranya Jayathilaka | Software Engineer | h...@google.com | 650-203-0128

Hiranya Jayathilaka

unread,
Aug 14, 2017, 11:37:23 PM8/14/17
to fireba...@googlegroups.com
I've had some more time to look into this. My initial diagnosis was wrong. The test suite is programmed to set the GOOGLE_APPLICATION_CREDENTIALS environment variable by itself. But this is done using some reflection magic, which I think may not work in some environments. Can you share some details about your development environment (OS, Java version and build etc.)?

On Mon, Aug 14, 2017 at 6:47 PM, Hiranya Jayathilaka <h...@google.com> wrote:
It seems this particular test case requires application default credentials. We can fix the test case to not require that. In the meantime you can follow the instructions given in the above error message, and get the issue resolved temporarily.
Reply all
Reply to author
Forward
0 new messages