firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.57k stars 1.45k forks source link

Firebase Storage: server with the specified hostname could not be found #6840

Closed lawgimenez closed 3 years ago

lawgimenez commented 3 years ago

Step 0: Are you in the right place?

[REQUIRED] Step 1: Describe your environment

[REQUIRED] Step 2: Describe the problem

Firebase Storage uploading and downloading was working before. And now it is throwing An unknown error occurred, please check the server response." UserInfo={_kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSErrorFailingURLStringKey=https://firebasestorage.googleapis.com/v0/b/<project>.appspot.com/o/images%2Ftest.jpg?uploadType=resumable&name=images%2Ftest.jpg, NSUnderlyingError=0x6000033ca0d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLKey=https://firebasestorage.googleapis.com/v0/b/<project>.appspot.com/o/images%2Ftest.jpg?uploadType=resumable&name=images%2Ftest.jpg, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <4C208B43-2F70-42E4-9F36-3E5EF75D85CD>.<1>"

Steps to reproduce:

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.

Relevant Code:

let storageReference = Storage.storage().reference(forURL: "gs://<project>.appspot.com/images/profileImg/" + Auth.auth().currentUser!.uid + ".jpg")
            let imageData = image.jpegData(compressionQuality: 0.1)
storageReference.putData()
// TODO(you): code here to reproduce the problem
schmidt-sebastian commented 3 years ago

@lawgimenez Thanks for reporting this. Are you seeing this from a specific (Mobile) network?

lawgimenez commented 3 years ago

I'm seeing this mostly on Emulators for now. I have not yet tested on real device. Will get back to you on that.

schmidt-sebastian commented 3 years ago

How are you connected to the Internet and from what region are you connection from? Are you able to use other Firebase services?

Please do let us know if this happens to occur on devices.

lawgimenez commented 3 years ago

Just received info that this was because of the ISP I was connected to based on the Firebase Support email. I am connected on the ISP Globe Telecom from Philippines and it seems they are blocking Firebase Storage endpoints. I don't even know why or what is the reason for the ISP blocking it.

schmidt-sebastian commented 3 years ago

Thanks for following up. It would be best if you filed a Customer Support ticket if this issue is not resolved soon.

See here: https://firebase.google.com/support/troubleshooter/contact