He works as intended. The callback associated with the .set () method is optional and will only receive an obj error if an error occurs. Since there seems to be no error since the data is being written to firebase, then the resulting err parameter is actually null, and therefore you see nothing in the console.
adjust the .log console as follows:
rootRef.set(data, function (err) { console.log("callback complete! ", err); });
Now, if you run your code, you will see that "callback complete!" in the console, and you will only see "err" if it really exists.
source share