openMF / mobile-wallet

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

App crashes on first install from Android Studio #730

Closed Grandolf49 closed 4 years ago

Grandolf49 commented 4 years ago

Summary:

When the app is installed for the first time from Android Studio, it crashes. When the app is restarted, it works fine

Steps to reproduce:

  1. Uninstall current app (if installed previously)
  2. Run the app from Android Studio
  3. App crashes after Android Studio installs it in your phone.
  4. Restart the app from phone, now it works fine

Expected behavior:

App should not crash when it is installed from Android Studio

Device and Android version:

Android 10 OnePlus 6 Stock ROM

Screenshots:

app crash on first install from android studio

Bhavnaharitsa commented 4 years ago

Are you sure you are on the dev branch?

Grandolf49 commented 4 years ago

@Bhavnaharitsa yes, i'm on dev branch

codepoet2017390 commented 4 years ago

@Grandolf49 nice find. I was going to file the same issue. Log shows failure due to some missing firebase support class.

Grandolf49 commented 4 years ago

@codepoet2017390 thanks. Yeah there is a missing support class. I'm not sure if we can comment that out from manifest or create that class file. If we create, what should it contain.

codepoet2017390 commented 4 years ago

@Grandolf49 so commenting out does work but that's like running away from the problem. I'm trying to find out why that service was needed anyway and what repercussions do commenting it out have. What are your views on this?

Grandolf49 commented 4 years ago

@codepoet2017390 Yeah exactly, that's what I thought. That's why I didn't create a PR for this issue yet. That service is needed for notifications. But the corresponding classes must have to be implemented first

codepoet2017390 commented 4 years ago

@Grandolf49 Are you able to log in?

Grandolf49 commented 4 years ago

Yes for logging in, as @Bhavnaharitsa mentioned earlier on the gitter channel.

  1. Navigate to mobile-wallet\core\src\main\java\org\mifos\mobilewallet\core\data\fineract\api\BaseURL.java
  2. Change API_ENDPOINT and API_ENDPOINT_SELF from demo.openmf.org to demo.mifos.io
  3. Use credentials mentioned on the wifi page to sign in username: mifospay01 password: Password1
Grandolf49 commented 4 years ago

@naman14 what are your views on this issue?

Bhavnaharitsa commented 4 years ago

@Grandolf49 Are you able to solve the error? I think if not, please paste the logs so that it will be helpful to figure out

s-ayush2903 commented 4 years ago

@Grandolf49 I'm trying to find out why that service was needed anyway and what repercussions do commenting it out have. What are your views on this?

@codepoet2017390 That service was needed for generating new tokens as soon as they get expired. And that service has now been deprecated so it is safe to remove from the manifest file and compensation of the same can be made by adding a oneliner code in the onNewToken() method of MessagingService.java class itself. Reference to all that has been quoted above:

s-ayush2903 commented 4 years ago

After safeDeleting from manifest file and modifying the onNewtoken() method, the app runs well and fine.

s-ayush2903 commented 4 years ago

The PR regarding the same has been opened due to long inactivity on this issue