openMF / mobile-wallet

A reference implementation of Mifos platform wallet and payment capabilities
https://openmf.github.io/mobileapps.github.io/
232 stars 441 forks source link

Profile crashes when not connected to internet #338

Open shiv07tiwari opened 5 years ago

shiv07tiwari commented 5 years ago

Summary:

Clicking on profile leads to a crash that should be handled gracefully.

Steps to reproduce:

How can we reproduce again the issue?

Expected behavior:

Home - User profile videotogif_2019 02 22_11 24 41

shiv07tiwari commented 5 years ago

@luckyman20 can i fix this ?

shaliniv16 commented 5 years ago

@shiv07tiwari This issue was not found in the redesign branch.

shiv07tiwari commented 5 years ago

@shaliniv16 I didn't check for redesign, it is present in dev. I'll cross check in redesign.

shaliniv16 commented 5 years ago

@shiv07tiwari It works fine for me in dev branch too.

shiv07tiwari commented 5 years ago

02-23 15:52:29.406 9353-9353/org.mifos.mobilewallet.mifospay E/AndroidRuntime: FATAL EXCEPTION: main Process: org.mifos.mobilewallet.mifospay, PID: 9353 java.lang.StringIndexOutOfBoundsException: length=0; index=1 at java.lang.String.substring(String.java:1971) at org.mifos.mobilewallet.mifospay.home.ui.ProfileFragment.showProfile(ProfileFragment.java:123) at org.mifos.mobilewallet.mifospay.home.presenter.ProfilePresenter.fetchprofile(ProfilePresenter.java:40) at org.mifos.mobilewallet.mifospay.home.ui.ProfileFragment.onCreateView(ProfileFragment.java:86) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2346) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1428) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2596) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2383) at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2338) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2245) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:703) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6600) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:518) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:821)

I am not sure, but maybe I am getting this error because i surpasses the login and made the home screen as the launcher activity. So the client is null. @luckyman20 @shaliniv16

RajaVamsi11 commented 5 years ago

@shiv07tiwari Due to skipping of login activity you are getting this error otherwise there will be no errors or crash.