java - Google Firebase server persistent connection invalid_token -
i'm trying use firebase server sdk monitor value @ specific path. followed documentation yet after time passes, start seeing log errors like:
[warn] persistentconnection: pc_0 - authentication failed: invalid_token (access denied.)
i'm using latest release:
com.google.firebase:firebase-server-sdk:3.0.0
i followed java guide installation & setup servers yet error still occurs after time , doesn't invoke code can hook attempt re-authenticate. has had similar issue , know of resolution?
update 2016-05-31:
i enabled debugging , see persistent connection thread indeed refreshing authentication after these warnings.
i can narrow down scope of problem based on information , further testing:
any long running valueeventlistener
attached databasereference
before token refresh stops receiving data after initial token expires. example, listener attached right after application startup.
attaching new listener database reference , disposing of listener after results works fine.
however, behavior defeats "live data" aspect of firebase. cannot expect - of 3.0.0 anyway - listener receive data life of application. seems there's major bug in firebase.
update: we've released 3.0.1 sdk should resolve issue.
we've uncovered bug in 3.0.0 firebase java server sdk can fail re-authenticate firebase database backend. happen if process runs longer hour , don't have active listeners (in particular @ 1 hour mark). see [warn] persistentconnection: pc_0 - authentication failed: invalid_token (access denied.)
error appear repeatedly in console log.
we'll releasing new version (firebase-server-sdk 3.0.1) shortly fix. until then, can work around issue keeping active listener (e.g. addvalueeventlistener() on dummy location).
sorry inconvenience! we'll try fix out possible.
Comments
Post a Comment