Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
Firebasestorage "downloadURL" function is not working properly, sometimes it works randomly

The below swift code is written to upload an image to firebase storage. Earlier it was working fine. But now onwards it works randomly. I waited 30mins to upload an image but didn't reach to success nor even in error.

I have tried different code to upload an image. Also, search a lot to analyze the problem. But sometimes it works randomly. I am not able to identify why this is happening.

To check if the image is uploading or not, I just put an observer to check the progress of an upload task, uploading works perfectly, but it didn't reach to completion block. I tried to generate download URL too after upload task done but it also didn't reach to completion block.

let storageRef = Storage.storage().reference().child("abc").child("myImage1234")
storageRef.putData(imageData, metadata: nil, completion: { (storageMetaData, error) in
    if let error = error {
        print(error.localizedDescription)
    } else {
        storageRef.downloadURL(completion: { (url, error) in
            if error != nil {
                print(error?.localizedDescription as Any)
                return
            }
            if let photoUrl = url?.absoluteString {
                self.imageUpload()
            }
        })
    }
})

I am really stuck at this point. Any help would be appreciated.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!