DHIS2 Android Capture App patch release 2.8.1 is now available

Dear all,

DHIS2 Android Capture App version 2.8.1 is a patch version of the DHIS2 Android App. It builds upon the last version including bug fixes that couldn’t wait for the next version. It includes no functional improvements nor changes in the user Interface. It means that your users can update without experiencing any change in the UI.

This patch release is our response to challenges and bugs reported by the community. Specifically, this version has incorporated the latest version of the program rule engine, fixing some issues that, depending on the configuration, were blocking the data entry process in some implementations. It also incorporates some fixes in the program indicator calculations and other functional bugs that you can see here

This is the latest stable release for version 2.8.

The release notes for this patch can be found here: Patch 2.8.1 Release

RELEASE INFO

Release Information Link
Download app from Google Play or Github Google Play - Github
Documentation and Javadocs Android Overview - DHIS2
Overview of bugs fixed on JIRA (requires login) 2.8.1 Bugs
Source code on Github GitHub - dhis2/dhis2-android-capture-app: DHIS 2 data and tracker capture app for Android
Demo instance (user/password) https://play.dhis2.org/40.0.0 android / Android123
DHIS 2 community https://community.dhis2.org Mobile Community
Source code of SDK on Github SDK 1.8.1
2 Likes

Hi @jose

I m getting this error after updating.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dhis2/org.dhis2.usescases.main.MainActivity}: java.lang.NullPointerException: visualization must not be null
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3430)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3594)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2067)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7698)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
Caused by: java.lang.NullPointerException: visualization must not be null
	at dhis2.org.analytics.charts.ChartsRepositoryImpl.addVisualizationsInGroup(ChartsRepositoryImpl.kt:199)
	at dhis2.org.analytics.charts.ChartsRepositoryImpl.getHomeVisualization(ChartsRepositoryImpl.kt:124)
	at dhis2.org.analytics.charts.DhisAnalyticCharts.getHomeVisualizations(DhisAnalyticCharts.kt:31)
	at org.dhis2.usescases.main.HomeRepositoryImpl.hasHomeAnalytics(HomeRepositoryImpl.kt:45)
	at org.dhis2.usescases.main.HomePageConfigurator.displayAnalytics(HomePageConfigurator.kt:17)
	at org.dhis2.utils.customviews.navigationbar.NavigationPageConfigurator$DefaultImpls.pageVisibility(NavigationPageConfigurator.kt:10)
	at org.dhis2.usescases.main.HomePageConfigurator.pageVisibility(HomePageConfigurator.kt:5)
	at org.dhis2.utils.customviews.navigationbar.NavigationBottomBar.pageConfiguration(NavigationBottomBar.kt:216)
	at org.dhis2.usescases.main.MainActivity.onCreate(MainActivity.kt:147)
	at android.app.Activity.performCreate(Activity.java:8000)
	at android.app.Activity.performCreate(Activity.java:7984)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3403)
	... 11 more

Hi @mutali, sorry about that. It seems that the issue might be related to a visualization that doesn’t exist in the server, maybe?

The app should catch the error, but if you are using the Android Settings Webapp, can you check the configuration to see if that is really the case (a visualization is selected but it doesn’t exist in the server or it is not android compatible after some changes)? Also, are you able to sync the metadata at least? Or is the app throwing that error in every sync attempt?

When are we expecting the update that allows the app to display all 230 name characters on screen.

Hi @mutali , we have just published a hotfix (2.8.1.1) that fixes the issue that you were facing.

Thanks a lot for reporting, it was a quite important one.

Apologies for the inconveniences.

2 Likes

Thank you for the fix

1 Like

I do have another error may be its related:

	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	... 1 more
Caused by: de.adorsys.android.securestoragelibrary.SecureStorageException: javax.crypto.BadPaddingException
	at de.adorsys.android.securestoragelibrary.KeystoreTool.encryptMessage(KeystoreTool.java:95)
	at de.adorsys.android.securestoragelibrary.SecurePreferences.setValue(SecurePreferences.java:59)
	at org.dhis2.commons.prefs.PreferenceProviderImpl.setValue(PreferenceProviderImpl.kt:28)
	at org.dhis2.commons.prefs.PreferenceProviderImpl.saveAsJson(PreferenceProviderImpl.kt:166)
	at org.dhis2.usescases.teiDashboard.dashboardfragments.teidata.TEIDataPresenter.onGroupingChanged(TEIDataPresenter.java:433)
	at org.dhis2.usescases.teiDashboard.dashboardfragments.teidata.TEIDataFragment.lambda$onCreateView$0$org-dhis2-usescases-teiDashboard-dashboardfragments-teidata-TEIDataFragment(TEIDataFragment.java:165)
	at org.dhis2.usescases.teiDashboard.dashboardfragments.teidata.TEIDataFragment$$ExternalSyntheticLambda1.onChanged(Unknown Source:4)
	at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
	at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:146)
	at androidx.lifecycle.LiveData$ObserverWrapper.activeStateChanged(LiveData.java:468)
	at androidx.lifecycle.LiveData$LifecycleBoundObserver.onStateChanged(LiveData.java:425)
	at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:360)
	at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:271)
	at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:313)
	at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:151)
	at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:134)
	at androidx.fragment.app.FragmentViewLifecycleOwner.handleLifecycleEvent(FragmentViewLifecycleOwner.java:96)
	at androidx.fragment.app.Fragment.performStart(Fragment.java:3169)
	at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:588)
	at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:279)
	at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1890)
	at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1808)
	at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1720)
	at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:317)
	at androidx.viewpager2.adapter.FragmentStateAdapter.placeFragmentInViewHolder(FragmentStateAdapter.java:341)
	at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:276)
	at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:67)
	at androidx.recyclerview.widget.RecyclerView.dispatchChildAttached(RecyclerView.java:7867)
	at androidx.recyclerview.widget.RecyclerView$5.addView(RecyclerView.java:893)
	at androidx.recyclerview.widget.ChildHelper.addView(ChildHelper.java:107)
	at androidx.recyclerview.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:8902)
	at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8860)
	at androidx.recyclerview.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:8848)
	at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1645)
	at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
	at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:668)
	at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4309)
	at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4012)
	at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4578)
	at android.view.View.layout(View.java:22848)
	at android.view.ViewGroup.layout(ViewGroup.java:6389)
	at androidx.viewpager2.widget.ViewPager2.onLayout(ViewPager2.java:527)
	at android.view.View.layout(View.java:22848)
	at android.view.ViewGroup.layout(ViewGroup.java:6389)
	at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:1873)
	at android.view.View.layout(View.java:22848)
	at android.view.ViewGroup.layout(ViewGroup.java:6389)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:22848)
	at android.view.ViewGroup.layout(ViewGroup.java:6389)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
	at android.view.View.layout(View.java:22848)
	at android.view.ViewGroup.layout(ViewGroup.java:6389)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:22848)
	at android.view.ViewGroup.layout(ViewGroup.java:6389)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
	at android.view.View.layout(View.java:22848)
	at android.view.ViewGroup.layout(ViewGroup.java:6389)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at com.android.internal.policy.DecorView.onLayout(DecorView.java:784)
	at android.view.View.layout(View.java:22848)
	at android.view.ViewGroup.layout(ViewGroup.java:6389)
	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3472)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2940)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1954)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8180)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1056)
	at android.view.Choreographer.doCallbacks(Choreographer.java:878)
	at android.view.Choreographer.doFrame(Choreographer.java:811)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1041)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7698)
	... 3 more
Caused by: java.io.IOException: javax.crypto.BadPaddingException
	at javax.crypto.CipherOutputStream.close(CipherOutputStream.java:214)
	at de.adorsys.android.securestoragelibrary.KeystoreTool.encryptMessage(KeystoreTool.java:89)
	... 84 more
Caused by: javax.crypto.BadPaddingException
	at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:515)
	at javax.crypto.Cipher.doFinal(Cipher.java:1938)
	at javax.crypto.CipherOutputStream.close(CipherOutputStream.java:210)
	... 85 more
Caused by: android.security.KeyStoreException: Invalid argument
	at android.security.KeyStore.getKeyStoreException(KeyStore.java:1301)
	at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:186)
	at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:506)
	... 87 more```
1 Like

Posting this here as well, could be related? @mutali did you get this in GUI?

Yes @jthomas I am getting the error it on GUI when I want to open some tracker program, but not the log in like your case

1 Like

Hi @mutali . Sorry to hear this, is this happening in every tracker program or it is a specific one? Does it happen also with a new installation of the App? Could you maybe share some credentials (via PM) so we can check?

Hi @jaime.bosque its happening with the new app and its for some programs not all

Is it possible to share some credentials if a testing server? If yes please do so via private message. Thanks

Yes, I shared it with you

The problem seems to be gone after resetting the app so I assume there was a cache issue. Putting it here in case other uses encounter the same issue.

1 Like

Yes it was the cache, thanks

1 Like