android icon indicating copy to clipboard operation
android copied to clipboard

App crashes if user enters wrong credentials

Open togglecode opened this issue 9 years ago • 4 comments

Actual behaviour

-App crashes if User enters wrong credentials in login

Expected behaviour

-App should not crash and just prompt that the username password is incorrect

Steps to reproduce

  1. Try to login to a Nextcloud Server Version 11
  2. Enter wrong credentials
  3. App totally crashes

Environment data

Android version: 7.1.2

Device model: Moto Play

Nextcloud app version: 2.0.0 RC5

Nextcloud server version: 11.0.1.2

Logs

09-04 16:28:37.978 12056-12282/com.nextcloud.client D/OwnCloudClient #5: REQUEST HEAD /remote.php/webdav/
09-04 16:28:38.215 12056-12282/com.nextcloud.client I/AuthChallengeProcessor: Basic authentication scheme selected
09-04 16:28:38.216 12056-12282/com.nextcloud.client I/HttpMethodDirector: Failure authenticating with BASIC
09-04 16:28:38.217 12056-12282/com.nextcloud.client D/ExistenceCheckRemoteOperation: Existence check for https://myserver.com/remote.php/webdav/ targeting for  existence finished with HTTP status 401(FAIL)
09-04 16:28:38.245 12056-12056/com.nextcloud.client D/AndroidRuntime: Shutting down VM
09-04 16:28:38.246 12056-12056/com.nextcloud.client E/AndroidRuntime: FATAL EXCEPTION: main
                                                                      Process: com.nextcloud.client, PID: 12056
                                                                      java.lang.IllegalArgumentException: No suitable parent found from the given view. Please provide a valid view.
                                                                          at android.support.design.widget.Snackbar.make(Snackbar.java:137)
                                                                          at com.owncloud.android.authentication.AuthenticatorActivity.onAuthenticatorTaskCallback(AuthenticatorActivity.java:1826)
                                                                          at com.owncloud.android.authentication.AuthenticatorAsyncTask.onPostExecute(AuthenticatorAsyncTask.java:102)
                                                                          at com.owncloud.android.authentication.AuthenticatorAsyncTask.onPostExecute(AuthenticatorAsyncTask.java:41)
                                                                          at android.os.AsyncTask.finish(AsyncTask.java:673)
                                                                          at android.os.AsyncTask.-wrap1(AsyncTask.java)
                                                                          at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:690)
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                          at android.os.Looper.loop(Looper.java:154)
                                                                          at android.app.ActivityThread.main(ActivityThread.java:6236)
                                                                          at java.lang.reflect.Method.invoke(Native Method)
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)

togglecode avatar Sep 04 '17 14:09 togglecode

@tobiasKaminsky You might wanna have a look at the Snackbar.make() line in AuthenticatorActivity.java:1826 which you have modified

togglecode avatar Sep 04 '17 14:09 togglecode

hi @togglecode this has been fixed by @tobiasKaminsky via #1463 and will ship with RC6 🚀

AndyScherzinger avatar Sep 04 '17 14:09 AndyScherzinger

@AndyScherzinger Sorry my bad, didn't search in closed issue. Thanks

togglecode avatar Sep 04 '17 14:09 togglecode

no worries @togglecode - most important thing is, that is has been fixed :) better have it reported twice and fixed than not reported at all 👍

AndyScherzinger avatar Sep 04 '17 14:09 AndyScherzinger