dev-kasibhatla / krissues

A repository only meant for tracking issues of Oregional Farms app.
0 stars 0 forks source link

Phone number verification bugs and suggestions #4

Open msvamp opened 4 years ago

msvamp commented 4 years ago

Bug: Auto-close window or inform user if verification successful

  1. Login to the app
  2. Go to the Account section, tap Add phone number and enter the number.
  3. Tap the Update phone button.
  4. The dialog with the title Enter SMS Code... appears and the verification happens automatically if the SIM is in the same phone.
  5. There is no toast message or anything that tells the user that verification has completed (the profile status line in the Account window does become green, but that is hardly a noticeable change) so that the window can be closed. Profile status line
  6. Moreover, if I actually enter my SMS verification code there and tap Done, the dialog doesn't close although verification is already done. Instead, it apparently tries to re-verify -
    
    Some information is obfuscated

08-14 14:50:09.540 10935 11695 I flutter : AuthCredential 08-14 14:50:09.551 1301 3174 W FirebaseAuth: [PhoneNumberAuthPostProcessor] postProcess starts 08-14 14:50:09.551 1301 3174 W FirebaseAuth: [PhoneNumberAuthPostProcessor] postProcess ends 08-14 14:50:09.586 1301 8487 I AuthChimeraService: Executing request: ProxyRequest[ url: https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPhoneNumber?alt=proto&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, method: 1 ] [CONTEXT service_id=16 ] 08-14 14:50:10.299 1301 4824 E Volley : [2117] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPhoneNumber?alt=proto&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 08-14 14:50:10.300 1301 8487 I AuthChimeraService: Error description received from server: SESSION_EXPIRED [CONTEXT service_id=16 ] 08-14 14:50:10.304 10935 11695 I flutter : PlatformException(ERROR_SESSION_EXPIRED, The sms code has expired. Please re-send the verification code to try again., null)


---

### Suggestion: Descriptive error in number verification
If an error occurs while attempting to verify a phone number (immediately after step 3), the app shows a very generic error message and the verification fails. But the phone number in the profile changes although the verification failed. Moreover, if I try to set it to my previous number again, it re-requests a verification SMS although the previous verification had succeeded just a few minutes ago.

Some information is obfuscated

08-14 15:19:29.703 10935 10959 W DynamiteModule: Local module descriptor class for com.google.firebase.auth not found. 08-14 15:19:29.703 10935 10959 I FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions. 08-14 15:19:29.703 10935 10959 I FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation 08-14 15:19:29.758 1301 2500 W FirebaseAuth: [PhoneVerificationSession] PhoneVerificationSession constructor 08-14 15:19:29.759 1301 3174 W FirebaseAuth: [PhoneNumberAuthPostProcessor] postProcess starts 08-14 15:19:29.807 1301 1347 I AuthChimeraService: Executing request: ProxyRequest[ url: https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?alt=proto&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, method: 1 ] [CONTEXT service_id=16 ] 08-14 15:19:31.437 1301 4823 E Volley : [2116] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?alt=proto&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 08-14 15:19:31.461 1301 1347 I AuthChimeraService: Error description received from server: TOO_MANY_ATTEMPTS_TRY_LATER [CONTEXT service_id=16 ] 08-14 15:19:31.472 1301 1301 W FirebaseAuth: [PhoneVerificationSession] onFailure 08-14 15:19:31.477 10935 11695 I flutter : We have blocked all requests from this device due to unusual activity. Try again later. 08-14 15:19:31.481 10935 11695 I flutter : {name: Xowihe Radar, address: Hell - where everyone has to go someday 08-14 15:19:31.481 10935 11695 I flutter : Heaven 08-14 15:19:31.481 10935 11695 I flutter : Earth, phone: +91XXXXXXXXXX, email: XXX@XXX.XXX, pincode: 1.1.1., eVer: true, pVer: false, wallet: 0, walletHistory: , city: Mumbai, gender: Other, age: 99} 08-14 15:19:31.495 10935 11695 I flutter : {eVer: true, pincode: 1.1.1., address: Hell - where everyone has to go someday 08-14 15:19:31.495 10935 11695 I flutter : Heaven 08-14 15:19:31.495 10935 11695 I flutter : Earth, wallet: 0, gender: Other, walletHistory: , city: Mumbai, phone: +91XXXXXXXXXX, pVer: false, name: Xowihe Radar, age: 99, email: XXX@XXX.XXX} 08-14 15:19:31.495 10935 11695 I flutter : trying orders 08-14 15:19:31.502 10935 11695 I flutter : Error fetching order data: NoSuchMethodError: The method '[]' was called on null. 08-14 15:19:31.502 10935 11695 I flutter : Receiver: null 08-14 15:19:31.502 10935 11695 I flutter : Tried calling: 08-14 15:19:31.502 10935 11695 I flutter : orders done 08-14 15:19:31.502 10935 11695 I flutter : Fetching cities 08-14 15:19:31.665 1301 3174 W FirebaseAuth: [PhoneNumberAuthPostProcessor] postProcess ends 08-14 15:19:32.483 10935 11695 I flutter : citits: [XXXX, Mumbai] 08-14 15:19:32.765 10935 10947 I ushinavakalpan: Background young concurrent copying GC freed 25253(1195KB) AllocSpace objects, 13(688KB) LOS objects, 40% free, 2784KB/4697KB, paused 161us total 157.498ms

App version: 1.0.2 (Release) Android version: 10 (LineageOS 17.1)

dev-kasibhatla commented 4 years ago

Auto close window and show when verification successful have been implemented, but for some reason are not functioning correctly. Pushing out another update. Please try again I will un-verify your number

dev-kasibhatla commented 4 years ago

Yes the phone number in profile changes and your verification state goes to unverified when a new phone verification fails. I don't keep a track of when the last verification occurred. So any new number being verified is sent a verification code.