Jay Ordway Jay Ordway - 6 months ago 113
Javascript Question

Firebase 3 - fetchProviderForEmail failed: First argument "email" must be a valid string

When calling this method with a blank email I received an error:

}).catch(function (err) {
console.log("Error " + err)

The error:

fetchProvidersForEmail failed: First argument \"email\" must be a valid string.

Q Prototype

The console logs are not printed out and the screen will often become disheveled as if the promises are not returned correctly.


If you are passing email parameter into this function, then make sure to define the address as let emailAddress : String = "Your Email". Or, if you are taking it from something like a UITextField, you can just pass textView.text? as the email parameter.

Hope this helped you!

Added Info Try this:

FirAuth().auth?.fetchProvidersForEmail(input : String){(result, error in
if(error != nil){
//No Error

It is something very close to that, I just did this yesterday, so I know that I am not too far off.