Automattic / Automattic/simplenote-android

No login possible with fresh accounts

Open
#1,360 2 comments 0 reactions 0 assignees View on GitHub
[Type] Bug
Dominant language
Java
Stars
1.9k
Forks
318
Avg merge
15h 23m
Merged PRs (30d)
5

Description

I cannot login with any password or mail, despite setting up 3 different new Simplenote accounts just for the purpose.
This is what logcat has to say:

```
2021-04-13 10:50:47.045 17971-18034/com.automattic.simplenote.debug D/Simperium.AsyncAuth: Exception: org.json.JSONException: Value invalid of type java.lang.String cannot be converted to JSONObject | Value invalid of type java.lang.String cannot be converted to JSONObject
2021-04-13 10:50:47.075 17971-18025/com.automattic.simplenote.debug D/EGL_emulation: eglMakeCurrent: 0xe5561700: ver 2 0 (tinfo 0xc6038f00)
2021-04-13 10:50:47.096 1974-5423/? E/InputDispatcher: Window handle Window{54c8798 u0 com.automattic.simplenote.debug/com.automattic.simplenote.authentication.SimplenoteCredentialsActivity} has no registered input channel
2021-04-13 10:50:47.168 17971-17971/com.automattic.simplenote.debug E/Simperium: Invalid username or password
com.simperium.client.AuthException: Invalid username or password
at com.simperium.android.AsyncAuthClient$1.onCompleted(AsyncAuthClient.java:124)
at com.simperium.android.AsyncAuthClient$1.onCompleted(AsyncAuthClient.java:112)
at com.koushikdutta.async.http.AsyncHttpClient.invokeWithAffinity(AsyncHttpClient.java:540)
at com.koushikdutta.async.http.AsyncHttpClient.access$800(AsyncHttpClient.java:50)
at com.koushikdutta.async.http.AsyncHttpClient$7.run(AsyncHttpClient.java:547)
at com.koushikdutta.async.AsyncServer.lockAndRunQueue(AsyncServer.java:708)
at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:725)
at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:626)
at com.koushikdutta.async.AsyncServer.access$700(AsyncServer.java:41)
at com.koushikdutta.async.AsyncServer$13.run(AsyncServer.java:568)
```

Here's what I tried so far:
* All accounts were created by clicking "Sign Up" in the app on the target devices and following the link in the resulting e-mail.
* Using a fresh emulated (Pixel4 API 29) in Android Studio as well as a real device (Oppo Reno 10x), but it's all the same.
* The accounts per se work. I could successfully log in to all of them (after failed attempts through the app) using Simplenote Web on the testing devices.
* StackOverflow, but nothing applicable there.
* Looking specifically into the JSON Exception, which occurs every time, but I can't find the root cause of it:
- There is no exception when creating the account
- Even the login itself seems to go smoothly from what I can tell by debugging, as the request sent appears sensible and `mIsLogin == true` at one point
- Possibly bad response?

What I didn't do:
* no changes to the code
* no special environments or AVD settings
* no special characters in login credentials, password is only lowercase + numbers
* nothing that isn't mentioned in the [configuration guidelines](https://github.com/Automattic/simplenote-android/blob/develop/README.md#how-to-configure)

Contributor guide

Open the contributing guide

Research direction

Reproduce the login failure on the Android app and begin with the logcat entries for SimplenoteCredentialsActivity and AsyncAuthClient. Compare the app's response handling with the reported JSON error and verify the behavior against the working Simplenote Web login. Done means fresh accounts can log in successfully through the app without the reported authentication error.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
authentication, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.