title: Unity Firebase Null reference problem. After firebase authentication cannot send or recieve data in unity 2020.1.17f
body: <p>Here is the code i am currently using to send data and receive data:
  all the plugins have been downloaded to the latest version.we are trying to use firebase real time database is send and receive scores that have to be implemented in the game.</p>
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  using Firebase.Auth;
  using Firebase;
  using Google;
  using Firebase.Database;
  using System.Linq;
  
  public class LBnew : MonoBehaviour
  {
      private GoogleSignInConfiguration configuration;
      private FirebaseAuth auth;
      public string userID;
      private DatabaseReference reference;
      public string webClientId = &quot; &lt;your client id&gt;&quot;;
      private void Awake()
      {
          FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task =&gt;
          {
              var dependencyStatus = task.Result;
              if (dependencyStatus == DependencyStatus.Available)
              {
                  FirebaseApp app;
                  app = FirebaseApp.DefaultInstance;
                
                  Initialize();
              }
              else
              {
                  Debug.Log(&quot; not resolve firebase dependencies&quot;);
              }
    
          });
      }
      void Initialize()
      {
          configuration = new GoogleSignInConfiguration { WebClientId = webClientId, RequestEmail = true, RequestIdToken = true };
          auth = FirebaseAuth.DefaultInstance;
           userID = FirebaseAuth.DefaultInstance.CurrentUser.DisplayName;
            reference = FirebaseDatabase.DefaultInstance.RootReference;
        
  
          Debug.Log(&quot; initiallized&quot;);
          sendscore();
      }
      public void sendscore()
      {
          StartCoroutine(UpdateScore(10));
      }
      private IEnumerator UpdateScore(int _score)
      {
          Debug.Log(&quot; Your userID &quot; + userID);
          //Set the currently logged in user score
          var DBTask = reference.Child(&quot;user&quot;).Child(userID).Child(&quot;score&quot;).SetValueAsync(_score);
          yield return new WaitUntil(predicate: () =&gt; DBTask.IsCompleted);
  
          if (DBTask.Exception != null)
          {
              Debug.LogWarning(message: $&quot;Failed to register score task with {DBTask.Exception}&quot;);
             // Debug.Log(&quot; failed to reg score &quot;);
  
          }
          else
          {
              Debug.Log(&quot; success to reg score &quot;);
  
          }
          StartCoroutine(LoadScoreboardData());
      }
      private IEnumerator LoadScoreboardData()
      {
         
  
          var DBTask = reference.Child(&quot;users&quot;).OrderByChild(&quot;score&quot;).GetValueAsync();
  
          yield return new WaitUntil(predicate: () =&gt; DBTask.IsCompleted);
  
          if (DBTask.Exception != null)
          {
              Debug.LogWarning(message: $&quot;  load leaderboard task with {DBTask.Exception}&quot;);
              Debug.Log(&quot; srinu failed to load leaderScoreboardData  &quot;);
          }
          else
          {
              //Data has been retrieved
              DataSnapshot snapshot = DBTask.Result;
  
              //Destroy any existing scoreboard elements
              //foreach (Transform child in scoreboardContent.transform)
              //{
              //    Destroy(child.gameObject);
              //}
  
              //Loop through every users UID
              //foreach (DataSnapshot childSnapshot in snapshot.Children)
              //{
  
              foreach (DataSnapshot childSnapshot in snapshot.Children.Reverse&lt;DataSnapshot&gt;())
              {
                 
  
                  // Instantiate new scoreboard elements
                 // GameObject scoreboardElement = Instantiate(scoreElement, scoreboardContent);
                 // scoreboardElement.GetComponent&lt;LbAllList&gt;().NewDataElement(username, Schoolname, score);
                  Debug.Log(&quot;  leaderScoreboardData  &quot; + childSnapshot.Child(&quot;score&quot;));
              }
              //}
  
  
          }
      }
  }
  </code></pre>
  <p>we are using unity 2020.1.17f as the version of unity
  Any help would be appreciated thanks</p>