Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 5.10.0 changed behavior of admin.database.enableLogging(true) #230

Closed
ryanpbrewster opened this issue Mar 13, 2018 · 2 comments · Fixed by firebase/firebase-js-sdk#561
Assignees

Comments

@ryanpbrewster
Copy link
Contributor

[REQUIRED] Step 2: Describe your environment

  • Operating System version: linux
  • Firebase SDK version: v5.10.0
  • Firebase Product: database

[REQUIRED] Step 3: Describe the problem

In release v5.9.1, admin.database.enableLogging(true) enables logging messages for the database websocket connection. In release v5.10.0 this no longer works.

Steps to reproduce:

var admin = require('firebase-admin');
admin.database.enableLogging(true);
admin.initializeApp({ /* ... */ });
admin.database().ref("foo").set(42)

In v5.9.1 I get output like this:

p:0: Browser went online. 
0: set {"path":"/foo","value":42,"priority":null} 
p:0: Buffering put: /foo 
p:0: Making a connection attempt 
p:0: Auth token refreshed 
getToken() completed. Creating connection. 
c:0:0: Connection created 
c:0:0:0 Websocket connecting to wss://<database_name>.firebaseio.com/.ws?v=5 
c:0:0:0 Websocket connected. 
c:0:0: Realtime connection established. 
p:0: connection ready 
p:0: reportStats {"c":{"sdk.admin_node.5-9-1":1}} 
p:0: {"r":1,"a":"s","b":{"c":{"sdk.admin_node.5-9-1":1}}} 
p:0: {"r":2,"a":"gauth","b":{"cred":"..."}} 
p:0: {"r":3,"a":"p","b":{"p":"/foo","d":42}} 
p:0: from server: {"r":1,"b":{"s":"ok","d":""}} 
c:0:0: Primary connection is healthy. 
p:0: from server: {"r":2,"b":{"s":"ok","d":{"auth":null,"expires":1520981134}}} 
p:0: from server: {"r":3,"b":{"s":"ok","d":""}} 
p:0: p response {"s":"ok","d":""} 

In v5.10.0 I get no output.

@hiranya911
Copy link
Contributor

@schmidt-sebastian did something change in the latest RTDB code?

@schmidt-sebastian
Copy link
Contributor

We changed the underlying logging framework with firebase/firebase-js-sdk#473

We will look into these missing logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants