Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug : the application is not supposed to crash because of a server error #1175

Open
yveskalume opened this issue Nov 16, 2021 · 10 comments · May be fixed by #1185
Open

Bug : the application is not supposed to crash because of a server error #1175

yveskalume opened this issue Nov 16, 2021 · 10 comments · May be fixed by #1185

Comments

@yveskalume
Copy link

Describe the bug

an internal error makes the application crash when a new user tries to signup

To Reproduce

Steps to reproduce the behavior:

  1. Go to Sign Up
  2. Complete the informations
  3. Click on Sign Up button
  4. See error the sign up screen will close without message. In the log of android studio you can see "HTTP 500 Internal Server Error".

Expected behavior

an error that something is wrong should be displayed without the application crashing

Smartphone (please complete the following information):

  • OS: Android
  • Version 10

Additional context

this can be fixed by adding a try catch in the AuthDataManager (I've already tested and it worked)

@epicadk
Copy link
Member

epicadk commented Nov 16, 2021

Can someone validate this? @anitab-org/mentorship-testers

Also if this is the case why doesn't this work?

try {
message = authDataManager.register(register).message
successful.postValue(true)
} catch (throwable: Throwable) {
message = CommonUtils.getErrorMessage(throwable, tag)
successful.postValue(false)
}

@yveskalume
Copy link
Author

@epicadk although there is a try catch in the viewmodel, you have to add another one in the AuthManager and throw an exception in the catch scope

@yveskalume
Copy link
Author

Can i open a PR ?

@epicadk
Copy link
Member

epicadk commented Nov 17, 2021

Sure

@vj-codes
Copy link
Member

Can someone validate this? @anitab-org/mentorship-testers

Also if this is the case why doesn't this work?

try {
message = authDataManager.register(register).message
successful.postValue(true)
} catch (throwable: Throwable) {
message = CommonUtils.getErrorMessage(throwable, tag)
successful.postValue(false)
}

Yes the issue is valid, @yveskalume thank you so much for reporting it :)

@epicadk epicadk linked a pull request Jan 24, 2022 that will close this issue
11 tasks
@rishujam
Copy link

rishujam commented Nov 12, 2022

Hey, Is this project still being maintained?

@vj-codes
Copy link
Member

Hey yes being maintained

@OwaisKhatri
Copy link

Do I need to setup the backend also to build & run this Android app?

@vj-codes
Copy link
Member

Do I need to setup the backend also to build & run this Android app?

Hey no you can download the apk directly

@OwaisKhatri
Copy link

I build this project and run the app from Android Studio.
But, the app gets crashed on sign up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants