opensrp / opensrp-client-reveal

OpenSRP Client Reveal App
Other
7 stars 8 forks source link

Fix crashlytics crashes #1504

Closed Rkareko closed 3 years ago

Rkareko commented 3 years ago

Related to https://smartregister.atlassian.net/browse/RVL-1778

Steps to reproduce:

  1. Log-in to Reveal
  2. Select a yellow structure
  3. Register a head of household
  4. Add a new family member - app crashes

notice how : the app immediately show white for like 1 second then opens the maps, opens a new structure when you close that structure the app logs you out and you have to login again

Fix this exception NoLocaleFamilyWizardFormActivity.java line 48

Exception is

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.smartregister.reveal/org.smartregister.family.activity.NoLocaleFamilyWizardFormActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.smartregister.family.delegates.FamilyWizardFormDelegate.attachBaseContext(com.vijay.jsonwizard.activities.JsonFormActivity, android.content.Context, androidx.core.util.Consumer)' on a null object reference
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3303)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3411)
       at android.app.ActivityThread.-wrap12()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1994)
       at android.os.Handler.dispatchMessage(Handler.java:108)
       at android.os.Looper.loop(Looper.java:166)
       at android.app.ActivityThread.main(ActivityThread.java:7529)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
madrinekariuki commented 3 years ago

This has been tested on v5.3.26-rc6 th-en preview v5.3.26-rc6 th preview

the app is no longer crashing when you click 'Allow this app to make phone calls' and also when adding structure