Describe the bug
Application crashes when logging in with an unverified or unregistrerd user.
To Reproduce
Steps to reproduce the behavior:
username: unverifieduser
password = `12345678`
Expected behavior
Open the main screen with logged user, or show an error message if the user is not unverified or registered.
Screenshots
GIF: https://img.esteem.ws/dzlvz21umx.gif

Smartphone (please complete the following information):
Additional context
Logcat captured
https://drive.google.com/file/d/1ORuCPo1HofMGuS2wZoCU4-XLZsCAtszF/view
I tried this out @realrufans and the app does not crash when I log in with an unverified user :/
I used this user:
username: unverifieduser
password: 12345678
Did I understand your report well? Also when reporting a bug can you please follow the Bug Report template we have, so I can understand better what the issue is?
Yes, you got the report right. I'm sorry for not using the right template.
And for the bug, I was still able to reproduce it. I'm on Android 8.1 (it crashed while trying to login with the username and password you provided). I also tried it with Android 5.1, the app crashed while trying to load MainActivity.
Here's the apk I installed on both Devices https://github.com/systers/mentorship-android/raw/apk/app-debug.apk
@realrufans You can still follow the template and edit the description of this issue ;) Here's a screenshot of how to do it:

I'll edit the description a bit.
Following the template can help you explain the bug better, like the android version you used, and the apk you used (mentioned on your last comment) ;)
Can you provide a console log? If you're not familiar with Android Studio and getting the log, thetre's no problem, just put as much information you can think on the description and I can ask someone to test this as well and see if anyone else experiences your problem.
Thank you for reporting this :)
@realrufans I added some information to the description, if you could add some more it would be great ;)
Updated.
For anyone that is interested in this issue: try to reproduce this bug before starting to work on this. If you get this bug as well, you can share information about it on this issue, and even work on solving it if you want
Hi ! I just tested it and it looks alright to me, I get a "Please verify your email before you log in ".

@isabelcosta
Thank you so much @jenpaff for testing this!
@realrufans I would suggest you'd download the most recent apk here, to see if the issue remains: https://github.com/systers/mentorship-android/raw/apk/app-debug.apk
I'll leave this open in case anyone else wants to test this.
Okay. On it
Same issue. You're sure it's the latest apk file?
Because I saw version 1 from the app info
@realrufans The logcat dump is pretty hard to navigate. Can you try running the app yourself and sending the relevant crash trace here?
@sidvenu okay. I will clone the repo on AS then copy the error from the logcat tab.
After cloning the project on AS, and running the project, I didnt get any error from Logcat. But the app still crashes. Maybe I have to close this issue till I am able to get the logcat.

After I changed the logcat filter from Error to Debug, I got this;
2019-05-29 17:36:19.753 11107-11107/org.systers.mentorship W/System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
2019-05-29 17:36:19.753 11107-11107/org.systers.mentorship W/System.err: at com.google.gson.Gson.fromJson(Gson.java:887)
2019-05-29 17:36:19.753 11107-11107/org.systers.mentorship W/System.err: at com.google.gson.Gson.fromJson(Gson.java:852)
2019-05-29 17:36:19.753 11107-11107/org.systers.mentorship W/System.err: at com.google.gson.Gson.fromJson(Gson.java:801)
2019-05-29 17:36:19.753 11107-11107/org.systers.mentorship W/System.err: at com.google.gson.Gson.fromJson(Gson.java:773)
2019-05-29 17:36:19.753 11107-11107/org.systers.mentorship W/System.err: at org.systers.mentorship.utils.CommonUtils.getErrorResponse(CommonUtils.kt:24)
2019-05-29 17:36:19.754 11107-11107/org.systers.mentorship W/System.err: at org.systers.mentorship.viewmodels.LoginViewModel$login$1.onError(LoginViewModel.kt:61)
2019-05-29 17:36:19.754 11107-11107/org.systers.mentorship W/System.err: at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:276)
2019-05-29 17:36:19.754 11107-11107/org.systers.mentorship W/System.err: at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
2019-05-29 17:36:19.754 11107-11107/org.systers.mentorship W/System.err: at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252)
2019-05-29 17:36:19.754 11107-11107/org.systers.mentorship W/System.err: at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
2019-05-29 17:36:19.754 11107-11107/org.systers.mentorship W/System.err: ... 7 more
2019-05-29 17:36:19.755 11107-11107/org.systers.mentorship W/System.err: Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
2019-05-29 17:36:19.755 11107-11107/org.systers.mentorship W/System.err: at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
2019-05-29 17:36:19.755 11107-11107/org.systers.mentorship W/System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
2019-05-29 17:36:19.755 11107-11107/org.systers.mentorship W/System.err: ... 17 more
@realrufans I suggest reopening this issue. can you add a Log.d("CommonUtils.kt", response.toString()) before the return function and post the Logcat here?
@realrufans thank you for putting out the error output here 馃檶
I suspect that this error:
Expected BEGIN_OBJECT but was STRING at line 1 column 1 path
happens when the JSON format we are expecting isn't what comes from the server. We have to know which data structure is causing this, I suspect it is Login class that holds the access token and expiry token. I'm not sure...
Since the app no longer crashes I am closing the issue.