My problem is, am I getting this error because recaptcha redirection is being done in the meantime?
Server connection failed for url: https://remoteprovisioning.googleapis.com/v1:signCertificates?challenge=AAABj0rwhPYBILStY-CiXiqz8_p2YT2WWl4x3I8=&request_id=c5797711-bada-4ed7-a986-3207c4bc7e4e,
response code: 400
Repeated failure count: 1
{
"error": {
"code": 400,
"message": "Invalid request payload: vendor_patch_level should in the format YYYYMMDD or YYYYMM if present.nRequestId: c5797711-bada-4ed7-a986-3207c4bc7e4e",
"status": "INVALID_ARGUMENT"
}
}
failed to provision keys
com.android.rkpdapp.RkpdException: HTTP error status encountered: 400
error fetching key for client 15801866: ERROR_UNKNOWN: HTTP error status encountered: 400
system/security/keystore2/src/rkpd_client.rs:172 - IGetKeyCallback failed: ERROR_UNKNOWN: HTTP error status encountered: 400
Encountered exception whilst fetching from GMS, deferring to Finsky: com.google.android.gms.common.api.ApiException: 17: API: IntegrityApiDisplayListener.API is not available on this device. Connection failed with: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
Please help
First of all, I tried creating multiple different firebase projects and got the same error.
I tried entering my phone number in different ways and got the same error in all of them.
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val binding = FragmentLoginBinding.bind(view)
_binding = binding
auth = Firebase.auth
callbacks = object : PhoneAuthProvider.OnVerificationStateChangedCallbacks(){
override fun onVerificationCompleted(credential: PhoneAuthCredential) {
signInWithPhoneAuthCredential(credential)
Log.i("errorPhone","onVerificationCompleted")
}
override fun onVerificationFailed(e: FirebaseException) {
Log.i("errorPhone","this Area = inSide")
if (e is FirebaseAuthInvalidCredentialsException) {
Log.i("errorPhone",e.toString())
} else if (e is FirebaseTooManyRequestsException) {
// The SMS quota for the project has been exceeded
Log.i("errorPhone",e.toString())
} else if (e is FirebaseAuthMissingActivityForRecaptchaException) {
// reCAPTCHA verification attempted with null Activity
Log.i("errorPhone",e.toString())
}
}
override fun onCodeSent(
verificationId: String,
token: PhoneAuthProvider.ForceResendingToken,
) {
// The SMS verification code has been sent to the provided phone number, we
// now need to ask the user to enter the code and then construct a credential
// by combining the code with a verification ID.
// Save verification ID and resending token so we can use them later
storedVerificationId = verificationId
resendToken = token
Log.i("errorPhone","this Area = " + storedVerificationId.toString())
//val action = LoginFragmentDirections.actionLoginFragmentToOtpVerifyFragment()
Navigation.findNavController(requireView()).navigate(R.id.action_loginFragment_to_otpVerifyFragment)
}
}
binding.loginBtn.setOnClickListener {
sendVerificationCode(binding.phoneNumberEdT.text.toString())
}
}
private fun sendVerificationCode(phoneNumber: String){
val options = PhoneAuthOptions.newBuilder(auth)
.setPhoneNumber(phoneNumber) // Phone number to verify
.setTimeout(30L, TimeUnit.SECONDS) // Timeout and unit
.setActivity(requireActivity()) // Activity (for callback binding)
.setCallbacks(callbacks) // OnVerificationStateChangedCallbacks
.build()
PhoneAuthProvider.verifyPhoneNumber(options)
Log.i("errorPhone",phoneNumber)
}
In the code above, first enter the sendverificationCode() function and carries out the transactions.
Inside the onViewCreated() function, there are functions that are overridden for callbacks.
I can enter the onCodeSent() function and get the storedVerificationId.
My problem is, am I getting this error because recaptcha redirection is being done in the meantime?
Panz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.