title: FirebaseStorage Completion block not called. Objective-C
body: <p>I am trying to simply load in a picture from firebase storage into my IOS app, but my completion block is not being called. </p>
  
  <p>I use a TableViewController initially which loads plenty of pictures just fine. When I click on an item in the tableview it presents a simple view controller modally. I use the same code that successfully loads pictures in the TableViewController. <strong>In this modally presented view controller, my FirebaseStorage completion blocks do not execute.</strong> When I exit this view controller, the TableViewController can still load load pictures as necessary as I request.</p>
  
  <p>I have enabled logging with <code>-FIRAnalyticsDebugEnabled</code>
  and still do not receive any errors in my log.</p>
  
  <p>I have allowed all read and writes temporarily in my rules for FirebaseStorage.</p>
  
  <p>I have seen this question <a href="https://stackoverflow.com/questions/39923535/ios-setvalue-withcompletionblock-not-called">iOS setValue withCompletionBlock not called</a> which states in the comments that a specific version of firebase had some issue with FirebaseDatabase blocking some other completion blocks.</p>
  
  <p>The documentation said "Fixed a race condition where performing a transaction or adding an event observer immediately after connecting to the Firebase Realtime Database service could cause completion blocks for other operations to not be executed." from <a href="https://firebase.google.com/support/release-notes/ios#3.6.0" rel="nofollow noreferrer">https://firebase.google.com/support/release-notes/ios#3.6.0</a></p>
  
  <p>In the above question the asker fixed the problem by upgrading to Firebase 3.7.1, I am using 5.0.1</p>
  
  <p>Here are the versions I am using</p>
  
  <pre><code>Using Firebase (5.0.1)
  Using FirebaseAnalytics (5.0.0)
  Using FirebaseAuth (5.0.0)
  Using FirebaseCore (5.0.1)
  Using FirebaseDatabase (5.0.0)
  Using FirebaseInstanceID (3.0.0)
  Using FirebaseStorage (3.0.0)
  Using GTMSessionFetcher (1.1.15)
  Using GoogleToolboxForMac (2.1.4)
  Using leveldb-library (1.20)
  Using nanopb (0.3.8)
  Generating Pods project
  </code></pre>
  
  <p>I have logged all along my code to find that my code is being called, but the completion block is never executed. I am using the proper children ids, so I know that the storage reference does exist. I also know it is not a connection problem because the other pictures load fine just seconds before.</p>
  
  <pre><code>- (void)loadPicture {
      NSLog(@"Attempting to load picture");
      FIRStorageReference *ref = [[self.storageRef child:self.detailItem.faction] child:[self.detailItem firebaseEntry]];        
      [ref dataWithMaxSize:1024*1024 completion:^(NSData * _Nullable data, NSError * _Nullable error) {
          NSLog(@"Got a result!");
      }];
  </code></pre>
  
  <p>I am completely lost on what steps to take next. Has anyone experienced something similar or have any advice?</p>
  
  <p>I appreciate any feedback that might help! Thanks!</p>