Closed pejas closed 7 years ago
@mikelehen can you comment on why this is WARN
and not DEBUG
or INFO
. Seems like a reasonable concern.
Yeah. I believe a fix for this is in the works, but not sure when it'll be released. cc/ @schmidt-sebastian
Still having this issue. Any updates on the fix?
Hrm. I thought this got fixed. What version of which SDK (firebase or firebase-admin) are you using?
Er, woops. Since this is the quickstart-java repo, I'll assume it's the java server sdk.
Yes it is the java server sdk.
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-server-sdk</artifactId>
<version>3.0.1</version>
</dependency>
Just realized that I don't have the most recent version. Rip fam.
Is this what I need?
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>4.1.1</version>
</dependency>
EDIT: I have resolved this issue by upgrading to the latest SDK and using the new initialize methods. Cheers!
FileInputStream refreshToken = new FileInputStream("./firebase-admin.json");
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredential(FirebaseCredentials.fromRefreshToken(refreshToken))
.setDatabaseUrl(databaseUrl)
.build();
FirebaseApp.initializeApp(options);
Yep, that's exactly what you need. It looks like this quickstart is out of date! Glad to hear the new SDK solved the problem.
Fixed by #8
My application logs this line from time to time with log level WARN. As described in #5 this is expected behaviour, application recovers and works fine.
Please change log level for this message to DEBUG (or at least INFO).
WARN alerts admins and they involve devs to investigate which is unnecessary.
If created this issue in wrong project please point me to right one.
Best Regards