title: Firebase write failed but completion handler didn't return error
body: <p>This code has been running stably for about a year.
  However in one instance recently updateChildValues did not write userDetails to the database but the else block (user profile created successfully) was still executed leading to a user profile that just contained value result.token at the key fcm-token.
  If the ref.updateChildValues write is successful a profile is created with the contents of userDetails and the FCM token.</p>
  
  <p>What circumstances could have caused this?</p>
  
  <pre><code>let userDetails: Dictionary&lt;String, Any&gt; = ["userName" : chosenName, "user-level" : BASIC, "email-addr" : emailAddr, ACC_CREATE_DATE_STR : timeStamp, ACC_LAST_ACTIVITY_STR : timeStamp]    
  ref.updateChildValues(userDetails, withCompletionBlock: { (error, ref) in
               if let err = error {
                   let createAlert = UIAlertController(title: "Error", message: "Please try again\n\(err.localizedDescription)", preferredStyle: .alert)
                   createAlert.addAction(UIAlertAction(title: "Got it", style: .default, handler: nil))
                   self.present(createAlert, animated: true, completion: nil)
               } else {
                   // user profile created successfully
                   InstanceID.instanceID().instanceID(handler: { (result, error) in
                       if let error = error {
                           print("Error fetching FCM token: \(error)")
                       } else if let result = result {
                          ref.child("fcm-token").setValue(result.token)
                       }
                       self.dismiss(animated: true, completion: nil)
                     })
                   }
                 })
  </code></pre>